Subversion Repositories svnkaklik

Compare Revisions

No changes between revisions

Ignore whitespace Rev 624 → Rev 625

/programy/C/PIC_C/mereni/tester_serv/blikac.BAK
0,0 → 1,40
#include "blikac.h"
#DEFINE SERVO_X PIN_A2 // piny na ktere jsou pripojena serva
#DEFINE SERVO_Y PIN_B0
#DEFINE TL1 PIN_B1
 
void main()
{
int i;
while (true)
{
while(input(TL1))
{
for(i=0;i<=100;i++)
{
output_high(servo_y);
output_high(servo_x);
delay_us(1000);
output_low(servo_y);
output_low(servo_x);
delay_ms(20);
}
 
for(i=0;i<=100;i++)
{
output_high(servo_y);
output_high(servo_x);
delay_us(2000);
output_low(servo_y);
output_low(servo_x);
delay_ms(20);
}
}
output_high(servo_y);
output_high(servo_x);
delay_us(1500);
output_low(servo_y);
output_low(servo_x);
delay_ms(20);
}
}
/programy/C/PIC_C/mereni/tester_serv/blikac.HEX
0,0 → 1,23
:020000040000FA
:1000000000308A002B2800001330840000080319F8
:10001000172801308D008C018C0B0C288D0B0B28C0
:100020004A308C008C0B12281528800B09280034CC
:1000300012309402031C2A2814308400FC308005FE
:100040000310800C800C000803192A2828280000BF
:10005000800B27287E2884011F3083058316861491
:100060008312861C6E2892011208643C031C5028DF
:1000700083160610831206148316051183120515C4
:100080000130930004208316061083120610831695
:10009000051183120511143093000420920A3428AC
:1000A00092011208643C031C6D288316061083120B
:1000B00006148316051183120515023093000420DF
:1000C000831606108312061083160511831205117C
:1000D000143093000420920A51282E28831606100B
:1000E000831206148316051183120515013093003F
:1000F000042002309300F73094001828930B7B28DB
:10010000831606108312061083160511831205113B
:0A0110001430930004202E28630031
:02400E00F93F78
:00000001FF
;PIC16C84
;CRC=26BE CREATED="23-I-10 18:21"
/programy/C/PIC_C/mereni/tester_serv/blikac.LST
0,0 → 1,204
CCS PCM C Compiler, Version 4.090, 47914 23-I-10 18:21
 
Filename: D:\svnKaklik\programy\C\PIC_C\mereni\tester serv\blikac.lst
 
