Subversion Repositories svnkaklik

Compare Revisions

Ignore whitespace Rev 623 → Rev 624

/programy/C/PIC_C/mereni/serva/PIC16F88/tester.BAK
1,93 → 1,5
#include "D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.h"
#include <16F88.h>
#device adc=8
#fuses NOWDT,INTRC_IO, NOPUT, MCLR, BROWNOUT, LVP, NOCPD, NOWRT, NODEBUG, NOPROTECT, FCMEN, IESO
#use delay(clock=4000000)
 
#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,41 → 1,42
: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
: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
:00000001FF
;PIC16F88
;CRC=BB1D CREATED="23-I-10 18:05"
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.LST
1,420 → 1,411
CCS PCM C Compiler, Version 3.221, 27853 27-XI-05 00:06
CCS PCM C Compiler, Version 4.090, 47914 23-I-10 18:05
 
Filename: D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.LST
Filename: D:\svnKaklik\programy\C\PIC_C\mereni\serva\PIC16F88\tester.lst
 
ROM used: 301 words (7%)
ROM used: 294 words (7%)
Largest free fragment is 2048
RAM used: 7 (4%) at main() level
8 (5%) worst case
RAM used: 8 (2%) at main() level
9 (2%) worst case
Stack: 1 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 02C
0002: GOTO 02D
0003: NOP
.................... #include "D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.h"
.................... #include <16F88.h>
.................... //////// Standard Header file for the PIC16F88 device ////////////////
.................... #device PIC16F88
.................... #list
.................... #include "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, LVP, NOCPD, NOWRT, NODEBUG, NOPROTECT, FCMEN, IESO
.................... #use delay(clock=4000000)
.................... #device adc=8
.................... #fuses NOWDT,INTRC_IO, NOPUT, MCLR, BROWNOUT, NOLVP, NOCPD, NOWRT, NODEBUG, NOPROTECT, FCMEN, IESO
.................... #use delay(clock=4000000)
0004: MOVLW 22
0005: MOVWF 04
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
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
0016: DECFSZ 00,F
0017: GOTO 009
0017: GOTO 00A
0018: RETLW 00
0019: MOVLW 12
001A: SUBWF 23,F
001B: BTFSS 03.0
001C: GOTO 02B
001C: GOTO 02C
001D: MOVLW 23
001E: MOVWF 04
001F: MOVLW FC
0020: ANDWF 00,F
0021: BCF 03.0
0022: RRF 00,F
001F: BCF 03.7
0020: MOVLW FC
0021: ANDWF 00,F
0022: BCF 03.0
0023: RRF 00,F
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
....................
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
....................
....................
.................... #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);
....................
....................
.................... #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);
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: BCF 14.5
.................... setup_spi(FALSE);
0044: CLRF 14
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
0045: BSF 03.5
0046: BCF 06.2
0047: BSF 06.1
0048: BCF 06.4
0049: MOVLW 00
0046: MOVF 01,W
0047: ANDLW C7
0048: IORLW 08
0049: MOVWF 01
.................... setup_timer_1(T1_DISABLED);
004A: BCF 03.5
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);
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
.................... }
00AE: BSF 03.5
00AF: BCF 05.0
00AF: GOTO 05F
00B0: BCF 03.5
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);
....................
.................... 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);
00C2: BSF 03.5
00C3: BCF 06.1
00C4: BCF 03.5
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);
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);
00CD: BSF 03.5
00CE: BCF 05.3
00CF: BCF 03.5
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);
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);
00D8: BSF 03.5
00D9: BCF 05.2
00DA: BCF 03.5
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);
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);
00E3: BSF 03.5
00E4: BCF 05.0
00E5: BCF 03.5
00E6: BSF 05.0
.................... Delay_us(1000);
00E7: MOVLW 01
00E6: BCF 05.0
....................
.................... Delay_ms(10);
00E7: MOVLW 0A
00E8: MOVWF 22
00E9: CALL 004
.................... 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);
.................... }
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);
00F8: BSF 03.5
00F9: BCF 06.1
00FA: BCF 03.5
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);
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);
0103: BSF 03.5
0104: BCF 05.3
0105: BCF 03.5
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);
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);
010E: BSF 03.5
010F: BCF 05.2
0110: BCF 03.5
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);
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);
0119: BSF 03.5
011A: BCF 05.0
011B: BCF 03.5
011C: BSF 05.0
.................... Delay_us(2000);
011D: MOVLW 02
011C: BCF 05.0
....................
.................... Delay_ms(10);
011D: MOVLW 0A
011E: MOVWF 22
011F: CALL 004
.................... 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
....................
.................... }
.................... }
0120: INCF 21,F
0121: GOTO 0ED
.................... }
0122: GOTO 0B1
.................... }
0123: BSF 03.5
0124: GOTO 05F
....................
012C: SLEEP
.................... }
0125: SLEEP
 
