Subversion Repositories svnkaklik

Compare Revisions

No changes between revisions

Ignore whitespace Rev 409 → Rev 410

/programy/C/PIC_C/mereni/serva/PIC16F84/main.BAK
0,0 → 1,80
#include "D:\@Kaklik\programy\PIC_C\mereni\serva\main.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;
 
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/PIC16F84/main.HEX
0,0 → 1,33
:1000000000308A00272800001030840000080319FF
:10001000182801308D008C018C0B0C288D0B0B28BF
:100020004A308C008C0B122800000000800B09283D
:10003000003411308400FC308005800C800C0008F6
:100040000319262824280000800B2328003484016B
:100050001F308305831685148312851C7B28831625
:100060000512831205160130900004200230900022
:10007000EC3091001920900B38288316051283125A
:100080000512831685118312851501309000042016
:1000900002309000EC3091001920900B4A28831612
:1000A0008511831285118316051183120515013000
:1000B0009000042002309000EC3091001920900B49
:1000C0005C2883160511831205118316051083120F
:1000D000051401309000042002309000EC309100B3
:1000E0001920900B6E2883160510831205100A3014
:1000F000900004202A288316851483128518ED2881
:100100008F010F08633C031CB62883160512831267
:100110000516013090000420831605128312051283
:1001200083168511831285150130900004208316F3
:10013000851183128511831605118312051501306F
:1001400090000420831605118312051183160510F3
:1001500083120514013090000420831605108312C9
:1001600005100A30900004208F0A81288F010F08A3
:10017000633C031CEC28831605128312051602301B
:100180009000042083160512831205128316851130
:100190008312851502309000042083168511831286
:1001A0008511831605118312051502309000042075
:1001B0008316051183120511831605108312051489
:1001C00002309000042083160510831205100A30B7
:0E01D000900004208F0AB7287B282A2863009D
:02400E00F93F78
:00000001FF
;PIC16F84
/programy/C/PIC_C/mereni/serva/PIC16F84/main.LST
0,0 → 1,340
CCS PCW C Compiler, Version 3.110, 15448
 
Filename: d:\@kaklik\programy\pic_c\mereni\serva\main.LST
 