ROM used: 141 words (14%)
Largest free fragment is 883
RAM used: 7 (19%) at main() level
8 (22%) worst case
Stack: 1 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 02B
0003: NOP
.................... #include "blikac.h"
.................... #include <16C84.h>
.................... //////// Standard Header file for the PIC16C84 device ////////////////
.................... #device PIC16C84
.................... #list
....................
.................... #use delay(clock=4000000)
0004: MOVLW 13
0005: MOVWF 04
0006: MOVF 00,W
0007: BTFSC 03.2
0008: GOTO 017
0009: MOVLW 01
000A: MOVWF 0D
000B: CLRF 0C
000C: DECFSZ 0C,F
000D: GOTO 00C
000E: DECFSZ 0D,F
000F: GOTO 00B
0010: MOVLW 4A
0011: MOVWF 0C
0012: DECFSZ 0C,F
0013: GOTO 012
0014: GOTO 015
0015: DECFSZ 00,F
0016: GOTO 009
0017: RETLW 00
0018: MOVLW 12
0019: SUBWF 14,F
001A: BTFSS 03.0
001B: GOTO 02A
001C: MOVLW 14
001D: MOVWF 04
001E: MOVLW FC
001F: ANDWF 00,F
0020: BCF 03.0
0021: RRF 00,F
0022: RRF 00,F
0023: MOVF 00,W
0024: BTFSC 03.2
0025: GOTO 02A
0026: GOTO 028
0027: NOP
0028: DECFSZ 00,F
0029: GOTO 027
002A: GOTO 07E (RETURN)
.................... #fuses XT,PUT,NOWDT
....................
....................
.................... #DEFINE SERVO_X PIN_A2 // piny na ktere jsou pripojena serva
.................... #DEFINE SERVO_Y PIN_B0
.................... #DEFINE TL1 PIN_B1
....................
.................... void main()
.................... {
002B: CLRF 04
002C: MOVLW 1F
002D: ANDWF 03,F
.................... int i;
.................... while (true)
.................... {
.................... while(input(TL1))
.................... {
002E: BSF 03.5
002F: BSF 06.1
0030: BCF 03.5
0031: BTFSS 06.1
0032: GOTO 06E
.................... for(i=0;i<=100;i++)
0033: CLRF 12
0034: MOVF 12,W
0035: SUBLW 64
0036: BTFSS 03.0
0037: GOTO 050
.................... {
.................... output_high(servo_y);
0038: BSF 03.5
0039: BCF 06.0
003A: BCF 03.5
003B: BSF 06.0
.................... output_high(servo_x);
003C: BSF 03.5
003D: BCF 05.2
003E: BCF 03.5
003F: BSF 05.2
.................... delay_us(1000);
0040: MOVLW 01
0041: MOVWF 13
0042: CALL 004
.................... output_low(servo_y);
0043: BSF 03.5
0044: BCF 06.0
0045: BCF 03.5
0046: BCF 06.0
.................... output_low(servo_x);
0047: BSF 03.5
0048: BCF 05.2
0049: BCF 03.5
004A: BCF 05.2
.................... delay_ms(20);
004B: MOVLW 14
004C: MOVWF 13
004D: CALL 004
.................... }
004E: INCF 12,F
004F: GOTO 034
....................
.................... for(i=0;i<=100;i++)
0050: CLRF 12
0051: MOVF 12,W
0052: SUBLW 64
0053: BTFSS 03.0
0054: GOTO 06D
.................... {
.................... output_high(servo_y);
0055: BSF 03.5
0056: BCF 06.0
0057: BCF 03.5
0058: BSF 06.0
.................... output_high(servo_x);
0059: BSF 03.5
005A: BCF 05.2
005B: BCF 03.5
005C: BSF 05.2
.................... delay_us(2000);
005D: MOVLW 02
005E: MOVWF 13
005F: CALL 004
.................... output_low(servo_y);
0060: BSF 03.5
0061: BCF 06.0
0062: BCF 03.5
0063: BCF 06.0
.................... output_low(servo_x);
0064: BSF 03.5
0065: BCF 05.2
0066: BCF 03.5
0067: BCF 05.2
.................... delay_ms(20);
0068: MOVLW 14
0069: MOVWF 13
006A: CALL 004
.................... }
006B: INCF 12,F
006C: GOTO 051
.................... }
006D: GOTO 02E
.................... output_high(servo_y);
006E: BSF 03.5
006F: BCF 06.0
0070: BCF 03.5
0071: BSF 06.0
.................... output_high(servo_x);
0072: BSF 03.5
0073: BCF 05.2
0074: BCF 03.5
0075: BSF 05.2
.................... delay_us(1500);
0076: MOVLW 01
0077: MOVWF 13
0078: CALL 004
0079: MOVLW 02
007A: MOVWF 13
007B: MOVLW F7
007C: MOVWF 14
007D: GOTO 018
007E: DECFSZ 13,F
007F: GOTO 07B
.................... output_low(servo_y);
0080: BSF 03.5
0081: BCF 06.0
0082: BCF 03.5
0083: BCF 06.0
.................... output_low(servo_x);
0084: BSF 03.5
0085: BCF 05.2
0086: BCF 03.5
0087: BCF 05.2
.................... delay_ms(20);
0088: MOVLW 14
0089: MOVWF 13
008A: CALL 004
.................... }
008B: GOTO 02E
.................... }
008C: SLEEP
 
Configuration Fuses:
Word 1: 3FF9 XT NOWDT PUT NOPROTECT
/programy/C/PIC_C/mereni/tester_serv/blikac.PJT
0,0 → 1,40
[PROJECT]
Target=blikac.HEX
Development_Mode=
Processor=0x6C84
ToolSuite=CCS
Processor_Text=PIC16C84
 
[Directories]
Include=C:\PROGRAM FILES\PICC\devices\;C:\PROGRAM FILES\PICC\dr
Library=
LinkerScript=
 
[Target Data]
FileList=D:\svnKaklik\programy\C\PIC_C\mereni\tester serv\blikac.c
BuildTool=C-COMPILER
OptionString=+FM
AdditionalOptionString=
BuildRequired=1
 
[blikac.c]
Type=4
Path=
FileList=
BuildTool=
OptionString=
AdditionalOptionString=
 
[mru-list]
1=blikac.c
 
[Windows]
0=0000 blikac.c 0 0 796 451 3 0
 