Configuration Fuses:
Word 1: 3FF8 NOWDT NOPUT MCLR BROWNOUT LVP NOCPD NOWRT NODEBUG CCPB0 NOPROTECT INTRC_IO
Word 1: 3F78 NOWDT NOPUT MCLR BROWNOUT NOLVP NOCPD NOWRT NODEBUG CCPB0 NOPROTECT INTRC_IO
Word 2: 3FFF FCMEN IESO
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.PJT
3,6 → 3,7
Development_Mode=
Processor=0x688F
ToolSuite=CCS
Processor_Text=PIC16F88
 
[Directories]
Include=C:\Program Files\PICC\devices\;C:\Program Files\PICC\dr
10,7 → 11,7
LinkerScript=
 
[Target Data]
FileList=tester.c;
FileList=D:\svnKaklik\programy\C\PIC_C\mereni\serva\PIC16F88\tester.c
BuildTool=C-COMPILER
OptionString=+FM
AdditionalOptionString=
31,5 → 32,10
0=0000 tester.c 0 0 796 451 3 0
 
[Opened Files]
1=D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.c
2=
1=tester.c
2=tester.h
3=C:\Program Files\PICC\devices\16F88.h
4=
[Units]
Count=1
1=tester.c (main)
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.SYM
1,9 → 1,11
004 @WRITE_PROGRAM_MEMORY8.P1
004-005 @READ_PROGRAM_MEMORY8.P2
015 CCP_1
015 CCP_1_LOW
015-016 CCP_1
016 CCP_1_HIGH
015 CCP_1_HIGH
021 main.i
022 @delay_ms1.P1
022 main.@SCRATCH
022 main.@SCRATCH1
023 @delay_us1.P1
077 @SCRATCH
078 @SCRATCH
13,29 → 15,44
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
002C main
002C @cinit
002D main
002D @cinit
 
 
User Memory space:
 
Project Directory:
D:\svnKaklik\programy\C\PIC_C\mereni\serva\PIC16F88\
 
Project Files:
D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.c
D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.h
tester.c
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: 8
Pointer Size: 16
ADC Range: 0-255
Opt Level: 9
Short,Int,Long: 1,8,16
Short,Int,Long: UNSIGNED: 1,8,16
Float,Double: 32,32
 
Output Files:
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
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
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.c
1,4 → 1,4
#include "D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.h"
#include "tester.h"
 
#DEFINE servo1 PIN_B1
#DEFINE servo2 PIN_A3
10,6 → 10,7
{
int i;
 
port_b_pullups(TRUE);
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_OFF);
setup_spi(FALSE);
19,8 → 20,6
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,0 → 0,0
No Errors
Memory usage: ROM=7% RAM=2% - 2%
0 Errors, 0 Warnings.
/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, LVP, NOCPD, NOWRT, NODEBUG, NOPROTECT, FCMEN, IESO
#fuses NOWDT,INTRC_IO, NOPUT, MCLR, BROWNOUT, NOLVP, NOCPD, NOWRT, NODEBUG, NOPROTECT, FCMEN, IESO
#use delay(clock=4000000)
 
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.sta
1,30 → 1,46
 
ROM used: 301 (7%)
301 (7%) including unused fragments
ROM used: 294 (7%)
294 (7%) including unused fragments
 
1 Average locations per line
5 Average locations per statement
 
RAM used: 7 (4%) at main() level
8 (5%) worst case
RAM used: 8 (2%) at main() level
9 (2%) worst case
 
Stack used: 1 worst case (out of 8 total available)
 
Lines Stmts % Files
----- ----- --- -----
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
93 58 100 tester.c
6 0 0 tester.h
299 0 0 C:\Program Files\PICC\devices\16F88.h
----- -----
750 114 Total
398 58 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 7 1 @delay_ms1
0 19 6 1 @delay_us1
0 257 85 2 main
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
 
Segment Used Free
--------- ---- ----
00000-00003 4 0
00004-007FF 297 1747
00800-00FFF 0 2048
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 290 1754
00800-00FFF 0 2048
 
 
 
/programy/C/PIC_C/mereni/serva/PIC16F88/tester.tre
1,14 → 1,14
ÀÄtester
ÀÄmain 0/257 Ram=2
ÀÄmain 0/249 Ram=2
ÃÄ??0??
ÃÄ@delay_ms1 0/21 Ram=1
ÃÄ@delay_us1 0/19 Ram=1
ÃÄ@delay_us1 0/20 Ram=1
ÃÄ@delay_ms1 0/21 Ram=1
ÃÄ@delay_us1 0/19 Ram=1
ÃÄ@delay_us1 0/20 Ram=1
ÃÄ@delay_ms1 0/21 Ram=1
ÃÄ@delay_us1 0/19 Ram=1
ÃÄ@delay_us1 0/20 Ram=1
ÃÄ@delay_ms1 0/21 Ram=1
ÃÄ@delay_us1 0/19 Ram=1
ÃÄ@delay_us1 0/20 Ram=1
ÃÄ@delay_ms1 0/21 Ram=1
ÃÄ@delay_ms1 0/21 Ram=1
ÃÄ@delay_ms1 0/21 Ram=1