ROM used: 239 (23%)
Largest free fragment is 785
RAM used: 4 (6%) at main() level
5 (7%) worst case
Stack: 1 locations
 
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 027
0003: NOP
.................... #include "D:\@Kaklik\programy\PIC_C\mereni\serva\main.h"
.................... #include <16F84.h>
.................... //////// Standard Header file for the PIC16F84 device ////////////////
.................... #device PIC16F84
.................... #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: RETLW 00
.................... #fuses XT,NOWDT
....................
....................
.................... #DEFINE servo1 PIN_A4
.................... #DEFINE servo2 PIN_A3
.................... #DEFINE servo3 PIN_A2
.................... #DEFINE servo4 PIN_A0
.................... #DEFINE SW PIN_A1
....................
.................... void main()
.................... {
.................... int i;
0027: CLRF 04
0028: MOVLW 1F
0029: ANDWF 03,F
....................
.................... while(true)
.................... {
.................... While(input(SW))
002A: BSF 03.5
002B: BSF 05.1
002C: BCF 03.5
002D: BTFSS 05.1
002E: GOTO 07B
.................... {
.................... output_high(servo1);
002F: BSF 03.5
0030: BCF 05.4
0031: BCF 03.5
0032: BSF 05.4
.................... Delay_us(1500);
0033: MOVLW 01
0034: MOVWF 10
0035: CALL 004
0036: MOVLW 02
0037: MOVWF 10
0038: MOVLW EC
0039: MOVWF 11
003A: CALL 019
003B: DECFSZ 10,F
003C: GOTO 038
.................... output_low(servo1);
003D: BSF 03.5
003E: BCF 05.4
003F: BCF 03.5
0040: BCF 05.4
....................
.................... output_high(servo2);
0041: BSF 03.5
0042: BCF 05.3
0043: BCF 03.5
0044: BSF 05.3
.................... Delay_us(1500);
0045: MOVLW 01
0046: MOVWF 10
0047: CALL 004
0048: MOVLW 02
0049: MOVWF 10
004A: MOVLW EC
004B: MOVWF 11
004C: CALL 019
004D: DECFSZ 10,F
004E: GOTO 04A
.................... output_low(servo2);
004F: BSF 03.5
0050: BCF 05.3
0051: BCF 03.5
0052: BCF 05.3
....................
.................... output_high(servo3);
0053: BSF 03.5
0054: BCF 05.2
0055: BCF 03.5
0056: BSF 05.2
.................... Delay_us(1500);
0057: MOVLW 01
0058: MOVWF 10
0059: CALL 004
005A: MOVLW 02
005B: MOVWF 10
005C: MOVLW EC
005D: MOVWF 11
005E: CALL 019
005F: DECFSZ 10,F
0060: GOTO 05C
.................... output_low(servo3);
0061: BSF 03.5
0062: BCF 05.2
0063: BCF 03.5
0064: BCF 05.2
....................
.................... output_high(servo4);
0065: BSF 03.5
0066: BCF 05.0
0067: BCF 03.5
0068: BSF 05.0
.................... Delay_us(1500);
0069: MOVLW 01
006A: MOVWF 10
006B: CALL 004
006C: MOVLW 02
006D: MOVWF 10
006E: MOVLW EC
006F: MOVWF 11
0070: CALL 019
0071: DECFSZ 10,F
0072: GOTO 06E
.................... output_low(servo4);
0073: BSF 03.5
0074: BCF 05.0
0075: BCF 03.5
0076: BCF 05.0
....................
.................... Delay_ms(10);
0077: MOVLW 0A
0078: MOVWF 10
0079: CALL 004
.................... }
007A: GOTO 02A
....................
.................... While(!input(SW))
007B: BSF 03.5
007C: BSF 05.1
007D: BCF 03.5
007E: BTFSC 05.1
007F: GOTO 0ED
.................... {
.................... for(i=0; i<100; ++i)
0080: CLRF 0F
0081: MOVF 0F,W
0082: SUBLW 63
0083: BTFSS 03.0
0084: GOTO 0B6
.................... {
.................... output_high(servo1);
0085: BSF 03.5
0086: BCF 05.4
0087: BCF 03.5
0088: BSF 05.4
.................... Delay_us(1000);
0089: MOVLW 01
008A: MOVWF 10
008B: CALL 004
.................... output_low(servo1);
008C: BSF 03.5
008D: BCF 05.4
008E: BCF 03.5
008F: BCF 05.4
....................
.................... output_high(servo2);
0090: BSF 03.5
0091: BCF 05.3
0092: BCF 03.5
0093: BSF 05.3
.................... Delay_us(1000);
0094: MOVLW 01
0095: MOVWF 10
0096: CALL 004
.................... output_low(servo2);
0097: BSF 03.5
0098: BCF 05.3
0099: BCF 03.5
009A: BCF 05.3
....................
.................... output_high(servo3);
009B: BSF 03.5
009C: BCF 05.2
009D: BCF 03.5
009E: BSF 05.2
.................... Delay_us(1000);
009F: MOVLW 01
00A0: MOVWF 10
00A1: CALL 004
.................... output_low(servo3);
00A2: BSF 03.5
00A3: BCF 05.2
00A4: BCF 03.5
00A5: BCF 05.2
....................
.................... output_high(servo4);
00A6: BSF 03.5
00A7: BCF 05.0
00A8: BCF 03.5
00A9: BSF 05.0
.................... Delay_us(1000);
00AA: MOVLW 01
00AB: MOVWF 10
00AC: CALL 004
.................... output_low(servo4);
00AD: BSF 03.5
00AE: BCF 05.0
00AF: BCF 03.5
00B0: BCF 05.0
....................
.................... Delay_ms(10);
00B1: MOVLW 0A
00B2: MOVWF 10
00B3: CALL 004
.................... }
00B4: INCF 0F,F
00B5: GOTO 081
....................
.................... for(i=0; i<100; ++i)
00B6: CLRF 0F
00B7: MOVF 0F,W
00B8: SUBLW 63
00B9: BTFSS 03.0
00BA: GOTO 0EC
.................... {
.................... output_high(servo1);
00BB: BSF 03.5
00BC: BCF 05.4
00BD: BCF 03.5
00BE: BSF 05.4
.................... Delay_us(2000);
00BF: MOVLW 02
00C0: MOVWF 10
00C1: CALL 004
.................... output_low(servo1);
00C2: BSF 03.5
00C3: BCF 05.4
00C4: BCF 03.5
00C5: BCF 05.4
....................
.................... output_high(servo2);
00C6: BSF 03.5
00C7: BCF 05.3
00C8: BCF 03.5
00C9: BSF 05.3
.................... Delay_us(2000);
00CA: MOVLW 02
00CB: MOVWF 10
00CC: CALL 004
.................... output_low(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(2000);
00D5: MOVLW 02
00D6: MOVWF 10
00D7: CALL 004
.................... output_low(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(2000);
00E0: MOVLW 02
00E1: MOVWF 10
00E2: CALL 004
.................... output_low(servo4);
00E3: BSF 03.5
00E4: BCF 05.0
00E5: BCF 03.5
00E6: BCF 05.0
....................
.................... Delay_ms(10);
00E7: MOVLW 0A
00E8: MOVWF 10
00E9: CALL 004
.................... }
00EA: INCF 0F,F
00EB: GOTO 0B7
.................... }
00EC: GOTO 07B
.................... }
00ED: GOTO 02A
.................... }
....................
00EE: SLEEP
/programy/C/PIC_C/mereni/serva/PIC16F84/main.PJT
0,0 → 1,35
[PROJECT]
Target=main.HEX
Development_Mode=
Processor=0x684A
ToolSuite=CCS
 
[Directories]
Include=C:\PROGRAM FILES\PICC\devices\;C:\PROGRAM FILES\PICC\dr
Library=
LinkerScript=
 
[Target Data]
FileList=main.c;
BuildTool=C-COMPILER
OptionString=+FM
AdditionalOptionString=
BuildRequired=1
 
[main.c]
Type=4
Path=
FileList=
BuildTool=
OptionString=
AdditionalOptionString=
 
[mru-list]
1=main.c
 
[Windows]
0=0000 main.c 0 0 796 451 3 0
 
[Opened Files]
1=D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F84\main.c
2=
/programy/C/PIC_C/mereni/serva/PIC16F84/main.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\mereni\serva\main.c
D:\@Kaklik\programy\PIC_C\mereni\serva\main.h
C:\PROGRAM FILES\PICC\devices\16F84.h
/programy/C/PIC_C/mereni/serva/PIC16F84/main.c
0,0 → 1,81
#include "D:\@Kaklik\programy\PIC_C\mereni\serva\main.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;
 
 
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/PIC16F84/main.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/serva/PIC16F84/main.err
0,0 → 1,0
No Errors
/programy/C/PIC_C/mereni/serva/PIC16F84/main.h
0,0 → 1,4
#include <16F84.h>
#use delay(clock=4000000)
#fuses XT,NOWDT
 
/programy/C/PIC_C/mereni/serva/PIC16F84/main.sta
0,0 → 1,29
 
ROM used: 239 (23%)
785 (77%) including unused fragments
 
1 Average locations per line
5 Average locations per statement
 
RAM used: 4 (6%) at main() level
5 (7%) worst case
 
Lines Stmts % Files
----- ----- --- -----
81 49 100 d:\@kaklik\programy\pic_c\mereni\serva\main.c
5 0 0 D:\@Kaklik\programy\PIC_C\mereni\serva\main.h
111 0 0 C:\PROGRAM FILES\PICC\devices\16F84.h
----- -----
394 98 Total
 
Page ROM % RAM Functions:
---- --- --- --- ----------
0 21 9 1 delay_ms
0 14 6 1 delay_us
0 200 84 2 main
 
Segment Used Free
--------- ---- ----
0000-0003 4 0
0004-03FF 235 785
 
/programy/C/PIC_C/mereni/serva/PIC16F84/main.tre
0,0 → 1,22
ÀÄmain
ÀÄmain 0/200 Ram=2
ÃÄ??0??
ÃÄdelay_ms 0/21 Ram=1
ÃÄdelay_us 0/14 Ram=1
ÃÄdelay_ms 0/21 Ram=1
ÃÄdelay_us 0/14 Ram=1
ÃÄdelay_ms 0/21 Ram=1
ÃÄdelay_us 0/14 Ram=1
ÃÄdelay_ms 0/21 Ram=1
ÃÄdelay_us 0/14 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_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_ms 0/21 Ram=1
/programy/C/PIC_C/mereni/serva/PIC16F84/prg.bat
0,0 → 1,8
:start
call picpgr stop
call picpgr erase pic16f84
call picpgr program main.hex hex pic16f84
call picpgr run
pause
call picpgr stop
rem goto start
/programy/C/PIC_C/mereni/serva/PIC16F84/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