[Opened Files]
1=blikac.c
2=C:\PROGRAM FILES\PICC\devices\16C84.h
3=
[Units]
Count=1
1=blikac.c (main)
/programy/C/PIC_C/mereni/tester_serv/blikac.SYM
0,0 → 1,50
004-005 @READ_PROGRAM_MEMORY8.P1
00C @SCRATCH
00D @SCRATCH
00D _RETURN_
00E @SCRATCH
00F @SCRATCH
010 @SCRATCH
012 main.i
013 @delay_ms1.P1
013 main.@SCRATCH1
014 @delay_us1.P1
10D-10E @READ_PROGRAM_MEMORY8.P1
 
ROM Allocation:
0004 @delay_ms1
0018 @delay_us1
002B main
002B @cinit
 
 
User Memory space:
 
Project Directory:
D:\svnKaklik\programy\C\PIC_C\mereni\tester serv\
 
Project Files:
blikac.c
blikac.h
C:\PROGRAM FILES\PICC\devices\16C84.h
 
Units:
D:\svnKaklik\programy\C\PIC_C\mereni\tester serv\blikac.c (main)
 
Compiler Settings:
Processor: PIC16C84
Pointer Size: 8
Opt Level: 9
Short,Int,Long: UNSIGNED: 1,8,16
Float,Double: 32,32
 
Output Files:
Errors: blikac.err
Ext Symbols: blikac.esym
INHX8: blikac.hex
Symbols: blikac.sym
List: blikac.lst
Debug/COFF: blikac.cof
Project: blikac.PJT
Call Tree: blikac.tre
Statistics: blikac.sta
/programy/C/PIC_C/mereni/tester_serv/blikac.c
0,0 → 1,40
#include "blikac.h"
#DEFINE SERVO_X PIN_A2 // piny na ktere jsou pripojena serva
#DEFINE SERVO_Y PIN_B0
#DEFINE TL1 PIN_B1
 
void main()
{
int i;
while (true)
{
while(input(TL1))
{
for(i=0;i<=100;i++)
{
output_high(servo_y);
output_high(servo_x);
delay_us(1000);
output_low(servo_y);
output_low(servo_x);
delay_ms(20);
}
 
for(i=0;i<=100;i++)
{
output_high(servo_y);
output_high(servo_x);
delay_us(2000);
output_low(servo_y);
output_low(servo_x);
delay_ms(20);
}
}
output_high(servo_y);
output_high(servo_x);
delay_us(1500);
output_low(servo_y);
output_low(servo_x);
delay_ms(20);
}
}
/programy/C/PIC_C/mereni/tester_serv/blikac.err
0,0 → 1,2
Memory usage: ROM=14% RAM=19% - 22%
0 Errors, 0 Warnings.
/programy/C/PIC_C/mereni/tester_serv/blikac.sta
0,0 → 1,45
 
ROM used: 141 (14%)
141 (14%) including unused fragments
 
1 Average locations per line
5 Average locations per statement
 
RAM used: 7 (19%) at main() level
8 (22%) worst case
 
Stack used: 1 worst case (out of 8 total available)
 
Lines Stmts % Files
----- ----- --- -----
41 26 100 blikac.c
5 0 0 blikac.h
115 0 0 C:\PROGRAM FILES\PICC\devices\16C84.h
----- -----
161 26 Total
 
Page ROM % RAM Vol Diff Functions:
---- --- --- --- --- ---- ----------
0 20 14 1 @delay_ms1
0 19 13 1 @delay_us1
0 98 70 2 670 3.8 main
 
Program metrics:
Functions 1
Statements 26
Comments 37
Volume (V) 675
Difficilty (D) 3.7
Effort to implement (E) 2505
Time to implement (T) 2 minutes
Est Delivered Bugs (B) 0
Cyclomatic Complexity 2
Maintainability (MI) 84
 
Segment Used Free
----------- ---- ----
00000-00003 4 0
00004-003FF 137 883
 
 
 
/programy/C/PIC_C/mereni/tester_serv/blikac.tre
0,0 → 1,10
ÀÄblikac
ÀÄmain 0/98 Ram=2
ÃÄ??0??
ÃÄ@delay_ms1 0/20 Ram=1
ÃÄ@delay_ms1 0/20 Ram=1
ÃÄ@delay_ms1 0/20 Ram=1
ÃÄ@delay_ms1 0/20 Ram=1
ÃÄ@delay_ms1 0/20 Ram=1
ÃÄ@delay_us1 0/19 Ram=1
ÀÄ@delay_ms1 0/20 Ram=1
/programy/C/PIC_C/mereni/tester_serv/blikac.cod
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/programy/C/PIC_C/mereni/tester_serv/blikac.h
0,0 → 1,4
#include <16C84.h>
#use delay(clock=4000000)
#fuses XT,PUT,NOWDT
 
/programy/C/PIC_C/mereni/tester_serv/vssver.scc
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property