/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 |
---|
--- blikac.BAK (nonexistent) |
+++ blikac.BAK (revision 410) |
@@ -0,0 +1,40 @@ |
+#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 |
+ |
+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(20`00); |
+ 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,21 |
:1000000000308A00272800001030840000080319FF |
:10001000182801308D008C018C0B0C288D0B0B28BF |
:100020004A308C008C0B122800000000800B09283D |
:10003000003411308400FC308005800C800C0008F6 |
:100040000319262824280000800B23287A288401FD |
:100050001F308305831686148312861C6A288F013D |
:100060000F08643C031C4C288316061083120614E8 |
:1000700083160511831205150130900004208316A4 |
:100080000610831206108316051183120511143011 |
:10009000900004208F0A30288F010F08643C031C55 |
:1000A000692883160610831206148316051183121D |
:1000B00005150230900004208316061083120610E6 |
:1000C00083160511831205111430900004208F0A45 |
:1000D0004D282A288316061083120614831605114C |
:1000E0008312051501309000042002309000EC309E |
:1000F00091001928900B772883160610831206109A |
:1001000083160511831205111430900004202A284B |
:0201100063008A |
:02400E00F93F78 |
:00000001FF |
;PIC16C84 |
/programy/C/PIC_C/mereni/tester serv/blikac.LST |
---|
0,0 → 1,198 |
CCS PCW C Compiler, Version 3.110, 15448 |
Filename: d:\@kaklik\programy\pic_c\prenos\blikac.LST |
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 027 |
0003: NOP |
.................... #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 10 |
0005: MOVWF 04 |
0006: MOVF 00,W |
0007: BTFSC 03.2 |
0008: GOTO 018 |
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: 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() |
.................... { |
.................... 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 05.2 |
003A: BCF 03.5 |
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 05.2 |
0045: BCF 03.5 |
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 05.2 |
0057: BCF 03.5 |
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 05.2 |
0062: BCF 03.5 |
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 05.2 |
0070: BCF 03.5 |
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 05.2 |
0082: BCF 03.5 |
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 |
---|
0,0 → 1,32 |
[PROJECT] |
Target=blikac.HEX |
Development_Mode= |
Processor=0x6C84 |
ToolSuite=CCS |
[Directories] |
Include=C:\PROGRAM FILES\PICC\devices\;C:\PROGRAM FILES\PICC\dr |
Library= |
LinkerScript= |
[Target Data] |
FileList=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 |
/programy/C/PIC_C/mereni/tester serv/blikac.SYM |
---|
0,0 → 1,16 |
00C @SCRATCH |
00D @SCRATCH |
00D _RETURN_ |
00F main.i |
010 delay_ms.P1 |
010 main.@SCRATCH |
011 delay_us.P1 |
0004 delay_ms |
0019 delay_us |
0027 main |
Project Files: |
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 |
---|
0,0 → 1,40 |
#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 |
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.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.err |
---|
0,0 → 1,0 |
No Errors |
/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/blikac.sta |
---|
0,0 → 1,29 |
ROM used: 137 (13%) |
887 (87%) including unused fragments |
1 Average locations per line |
5 Average locations per statement |
RAM used: 4 (11%) at main() level |
5 (14%) worst case |
Lines Stmts % Files |
----- ----- --- ----- |
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 |
----- ----- |
314 52 Total |
Page ROM % RAM Functions: |
---- --- --- --- ---------- |
0 21 15 1 delay_ms |
0 14 10 1 delay_us |
0 98 72 2 main |
Segment Used Free |
--------- ---- ---- |
0000-0003 4 0 |
0004-03FF 133 887 |
/programy/C/PIC_C/mereni/tester serv/blikac.tre |
---|
0,0 → 1,10 |
ÀÄblikac |
ÀÄmain 0/98 Ram=2 |
ÃÄ??0?? |
ÃÄ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 |
/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 |