/programy/C/PIC_C/mereni/serva/PIC16F88/tester.BAK |
---|
1,5 → 1,93 |
#include <16F88.h> |
#device adc=8 |
#fuses NOWDT,INTRC_IO, NOPUT, MCLR, BROWNOUT, LVP, NOCPD, NOWRT, NODEBUG, NOPROTECT, FCMEN, IESO |
#use delay(clock=4000000) |
#include "D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.h" |
#DEFINE servo1 PIN_A4 |
#DEFINE servo2 PIN_A3 |
#DEFINE servo3 PIN_A2 |
#DEFINE servo4 PIN_A0 |
#DEFINE SW PIN_A1 |
void main() |
{ |
int i; |
setup_adc_ports(NO_ANALOGS|VSS_VDD); |
setup_adc(ADC_OFF); |
setup_spi(FALSE); |
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
setup_timer_1(T1_DISABLED); |
setup_timer_2(T2_DISABLED,0,1); |
setup_comparator(NC_NC_NC_NC); |
setup_vref(FALSE); |
while(true) |
{ |
While(input(SW)) |
{ |
output_high(servo1); |
Delay_us(1500); |
output_low(servo1); |
output_high(servo2); |
Delay_us(1500); |
output_low(servo2); |
output_high(servo3); |
Delay_us(1500); |
output_low(servo3); |
output_high(servo4); |
Delay_us(1500); |
output_low(servo4); |
Delay_ms(10); |
} |
While(!input(SW)) |
{ |
for(i=0; i<100; ++i) |
{ |
output_high(servo1); |
Delay_us(1000); |
output_low(servo1); |
output_high(servo2); |
Delay_us(1000); |
output_low(servo2); |
output_high(servo3); |
Delay_us(1000); |
output_low(servo3); |
output_high(servo4); |
Delay_us(1000); |
output_low(servo4); |
Delay_ms(10); |
} |
for(i=0; i<100; ++i) |
{ |
output_high(servo1); |
Delay_us(2000); |
output_low(servo1); |
output_high(servo2); |
Delay_us(2000); |
output_low(servo2); |
output_high(servo3); |
Delay_us(2000); |
output_low(servo3); |
output_high(servo4); |
Delay_us(2000); |
output_low(servo4); |
Delay_ms(10); |
} |
} |
} |
} |
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.HEX |
---|
1,42 → 1,41 |
:020000040000FA |
:1000000000308A002D28000022308400831300086D |
:10001000031918280130F800F701F70B0D28F80B29 |
:100020000C284A30F700F70B13281628800B0A28F3 |
:1000300000341230A302031C2C28233084008313C5 |
:10004000FC3080050310800C800C000803192C285C |
:100050002A280000800B29280034840183131F30D4 |
:100060008305623083168F000F081F129F121B0832 |
:1000700080399B0007309C0081131F129F121B08C0 |
:1000800080399B0083121F10940183160108C73921 |
:1000900008388100831290010030F800920000308F |
:1000A0008316920007309C00050885000330F70096 |
:1000B000F70B58281C0883120D1383169D01061593 |
:1000C0008312061DB1288316861083128614013010 |
:1000D000A20004200230A200F730A3001920A20BD6 |
:1000E0006C2883168610831286108316851183125E |
:1000F00085150130A20004200230A200F730A300D1 |
:100100001920A20B7E288316851183128511831670 |
:100110000511831205150130A20004200230A2004F |
:10012000F730A3001920A20B902883160511831223 |
:10013000051183160510831205140130A200042056 |
:100140000230A200F730A3001920A20BA2288316C8 |
:100150000510831205100A30A200042083165F28C0 |
:10016000831283160615831206192329A10121087B |
:10017000633C031CEC28831686108312861401301E |
:10018000A200042083168610831286108316851120 |
:10019000831285150130A200042083168511831275 |
:1001A000851183160511831205150130A200042064 |
:1001B0008316051183120511831605108312051489 |
:1001C0000130A200042083160510831205100A30A6 |
:1001D000A2000420A10AB728A1012108633C031C46 |
:1001E000222983168610831286140230A20004206E |
:1001F0008316861083128610831685118312851547 |
:100200000230A20004208316851183128511831603 |
:100210000511831205150230A20004208316051172 |
:100220008312051183160510831205140230A200F3 |
:10023000042083160510831205100A30A200042042 |
:0C024000A10AED28B12883165F28630096 |
:04400E00783FFF3FB9 |
:1000000000308A002C2800002230840000080319E8 |
:1000100018280130F800F701F70B0C28F80B0B2813 |
:100020004A30F700F70B122800000000800B092867 |
:1000300000341230A302031C2B2823308400FC3030 |
:1000400080050310800C800C000803192B28292838 |
:100050000000800B2828003484011F30830583169C |
:100060001F129F121B0880399B0007309C001C0840 |
:1000700083120D13603083168F001F129F121B080E |
:1000800080399B0083121F10941283160611861468 |
:100090000612003083129400831694000108C739B9 |
:1000A00008388100831290010030F800920000307F |
:1000B0008316920007309C0005080330F700F70B09 |
:1000C0005F281C0883120D1383169D0106158312E9 |
:1000D000061DB82883168610831286140130A200EC |
:1000E00004200230A200F730A3001920A20B7328CD |
:1000F0008316861083128610831685118312851548 |
:100100000130A20004200230A200F730A300192021 |
:10011000A20B85288316851183128511831605117C |
:10012000831205150130A20004200230A200F7302E |
:10013000A3001920A20B972883160511831205111D |
:1001400083160510831205140130A200042002302A |
:10015000A200F730A3001920A20BA92883160510CE |
:10016000831205100A30A200042083166628831229 |
:1001700083160615831206192A29A1012108633C5A |
:10018000031CF32883168610831286140130A20004 |
:10019000042083168610831286108316851183121D |
:1001A00085150130A2000420831685118312851164 |
:1001B00083160511831205150130A2000420831651 |
:1001C00005118312051183160510831205140130E1 |
:1001D000A200042083160510831205100A30A20025 |
:1001E0000420A10ABE28A1012108633C031C29297F |
:1001F00083168610831286140230A2000420831610 |
:10020000861083128610831685118312851502309D |
:10021000A20004208316851183128511831605110F |
:10022000831205150230A2000420831605118312E3 |
:10023000051183160510831205140230A200042054 |
:1002400083160510831205100A30A2000420A10AAB |
:0A025000F428B8288316662863001E |
:04400E00F83FFF3F39 |
:00000001FF |
;PIC16F88 |
;CRC=BB1D CREATED="23-I-10 18:05" |
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.LST |
---|
1,411 → 1,420 |
CCS PCM C Compiler, Version 4.090, 47914 23-I-10 18:05 |
CCS PCM C Compiler, Version 3.221, 27853 27-XI-05 00:06 |
Filename: D:\svnKaklik\programy\C\PIC_C\mereni\serva\PIC16F88\tester.lst |
Filename: D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.LST |
ROM used: 294 words (7%) |
ROM used: 301 words (7%) |
Largest free fragment is 2048 |
RAM used: 8 (2%) at main() level |
9 (2%) worst case |
RAM used: 7 (4%) at main() level |
8 (5%) worst case |
Stack: 1 locations |
* |
0000: MOVLW 00 |
0001: MOVWF 0A |
0002: GOTO 02D |
0002: GOTO 02C |
0003: NOP |
.................... #include "tester.h" |
.................... #include <16F88.h> |
.................... //////// Standard Header file for the PIC16F88 device //////////////// |
.................... #device PIC16F88 |
.................... #list |
.................... #include "D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.h" |
.................... #include <16F88.h> |
.................... //////// Standard Header file for the PIC16F88 device //////////////// |
.................... #device PIC16F88 |
.................... #list |
.................... |
.................... #device adc=8 |
.................... #fuses NOWDT,INTRC_IO, NOPUT, MCLR, BROWNOUT, NOLVP, NOCPD, NOWRT, NODEBUG, NOPROTECT, FCMEN, IESO |
.................... #use delay(clock=4000000) |
.................... #device adc=8 |
.................... #fuses NOWDT,INTRC_IO, NOPUT, MCLR, BROWNOUT, LVP, NOCPD, NOWRT, NODEBUG, NOPROTECT, FCMEN, IESO |
.................... #use delay(clock=4000000) |
0004: MOVLW 22 |
0005: MOVWF 04 |
0006: BCF 03.7 |
0007: MOVF 00,W |
0008: BTFSC 03.2 |
0009: GOTO 018 |
000A: MOVLW 01 |
000B: MOVWF 78 |
000C: CLRF 77 |
000D: DECFSZ 77,F |
000E: GOTO 00D |
000F: DECFSZ 78,F |
0010: GOTO 00C |
0011: MOVLW 4A |
0012: MOVWF 77 |
0013: DECFSZ 77,F |
0014: GOTO 013 |
0015: GOTO 016 |
0006: MOVF 00,W |
0007: BTFSC 03.2 |
0008: GOTO 018 |
0009: MOVLW 01 |
000A: MOVWF 78 |
000B: CLRF 77 |
000C: DECFSZ 77,F |
000D: GOTO 00C |
000E: DECFSZ 78,F |
000F: GOTO 00B |
0010: MOVLW 4A |
0011: MOVWF 77 |
0012: DECFSZ 77,F |
0013: GOTO 012 |
0014: NOP |
0015: NOP |
0016: DECFSZ 00,F |
0017: GOTO 00A |
0017: GOTO 009 |
0018: RETLW 00 |
0019: MOVLW 12 |
001A: SUBWF 23,F |
001B: BTFSS 03.0 |
001C: GOTO 02C |
001C: GOTO 02B |
001D: MOVLW 23 |
001E: MOVWF 04 |
001F: BCF 03.7 |
0020: MOVLW FC |
0021: ANDWF 00,F |
0022: BCF 03.0 |
001F: MOVLW FC |
0020: ANDWF 00,F |
0021: BCF 03.0 |
0022: RRF 00,F |
0023: RRF 00,F |
0024: RRF 00,F |
0025: MOVF 00,W |
0026: BTFSC 03.2 |
0027: GOTO 02C |
0028: GOTO 02A |
0029: NOP |
002A: DECFSZ 00,F |
002B: GOTO 029 |
002C: RETLW 00 |
0024: MOVF 00,W |
0025: BTFSC 03.2 |
0026: GOTO 02B |
0027: GOTO 029 |
0028: NOP |
0029: DECFSZ 00,F |
002A: GOTO 028 |
002B: RETLW 00 |
.................... |
.................... |
.................... |
.................... |
.................... #DEFINE servo1 PIN_B1 |
.................... #DEFINE servo2 PIN_A3 |
.................... #DEFINE servo3 PIN_A2 |
.................... #DEFINE servo4 PIN_A0 |
.................... #DEFINE SW PIN_B2 |
.................... |
.................... void main() |
.................... { |
002D: CLRF 04 |
002E: BCF 03.7 |
002F: MOVLW 1F |
0030: ANDWF 03,F |
0031: MOVLW 62 |
0032: BSF 03.5 |
0033: MOVWF 0F |
0034: MOVF 0F,W |
0035: BCF 1F.4 |
0036: BCF 1F.5 |
0037: MOVF 1B,W |
0038: ANDLW 80 |
0039: MOVWF 1B |
003A: MOVLW 07 |
003B: MOVWF 1C |
.................... int i; |
.................... |
.................... port_b_pullups(TRUE); |
003C: BCF 01.7 |
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD); |
.................... |
.................... #DEFINE servo1 PIN_B1 |
.................... #DEFINE servo2 PIN_A3 |
.................... #DEFINE servo3 PIN_A2 |
.................... #DEFINE servo4 PIN_A0 |
.................... #DEFINE SW PIN_B2 |
.................... |
.................... void main() |
.................... { |
002C: CLRF 04 |
002D: MOVLW 1F |
002E: ANDWF 03,F |
002F: BSF 03.5 |
0030: BCF 1F.4 |
0031: BCF 1F.5 |
0032: MOVF 1B,W |
0033: ANDLW 80 |
0034: MOVWF 1B |
0035: MOVLW 07 |
0036: MOVWF 1C |
0037: MOVF 1C,W |
0038: BCF 03.5 |
0039: BCF 0D.6 |
003A: MOVLW 60 |
003B: BSF 03.5 |
003C: MOVWF 0F |
.................... int i; |
.................... |
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD); |
003D: BCF 1F.4 |
003E: BCF 1F.5 |
003F: MOVF 1B,W |
0040: ANDLW 80 |
0041: MOVWF 1B |
.................... setup_adc(ADC_OFF); |
.................... setup_adc(ADC_OFF); |
0042: BCF 03.5 |
0043: BCF 1F.0 |
.................... setup_spi(FALSE); |
0044: CLRF 14 |
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
.................... setup_spi(FALSE); |
0044: BCF 14.5 |
0045: BSF 03.5 |
0046: MOVF 01,W |
0047: ANDLW C7 |
0048: IORLW 08 |
0049: MOVWF 01 |
.................... setup_timer_1(T1_DISABLED); |
0046: BCF 06.2 |
0047: BSF 06.1 |
0048: BCF 06.4 |
0049: MOVLW 00 |
004A: BCF 03.5 |
004B: CLRF 10 |
.................... setup_timer_2(T2_DISABLED,0,1); |
004C: MOVLW 00 |
004D: MOVWF 78 |
004E: MOVWF 12 |
004F: MOVLW 00 |
0050: BSF 03.5 |
0051: MOVWF 12 |
.................... setup_comparator(NC_NC_NC_NC); |
0052: MOVLW 07 |
0053: MOVWF 1C |
0054: MOVF 05,W |
0055: MOVWF 05 |
0056: MOVLW 03 |
0057: MOVWF 77 |
0058: DECFSZ 77,F |
0059: GOTO 058 |
005A: MOVF 1C,W |
005B: BCF 03.5 |
005C: BCF 0D.6 |
.................... setup_vref(FALSE); |
005D: BSF 03.5 |
005E: CLRF 1D |
.................... |
.................... while(true) |
.................... { |
.................... While(input(SW)) |
.................... { |
005F: BSF 06.2 |
0060: BCF 03.5 |
0061: BTFSS 06.2 |
0062: GOTO 0B1 |
.................... output_high(servo1); |
0063: BSF 03.5 |
0064: BCF 06.1 |
0065: BCF 03.5 |
0066: BSF 06.1 |
.................... Delay_us(1500); |
0067: MOVLW 01 |
0068: MOVWF 22 |
0069: CALL 004 |
006A: MOVLW 02 |
006B: MOVWF 22 |
006C: MOVLW F7 |
006D: MOVWF 23 |
006E: CALL 019 |
006F: DECFSZ 22,F |
0070: GOTO 06C |
.................... output_low(servo1); |
0071: BSF 03.5 |
0072: BCF 06.1 |
0073: BCF 03.5 |
0074: BCF 06.1 |
.................... |
.................... output_high(servo2); |
0075: BSF 03.5 |
0076: BCF 05.3 |
0077: BCF 03.5 |
0078: BSF 05.3 |
.................... Delay_us(1500); |
0079: MOVLW 01 |
007A: MOVWF 22 |
007B: CALL 004 |
007C: MOVLW 02 |
007D: MOVWF 22 |
007E: MOVLW F7 |
007F: MOVWF 23 |
0080: CALL 019 |
0081: DECFSZ 22,F |
0082: GOTO 07E |
.................... output_low(servo2); |
0083: BSF 03.5 |
0084: BCF 05.3 |
0085: BCF 03.5 |
0086: BCF 05.3 |
.................... |
.................... output_high(servo3); |
0087: BSF 03.5 |
0088: BCF 05.2 |
0089: BCF 03.5 |
008A: BSF 05.2 |
.................... Delay_us(1500); |
008B: MOVLW 01 |
008C: MOVWF 22 |
008D: CALL 004 |
008E: MOVLW 02 |
008F: MOVWF 22 |
0090: MOVLW F7 |
0091: MOVWF 23 |
0092: CALL 019 |
0093: DECFSZ 22,F |
0094: GOTO 090 |
.................... output_low(servo3); |
0095: BSF 03.5 |
0096: BCF 05.2 |
0097: BCF 03.5 |
0098: BCF 05.2 |
.................... |
.................... output_high(servo4); |
0099: BSF 03.5 |
009A: BCF 05.0 |
009B: BCF 03.5 |
009C: BSF 05.0 |
.................... Delay_us(1500); |
009D: MOVLW 01 |
009E: MOVWF 22 |
009F: CALL 004 |
00A0: MOVLW 02 |
00A1: MOVWF 22 |
00A2: MOVLW F7 |
00A3: MOVWF 23 |
00A4: CALL 019 |
00A5: DECFSZ 22,F |
00A6: GOTO 0A2 |
.................... output_low(servo4); |
00A7: BSF 03.5 |
00A8: BCF 05.0 |
00A9: BCF 03.5 |
00AA: BCF 05.0 |
.................... |
.................... Delay_ms(10); |
00AB: MOVLW 0A |
00AC: MOVWF 22 |
00AD: CALL 004 |
.................... } |
004B: MOVWF 14 |
004C: BSF 03.5 |
004D: MOVWF 14 |
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
004E: MOVF 01,W |
004F: ANDLW C7 |
0050: IORLW 08 |
0051: MOVWF 01 |
.................... setup_timer_1(T1_DISABLED); |
0052: BCF 03.5 |
0053: CLRF 10 |
.................... setup_timer_2(T2_DISABLED,0,1); |
0054: MOVLW 00 |
0055: MOVWF 78 |
0056: MOVWF 12 |
0057: MOVLW 00 |
0058: BSF 03.5 |
0059: MOVWF 12 |
.................... setup_comparator(NC_NC_NC_NC); |
005A: MOVLW 07 |
005B: MOVWF 1C |
005C: MOVF 05,W |
005D: MOVLW 03 |
005E: MOVWF 77 |
005F: DECFSZ 77,F |
0060: GOTO 05F |
0061: MOVF 1C,W |
0062: BCF 03.5 |
0063: BCF 0D.6 |
.................... setup_vref(FALSE); |
0064: BSF 03.5 |
0065: CLRF 1D |
.................... |
.................... |
.................... |
.................... while(true) |
.................... { |
.................... While(input(SW)) |
.................... { |
0066: BSF 06.2 |
0067: BCF 03.5 |
0068: BTFSS 06.2 |
0069: GOTO 0B8 |
.................... output_high(servo1); |
006A: BSF 03.5 |
006B: BCF 06.1 |
006C: BCF 03.5 |
006D: BSF 06.1 |
.................... Delay_us(1500); |
006E: MOVLW 01 |
006F: MOVWF 22 |
0070: CALL 004 |
0071: MOVLW 02 |
0072: MOVWF 22 |
0073: MOVLW F7 |
0074: MOVWF 23 |
0075: CALL 019 |
0076: DECFSZ 22,F |
0077: GOTO 073 |
.................... output_low(servo1); |
0078: BSF 03.5 |
0079: BCF 06.1 |
007A: BCF 03.5 |
007B: BCF 06.1 |
.................... |
.................... output_high(servo2); |
007C: BSF 03.5 |
007D: BCF 05.3 |
007E: BCF 03.5 |
007F: BSF 05.3 |
.................... Delay_us(1500); |
0080: MOVLW 01 |
0081: MOVWF 22 |
0082: CALL 004 |
0083: MOVLW 02 |
0084: MOVWF 22 |
0085: MOVLW F7 |
0086: MOVWF 23 |
0087: CALL 019 |
0088: DECFSZ 22,F |
0089: GOTO 085 |
.................... output_low(servo2); |
008A: BSF 03.5 |
008B: BCF 05.3 |
008C: BCF 03.5 |
008D: BCF 05.3 |
.................... |
.................... output_high(servo3); |
008E: BSF 03.5 |
008F: BCF 05.2 |
0090: BCF 03.5 |
0091: BSF 05.2 |
.................... Delay_us(1500); |
0092: MOVLW 01 |
0093: MOVWF 22 |
0094: CALL 004 |
0095: MOVLW 02 |
0096: MOVWF 22 |
0097: MOVLW F7 |
0098: MOVWF 23 |
0099: CALL 019 |
009A: DECFSZ 22,F |
009B: GOTO 097 |
.................... output_low(servo3); |
009C: BSF 03.5 |
009D: BCF 05.2 |
009E: BCF 03.5 |
009F: BCF 05.2 |
.................... |
.................... output_high(servo4); |
00A0: BSF 03.5 |
00A1: BCF 05.0 |
00A2: BCF 03.5 |
00A3: BSF 05.0 |
.................... Delay_us(1500); |
00A4: MOVLW 01 |
00A5: MOVWF 22 |
00A6: CALL 004 |
00A7: MOVLW 02 |
00A8: MOVWF 22 |
00A9: MOVLW F7 |
00AA: MOVWF 23 |
00AB: CALL 019 |
00AC: DECFSZ 22,F |
00AD: GOTO 0A9 |
.................... output_low(servo4); |
00AE: BSF 03.5 |
00AF: GOTO 05F |
00AF: BCF 05.0 |
00B0: BCF 03.5 |
.................... |
.................... While(!input(SW)) |
.................... { |
00B1: BSF 03.5 |
00B2: BSF 06.2 |
00B3: BCF 03.5 |
00B4: BTFSC 06.2 |
00B5: GOTO 123 |
.................... for(i=0; i<100; ++i) |
00B6: CLRF 21 |
00B7: MOVF 21,W |
00B8: SUBLW 63 |
00B9: BTFSS 03.0 |
00BA: GOTO 0EC |
.................... { |
.................... output_high(servo1); |
00BB: BSF 03.5 |
00BC: BCF 06.1 |
00BD: BCF 03.5 |
00BE: BSF 06.1 |
.................... Delay_us(1000); |
00BF: MOVLW 01 |
00C0: MOVWF 22 |
00C1: CALL 004 |
.................... output_low(servo1); |
00B1: BCF 05.0 |
.................... |
.................... Delay_ms(10); |
00B2: MOVLW 0A |
00B3: MOVWF 22 |
00B4: CALL 004 |
.................... } |
00B5: BSF 03.5 |
00B6: GOTO 066 |
00B7: BCF 03.5 |
.................... |
.................... While(!input(SW)) |
.................... { |
00B8: BSF 03.5 |
00B9: BSF 06.2 |
00BA: BCF 03.5 |
00BB: BTFSC 06.2 |
00BC: GOTO 12A |
.................... for(i=0; i<100; ++i) |
00BD: CLRF 21 |
00BE: MOVF 21,W |
00BF: SUBLW 63 |
00C0: BTFSS 03.0 |
00C1: GOTO 0F3 |
.................... { |
.................... output_high(servo1); |
00C2: BSF 03.5 |
00C3: BCF 06.1 |
00C4: BCF 03.5 |
00C5: BCF 06.1 |
.................... |
.................... output_high(servo2); |
00C6: BSF 03.5 |
00C7: BCF 05.3 |
00C8: BCF 03.5 |
00C9: BSF 05.3 |
.................... Delay_us(1000); |
00CA: MOVLW 01 |
00CB: MOVWF 22 |
00CC: CALL 004 |
.................... output_low(servo2); |
00C5: BSF 06.1 |
.................... Delay_us(1000); |
00C6: MOVLW 01 |
00C7: MOVWF 22 |
00C8: CALL 004 |
.................... output_low(servo1); |
00C9: BSF 03.5 |
00CA: BCF 06.1 |
00CB: BCF 03.5 |
00CC: BCF 06.1 |
.................... |
.................... output_high(servo2); |
00CD: BSF 03.5 |
00CE: BCF 05.3 |
00CF: BCF 03.5 |
00D0: BCF 05.3 |
.................... |
.................... output_high(servo3); |
00D1: BSF 03.5 |
00D2: BCF 05.2 |
00D3: BCF 03.5 |
00D4: BSF 05.2 |
.................... Delay_us(1000); |
00D5: MOVLW 01 |
00D6: MOVWF 22 |
00D7: CALL 004 |
.................... output_low(servo3); |
00D0: BSF 05.3 |
.................... Delay_us(1000); |
00D1: MOVLW 01 |
00D2: MOVWF 22 |
00D3: CALL 004 |
.................... output_low(servo2); |
00D4: BSF 03.5 |
00D5: BCF 05.3 |
00D6: BCF 03.5 |
00D7: BCF 05.3 |
.................... |
.................... output_high(servo3); |
00D8: BSF 03.5 |
00D9: BCF 05.2 |
00DA: BCF 03.5 |
00DB: BCF 05.2 |
.................... |
.................... output_high(servo4); |
00DC: BSF 03.5 |
00DD: BCF 05.0 |
00DE: BCF 03.5 |
00DF: BSF 05.0 |
.................... Delay_us(1000); |
00E0: MOVLW 01 |
00E1: MOVWF 22 |
00E2: CALL 004 |
.................... output_low(servo4); |
00DB: BSF 05.2 |
.................... Delay_us(1000); |
00DC: MOVLW 01 |
00DD: MOVWF 22 |
00DE: CALL 004 |
.................... output_low(servo3); |
00DF: BSF 03.5 |
00E0: BCF 05.2 |
00E1: BCF 03.5 |
00E2: BCF 05.2 |
.................... |
.................... output_high(servo4); |
00E3: BSF 03.5 |
00E4: BCF 05.0 |
00E5: BCF 03.5 |
00E6: BCF 05.0 |
.................... |
.................... Delay_ms(10); |
00E7: MOVLW 0A |
00E6: BSF 05.0 |
.................... Delay_us(1000); |
00E7: MOVLW 01 |
00E8: MOVWF 22 |
00E9: CALL 004 |
.................... } |
00EA: INCF 21,F |
00EB: GOTO 0B7 |
.................... |
.................... for(i=0; i<100; ++i) |
00EC: CLRF 21 |
00ED: MOVF 21,W |
00EE: SUBLW 63 |
00EF: BTFSS 03.0 |
00F0: GOTO 122 |
.................... { |
.................... output_high(servo1); |
00F1: BSF 03.5 |
00F2: BCF 06.1 |
00F3: BCF 03.5 |
00F4: BSF 06.1 |
.................... Delay_us(2000); |
00F5: MOVLW 02 |
00F6: MOVWF 22 |
00F7: CALL 004 |
.................... output_low(servo1); |
.................... output_low(servo4); |
00EA: BSF 03.5 |
00EB: BCF 05.0 |
00EC: BCF 03.5 |
00ED: BCF 05.0 |
.................... |
.................... Delay_ms(10); |
00EE: MOVLW 0A |
00EF: MOVWF 22 |
00F0: CALL 004 |
.................... } |
00F1: INCF 21,F |
00F2: GOTO 0BE |
.................... |
.................... for(i=0; i<100; ++i) |
00F3: CLRF 21 |
00F4: MOVF 21,W |
00F5: SUBLW 63 |
00F6: BTFSS 03.0 |
00F7: GOTO 129 |
.................... { |
.................... output_high(servo1); |
00F8: BSF 03.5 |
00F9: BCF 06.1 |
00FA: BCF 03.5 |
00FB: BCF 06.1 |
.................... |
.................... output_high(servo2); |
00FC: BSF 03.5 |
00FD: BCF 05.3 |
00FE: BCF 03.5 |
00FF: BSF 05.3 |
.................... Delay_us(2000); |
0100: MOVLW 02 |
0101: MOVWF 22 |
0102: CALL 004 |
.................... output_low(servo2); |
00FB: BSF 06.1 |
.................... Delay_us(2000); |
00FC: MOVLW 02 |
00FD: MOVWF 22 |
00FE: CALL 004 |
.................... output_low(servo1); |
00FF: BSF 03.5 |
0100: BCF 06.1 |
0101: BCF 03.5 |
0102: BCF 06.1 |
.................... |
.................... output_high(servo2); |
0103: BSF 03.5 |
0104: BCF 05.3 |
0105: BCF 03.5 |
0106: BCF 05.3 |
.................... |
.................... output_high(servo3); |
0107: BSF 03.5 |
0108: BCF 05.2 |
0109: BCF 03.5 |
010A: BSF 05.2 |
.................... Delay_us(2000); |
010B: MOVLW 02 |
010C: MOVWF 22 |
010D: CALL 004 |
.................... output_low(servo3); |
0106: BSF 05.3 |
.................... Delay_us(2000); |
0107: MOVLW 02 |
0108: MOVWF 22 |
0109: CALL 004 |
.................... output_low(servo2); |
010A: BSF 03.5 |
010B: BCF 05.3 |
010C: BCF 03.5 |
010D: BCF 05.3 |
.................... |
.................... output_high(servo3); |
010E: BSF 03.5 |
010F: BCF 05.2 |
0110: BCF 03.5 |
0111: BCF 05.2 |
.................... |
.................... output_high(servo4); |
0112: BSF 03.5 |
0113: BCF 05.0 |
0114: BCF 03.5 |
0115: BSF 05.0 |
.................... Delay_us(2000); |
0116: MOVLW 02 |
0117: MOVWF 22 |
0118: CALL 004 |
.................... output_low(servo4); |
0111: BSF 05.2 |
.................... Delay_us(2000); |
0112: MOVLW 02 |
0113: MOVWF 22 |
0114: CALL 004 |
.................... output_low(servo3); |
0115: BSF 03.5 |
0116: BCF 05.2 |
0117: BCF 03.5 |
0118: BCF 05.2 |
.................... |
.................... output_high(servo4); |
0119: BSF 03.5 |
011A: BCF 05.0 |
011B: BCF 03.5 |
011C: BCF 05.0 |
.................... |
.................... Delay_ms(10); |
011D: MOVLW 0A |
011C: BSF 05.0 |
.................... Delay_us(2000); |
011D: MOVLW 02 |
011E: MOVWF 22 |
011F: CALL 004 |
.................... } |
0120: INCF 21,F |
0121: GOTO 0ED |
.................... } |
0122: GOTO 0B1 |
.................... } |
0123: BSF 03.5 |
0124: GOTO 05F |
.................... output_low(servo4); |
0120: BSF 03.5 |
0121: BCF 05.0 |
0122: BCF 03.5 |
0123: BCF 05.0 |
.................... |
.................... Delay_ms(10); |
0124: MOVLW 0A |
0125: MOVWF 22 |
0126: CALL 004 |
.................... } |
0127: INCF 21,F |
0128: GOTO 0F4 |
.................... } |
0129: GOTO 0B8 |
.................... } |
012A: BSF 03.5 |
012B: GOTO 066 |
.................... |
.................... } |
.................... |
.................... } |
0125: SLEEP |
012C: SLEEP |
Configuration Fuses: |
Word 1: 3F78 NOWDT NOPUT MCLR BROWNOUT NOLVP NOCPD NOWRT NODEBUG CCPB0 NOPROTECT INTRC_IO |
Word 1: 3FF8 NOWDT NOPUT MCLR BROWNOUT LVP NOCPD NOWRT NODEBUG CCPB0 NOPROTECT INTRC_IO |
Word 2: 3FFF FCMEN IESO |
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.PJT |
---|
3,7 → 3,6 |
Development_Mode= |
Processor=0x688F |
ToolSuite=CCS |
Processor_Text=PIC16F88 |
[Directories] |
Include=C:\Program Files\PICC\devices\;C:\Program Files\PICC\dr |
11,7 → 10,7 |
LinkerScript= |
[Target Data] |
FileList=D:\svnKaklik\programy\C\PIC_C\mereni\serva\PIC16F88\tester.c |
FileList=tester.c; |
BuildTool=C-COMPILER |
OptionString=+FM |
AdditionalOptionString= |
32,10 → 31,5 |
0=0000 tester.c 0 0 796 451 3 0 |
[Opened Files] |
1=tester.c |
2=tester.h |
3=C:\Program Files\PICC\devices\16F88.h |
4= |
[Units] |
Count=1 |
1=tester.c (main) |
1=D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.c |
2= |
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.SYM |
---|
1,11 → 1,9 |
004 @WRITE_PROGRAM_MEMORY8.P1 |
004-005 @READ_PROGRAM_MEMORY8.P2 |
015 CCP_1 |
015 CCP_1_LOW |
015 CCP_1_HIGH |
015-016 CCP_1 |
016 CCP_1_HIGH |
021 main.i |
022 @delay_ms1.P1 |
022 main.@SCRATCH1 |
022 main.@SCRATCH |
023 @delay_us1.P1 |
077 @SCRATCH |
078 @SCRATCH |
15,44 → 13,29 |
07B @SCRATCH |
09C.6 C1OUT |
09C.7 C2OUT |
10D-10E @READ_PROGRAM_MEMORY8.P1 |
10D-10E @WRITE_PROGRAM_MEMORY8.P2 |
ROM Allocation: |
0004 @delay_ms1 |
0019 @delay_us1 |
002D main |
002D @cinit |
002C main |
002C @cinit |
User Memory space: |
Project Directory: |
D:\svnKaklik\programy\C\PIC_C\mereni\serva\PIC16F88\ |
Project Files: |
tester.c |
tester.h |
D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.c |
D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.h |
C:\Program Files\PICC\devices\16F88.h |
Units: |
D:\svnKaklik\programy\C\PIC_C\mereni\serva\PIC16F88\tester.c (main) |
Compiler Settings: |
Processor: PIC16F88 |
Pointer Size: 16 |
Pointer Size: 8 |
ADC Range: 0-255 |
Opt Level: 9 |
Short,Int,Long: UNSIGNED: 1,8,16 |
Float,Double: 32,32 |
Short,Int,Long: 1,8,16 |
Output Files: |
Errors: tester.err |
Ext Symbols: tester.esym |
INHX8: tester.hex |
Symbols: tester.sym |
List: tester.lst |
Debug/COFF: tester.cof |
Project: tester.PJT |
Call Tree: tester.tre |
Statistics: tester.sta |
Errors: D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.err |
INHX8: D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.HEX |
Symbols: D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.SYM |
List: D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.LST |
Debug/COFF: D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.cof |
Call Tree: D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.tre |
Statistics: D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.sta |
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.c |
---|
1,4 → 1,4 |
#include "tester.h" |
#include "D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.h" |
#DEFINE servo1 PIN_B1 |
#DEFINE servo2 PIN_A3 |
10,7 → 10,6 |
{ |
int i; |
port_b_pullups(TRUE); |
setup_adc_ports(NO_ANALOGS|VSS_VDD); |
setup_adc(ADC_OFF); |
setup_spi(FALSE); |
20,6 → 19,8 |
setup_comparator(NC_NC_NC_NC); |
setup_vref(FALSE); |
while(true) |
{ |
While(input(SW)) |
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.cof |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.err |
---|
1,2 → 1,0 |
Memory usage: ROM=7% RAM=2% - 2% |
0 Errors, 0 Warnings. |
No Errors |
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.h |
---|
1,5 → 1,5 |
#include <16F88.h> |
#device adc=8 |
#fuses NOWDT,INTRC_IO, NOPUT, MCLR, BROWNOUT, NOLVP, NOCPD, NOWRT, NODEBUG, NOPROTECT, FCMEN, IESO |
#fuses NOWDT,INTRC_IO, NOPUT, MCLR, BROWNOUT, LVP, NOCPD, NOWRT, NODEBUG, NOPROTECT, FCMEN, IESO |
#use delay(clock=4000000) |
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.sta |
---|
1,46 → 1,30 |
ROM used: 294 (7%) |
294 (7%) including unused fragments |
ROM used: 301 (7%) |
301 (7%) including unused fragments |
1 Average locations per line |
5 Average locations per statement |
RAM used: 8 (2%) at main() level |
9 (2%) worst case |
RAM used: 7 (4%) at main() level |
8 (5%) worst case |
Stack used: 1 worst case (out of 8 total available) |
Lines Stmts % Files |
----- ----- --- ----- |
93 58 100 tester.c |
6 0 0 tester.h |
299 0 0 C:\Program Files\PICC\devices\16F88.h |
94 57 100 D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.c |
6 0 0 D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.h |
275 0 0 C:\Program Files\PICC\devices\16F88.h |
----- ----- |
398 58 Total |
750 114 Total |
Page ROM % RAM Vol Diff Functions: |
---- --- --- --- --- ---- ---------- |
0 21 7 1 @delay_ms1 |
0 20 7 1 @delay_us1 |
0 249 85 2 1742 5.4 main |
Page ROM % RAM Functions: |
---- --- --- --- ---------- |
0 21 7 1 @delay_ms1 |
0 19 6 1 @delay_us1 |
0 257 85 2 main |
Program metrics: |
Functions 1 |
Statements 58 |
Comments 79 |
Volume (V) 1747 |
Difficilty (D) 5.3 |
Effort to implement (E) 9291 |
Time to implement (T) 9 minutes |
Est Delivered Bugs (B) 0 |
Cyclomatic Complexity 2 |
Maintainability (MI) 113 |
Segment Used Free |
--------- ---- ---- |
00000-00003 4 0 |
00004-007FF 297 1747 |
00800-00FFF 0 2048 |
Segment Used Free |
----------- ---- ---- |
00000-00003 4 0 |
00004-007FF 290 1754 |
00800-00FFF 0 2048 |
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.tre |
---|
1,14 → 1,14 |
ÀÄtester |
ÀÄmain 0/249 Ram=2 |
ÀÄmain 0/257 Ram=2 |
ÃÄ??0?? |
ÃÄ@delay_ms1 0/21 Ram=1 |
ÃÄ@delay_us1 0/20 Ram=1 |
ÃÄ@delay_us1 0/19 Ram=1 |
ÃÄ@delay_ms1 0/21 Ram=1 |
ÃÄ@delay_us1 0/20 Ram=1 |
ÃÄ@delay_us1 0/19 Ram=1 |
ÃÄ@delay_ms1 0/21 Ram=1 |
ÃÄ@delay_us1 0/20 Ram=1 |
ÃÄ@delay_us1 0/19 Ram=1 |
ÃÄ@delay_ms1 0/21 Ram=1 |
ÃÄ@delay_us1 0/20 Ram=1 |
ÃÄ@delay_us1 0/19 Ram=1 |
ÃÄ@delay_ms1 0/21 Ram=1 |
ÃÄ@delay_ms1 0/21 Ram=1 |
ÃÄ@delay_ms1 0/21 Ram=1 |
/programy/C/PIC_C/mereni/tester serv/PRG.BAT |
---|
0,0 → 1,10 |
@echo off |
picpgr reset PIC16F84 |
picpgr erase PIC16F84 |
pause |
rem cls |
picpgr program blikac.hex hex PIC16f84 LP_ON PWRTE_ON WDTE_OFF CP_OFF |
picpgr run |
pause |
picpgr stop |
pause |
/programy/C/PIC_C/mereni/tester serv/Run.BAT |
---|
0,0 → 1,6 |
@echo off |
picpgr reset PIC16F873 |
picpgr run lpt2 |
pause |
picpgr stop lpt2 |
pause |
/programy/C/PIC_C/mereni/tester serv/ble |
---|
--- C/PIC_C/mereni/tester serv/blikac.BAK (revision 624) |
+++ C/PIC_C/mereni/tester serv/blikac.BAK (revision 623) |
@@ -1,4 +1,4 @@ |
-#include "blikac.h" |
+#include "D:\@Kaklik\programy\PIC_C\prenos\blikac.h" |
#DEFINE SERVO_X PIN_A2 // piny na ktere jsou pripojena serva |
#DEFINE SERVO_Y PIN_B0 |
#DEFINE TL1 PIN_B1 |
@@ -19,12 +19,12 @@ |
output_low(servo_x); |
delay_ms(20); |
} |
- |
+ |
for(i=0;i<=100;i++) |
{ |
output_high(servo_y); |
output_high(servo_x); |
- delay_us(2000); |
+ delay_us(20`00); |
output_low(servo_y); |
output_low(servo_x); |
delay_ms(20); |
@@ -35,6 +35,6 @@ |
delay_us(1500); |
output_low(servo_y); |
output_low(servo_x); |
- delay_ms(20); |
+ delay_ms(20); |
} |
} |
/programy/C/PIC_C/mereni/tester serv/blikac.HEX |
---|
1,23 → 1,21 |
:020000040000FA |
:1000000000308A002B2800001330840000080319F8 |
:10001000172801308D008C018C0B0C288D0B0B28C0 |
:100020004A308C008C0B12281528800B09280034CC |
:1000300012309402031C2A2814308400FC308005FE |
:100040000310800C800C000803192A2828280000BF |
:10005000800B27287E2884011F3083058316861491 |
:100060008312861C6E2892011208643C031C5028DF |
:1000700083160610831206148316051183120515C4 |
:100080000130930004208316061083120610831695 |
:10009000051183120511143093000420920A3428AC |
:1000A00092011208643C031C6D288316061083120B |
:1000B00006148316051183120515023093000420DF |
:1000C000831606108312061083160511831205117C |
:1000D000143093000420920A51282E28831606100B |
:1000E000831206148316051183120515013093003F |
:1000F000042002309300F73094001828930B7B28DB |
:10010000831606108312061083160511831205113B |
:0A0110001430930004202E28630031 |
:1000000000308A00272800001030840000080319FF |
:10001000182801308D008C018C0B0C288D0B0B28BF |
:100020004A308C008C0B122800000000800B09283D |
:10003000003411308400FC308005800C800C0008F6 |
:100040000319262824280000800B23287A288401FD |
:100050001F308305831686148312861C6A288F013D |
:100060000F08643C031C4C288316061083120614E8 |
:1000700083160511831205150130900004208316A4 |
:100080000610831206108316051183120511143011 |
:10009000900004208F0A30288F010F08643C031C55 |
:1000A000692883160610831206148316051183121D |
:1000B00005150230900004208316061083120610E6 |
:1000C00083160511831205111430900004208F0A45 |
:1000D0004D282A288316061083120614831605114C |
:1000E0008312051501309000042002309000EC309E |
:1000F00091001928900B772883160610831206109A |
:1001000083160511831205111430900004202A284B |
:0201100063008A |
:02400E00F93F78 |
:00000001FF |
;PIC16C84 |
;CRC=26BE CREATED="23-I-10 18:21" |
/programy/C/PIC_C/mereni/tester serv/blikac.LST |
---|
1,30 → 1,30 |
CCS PCM C Compiler, Version 4.090, 47914 23-I-10 18:21 |
CCS PCW C Compiler, Version 3.110, 15448 |
Filename: D:\svnKaklik\programy\C\PIC_C\mereni\tester serv\blikac.lst |
Filename: d:\@kaklik\programy\pic_c\prenos\blikac.LST |
ROM used: 141 words (14%) |
Largest free fragment is 883 |
RAM used: 7 (19%) at main() level |
8 (22%) worst case |
ROM used: 137 (13%) |
Largest free fragment is 887 |
RAM used: 4 (11%) at main() level |
5 (14%) worst case |
Stack: 1 locations |
* |
0000: MOVLW 00 |
0001: MOVWF 0A |
0002: GOTO 02B |
0002: GOTO 027 |
0003: NOP |
.................... #include "blikac.h" |
.................... #include <16C84.h> |
.................... //////// Standard Header file for the PIC16C84 device //////////////// |
.................... #device PIC16C84 |
.................... #list |
.................... #include "D:\@Kaklik\programy\PIC_C\prenos\blikac.h" |
.................... #include <16C84.h> |
.................... //////// Standard Header file for the PIC16C84 device //////////////// |
.................... #device PIC16C84 |
.................... #list |
.................... |
.................... #use delay(clock=4000000) |
0004: MOVLW 13 |
.................... #use delay(clock=4000000) |
0004: MOVLW 10 |
0005: MOVWF 04 |
0006: MOVF 00,W |
0007: BTFSC 03.2 |
0008: GOTO 017 |
0008: GOTO 018 |
0009: MOVLW 01 |
000A: MOVWF 0D |
000B: CLRF 0C |
36,169 → 36,163 |
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 |
0014: NOP |
0015: NOP |
0016: DECFSZ 00,F |
0017: GOTO 009 |
0018: RETLW 00 |
0019: MOVLW 11 |
001A: MOVWF 04 |
001B: MOVLW FC |
001C: ANDWF 00,F |
001D: RRF 00,F |
001E: RRF 00,F |
001F: MOVF 00,W |
0020: BTFSC 03.2 |
0021: GOTO 026 |
0022: GOTO 024 |
0023: NOP |
0024: DECFSZ 00,F |
0025: GOTO 023 |
0026: GOTO 07A (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); |
.................... #DEFINE SERVO_X PIN_A2 // piny na ktere jsou pripojena serva |
.................... #DEFINE SERVO_Y PIN_B0 |
.................... #DEFINE TL1 PIN_B1 |
.................... |
.................... void main() |
.................... { |
.................... int i; |
0027: CLRF 04 |
0028: MOVLW 1F |
0029: ANDWF 03,F |
.................... while (true) |
.................... { |
.................... while(input(TL1)) |
002A: BSF 03.5 |
002B: BSF 06.1 |
002C: BCF 03.5 |
002D: BTFSS 06.1 |
002E: GOTO 06A |
.................... { |
.................... for(i=0;i<=100;i++) |
002F: CLRF 0F |
0030: MOVF 0F,W |
0031: SUBLW 64 |
0032: BTFSS 03.0 |
0033: GOTO 04C |
.................... { |
.................... output_high(servo_y); |
0034: BSF 03.5 |
0035: BCF 06.0 |
0036: BCF 03.5 |
0037: BSF 06.0 |
.................... output_high(servo_x); |
0038: BSF 03.5 |
0039: BCF 06.0 |
0039: BCF 05.2 |
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); |
003B: BSF 05.2 |
.................... delay_us(1000); |
003C: MOVLW 01 |
003D: MOVWF 10 |
003E: CALL 004 |
.................... output_low(servo_y); |
003F: BSF 03.5 |
0040: BCF 06.0 |
0041: BCF 03.5 |
0042: BCF 06.0 |
.................... output_low(servo_x); |
0043: BSF 03.5 |
0044: BCF 06.0 |
0044: BCF 05.2 |
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); |
0046: BCF 05.2 |
.................... delay_ms(20); |
0047: MOVLW 14 |
0048: MOVWF 10 |
0049: CALL 004 |
.................... } |
004A: INCF 0F,F |
004B: GOTO 030 |
.................... |
.................... for(i=0;i<=100;i++) |
004C: CLRF 0F |
004D: MOVF 0F,W |
004E: SUBLW 64 |
004F: BTFSS 03.0 |
0050: GOTO 069 |
.................... { |
.................... output_high(servo_y); |
0051: BSF 03.5 |
0052: BCF 06.0 |
0053: BCF 03.5 |
0054: BSF 06.0 |
.................... output_high(servo_x); |
0055: BSF 03.5 |
0056: BCF 06.0 |
0056: BCF 05.2 |
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); |
0058: BSF 05.2 |
.................... delay_us(2000); |
0059: MOVLW 02 |
005A: MOVWF 10 |
005B: CALL 004 |
.................... output_low(servo_y); |
005C: BSF 03.5 |
005D: BCF 06.0 |
005E: BCF 03.5 |
005F: BCF 06.0 |
.................... output_low(servo_x); |
0060: BSF 03.5 |
0061: BCF 06.0 |
0061: BCF 05.2 |
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); |
0063: BCF 05.2 |
.................... delay_ms(20); |
0064: MOVLW 14 |
0065: MOVWF 10 |
0066: CALL 004 |
.................... } |
0067: INCF 0F,F |
0068: GOTO 04D |
.................... } |
0069: GOTO 02A |
.................... output_high(servo_y); |
006A: BSF 03.5 |
006B: BCF 06.0 |
006C: BCF 03.5 |
006D: BSF 06.0 |
.................... output_high(servo_x); |
006E: BSF 03.5 |
006F: BCF 06.0 |
006F: BCF 05.2 |
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); |
0071: BSF 05.2 |
.................... delay_us(1500); |
0072: MOVLW 01 |
0073: MOVWF 10 |
0074: CALL 004 |
0075: MOVLW 02 |
0076: MOVWF 10 |
0077: MOVLW EC |
0078: MOVWF 11 |
0079: GOTO 019 |
007A: DECFSZ 10,F |
007B: GOTO 077 |
.................... output_low(servo_y); |
007C: BSF 03.5 |
007D: BCF 06.0 |
007E: BCF 03.5 |
007F: BCF 06.0 |
.................... output_low(servo_x); |
0080: BSF 03.5 |
0081: BCF 06.0 |
0081: BCF 05.2 |
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 |
0083: BCF 05.2 |
.................... delay_ms(20); |
0084: MOVLW 14 |
0085: MOVWF 10 |
0086: CALL 004 |
.................... } |
0087: GOTO 02A |
.................... } |
.................... |
0088: SLEEP |
/programy/C/PIC_C/mereni/tester serv/blikac.PJT |
---|
3,7 → 3,6 |
Development_Mode= |
Processor=0x6C84 |
ToolSuite=CCS |
Processor_Text=PIC16C84 |
[Directories] |
Include=C:\PROGRAM FILES\PICC\devices\;C:\PROGRAM FILES\PICC\dr |
11,7 → 10,7 |
LinkerScript= |
[Target Data] |
FileList=D:\svnKaklik\programy\C\PIC_C\mereni\tester serv\blikac.c |
FileList=blikac.c; |
BuildTool=C-COMPILER |
OptionString=+FM |
AdditionalOptionString= |
31,10 → 30,3 |
[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 |
---|
1,50 → 1,16 |
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 |
00F main.i |
010 delay_ms.P1 |
010 main.@SCRATCH |
011 delay_us.P1 |
ROM Allocation: |
0004 @delay_ms1 |
0018 @delay_us1 |
002B main |
002B @cinit |
0004 delay_ms |
0019 delay_us |
0027 main |
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 |
d:\@kaklik\programy\pic_c\prenos\blikac.c |
D:\@Kaklik\programy\PIC_C\prenos\blikac.h |
C:\PROGRAM FILES\PICC\devices\16C84.h |
/programy/C/PIC_C/mereni/tester serv/blikac.c |
---|
1,4 → 1,4 |
#include "blikac.h" |
#include "D:\@Kaklik\programy\PIC_C\prenos\blikac.h" |
#DEFINE SERVO_X PIN_A2 // piny na ktere jsou pripojena serva |
#DEFINE SERVO_Y PIN_B0 |
#DEFINE TL1 PIN_B1 |
/programy/C/PIC_C/mereni/tester serv/blikac.err |
---|
1,2 → 1,0 |
Memory usage: ROM=14% RAM=19% - 22% |
0 Errors, 0 Warnings. |
No Errors |
/programy/C/PIC_C/mereni/tester serv/blikac.sta |
---|
1,45 → 1,29 |
ROM used: 141 (14%) |
141 (14%) including unused fragments |
ROM used: 137 (13%) |
887 (87%) including unused fragments |
1 Average locations per line |
5 Average locations per statement |
RAM used: 7 (19%) at main() level |
8 (22%) worst case |
RAM used: 4 (11%) at main() level |
5 (14%) 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 |
41 26 100 d:\@kaklik\programy\pic_c\prenos\blikac.c |
5 0 0 D:\@Kaklik\programy\PIC_C\prenos\blikac.h |
111 0 0 C:\PROGRAM FILES\PICC\devices\16C84.h |
----- ----- |
161 26 Total |
314 52 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 |
Page ROM % RAM Functions: |
---- --- --- --- ---------- |
0 21 15 1 delay_ms |
0 14 10 1 delay_us |
0 98 72 2 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 |
--------- ---- ---- |
0000-0003 4 0 |
0004-03FF 133 887 |
Segment Used Free |
----------- ---- ---- |
00000-00003 4 0 |
00004-003FF 137 883 |
/programy/C/PIC_C/mereni/tester serv/blikac.tre |
---|
1,10 → 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 |
ÃÄdelay_ms 0/21 Ram=1 |
ÃÄdelay_ms 0/21 Ram=1 |
ÃÄdelay_ms 0/21 Ram=1 |
ÃÄdelay_ms 0/21 Ram=1 |
ÃÄdelay_ms 0/21 Ram=1 |
ÃÄdelay_us 0/14 Ram=1 |
ÀÄdelay_ms 0/21 Ram=1 |