Subversion Repositories svnkaklik

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
CCS PCW C Compiler, Version 3.110, 15448
2
 
3
               Filename: d:\@kaklik\programy\pic_c\prenos\blikac.LST
4
 
5
               ROM used: 137 (13%)
6
                         Largest free fragment is 887
7
               RAM used: 4 (11%) at main() level
8
                         5 (14%) worst case
9
               Stack:    1 locations
10
 
11
*
12
0000:  MOVLW  00
13
0001:  MOVWF  0A
14
0002:  GOTO   027
15
0003:  NOP
16
....................  #include "D:\@Kaklik\programy\PIC_C\prenos\blikac.h" 
17
....................  #include <16C84.h> 
18
....................  //////// Standard Header file for the PIC16C84 device ////////////////  
19
.................... #device PIC16C84  
20
.................... #list  
21
....................  
22
.................... #use delay(clock=4000000)  
23
0004:  MOVLW  10
24
0005:  MOVWF  04
25
0006:  MOVF   00,W
26
0007:  BTFSC  03.2
27
0008:  GOTO   018
28
0009:  MOVLW  01
29
000A:  MOVWF  0D
30
000B:  CLRF   0C
31
000C:  DECFSZ 0C,F
32
000D:  GOTO   00C
33
000E:  DECFSZ 0D,F
34
000F:  GOTO   00B
35
0010:  MOVLW  4A
36
0011:  MOVWF  0C
37
0012:  DECFSZ 0C,F
38
0013:  GOTO   012
39
0014:  NOP
40
0015:  NOP
41
0016:  DECFSZ 00,F
42
0017:  GOTO   009
43
0018:  RETLW  00
44
0019:  MOVLW  11
45
001A:  MOVWF  04
46
001B:  MOVLW  FC
47
001C:  ANDWF  00,F
48
001D:  RRF    00,F
49
001E:  RRF    00,F
50
001F:  MOVF   00,W
51
0020:  BTFSC  03.2
52
0021:  GOTO   026
53
0022:  GOTO   024
54
0023:  NOP
55
0024:  DECFSZ 00,F
56
0025:  GOTO   023
57
0026:  GOTO   07A (RETURN)
58
.................... #fuses XT,PUT,NOWDT  
59
....................   
60
....................  
61
.................... #DEFINE  SERVO_X        PIN_A2      // piny na ktere jsou pripojena serva  
62
.................... #DEFINE  SERVO_Y        PIN_B0  
63
.................... #DEFINE  TL1        PIN_B1  
64
....................   
65
.................... void main()  
66
.................... {  
67
....................    int i;  
68
0027:  CLRF   04
69
0028:  MOVLW  1F
70
0029:  ANDWF  03,F
71
....................    while (true)  
72
....................    {  
73
....................      while(input(TL1))  
74
002A:  BSF    03.5
75
002B:  BSF    06.1
76
002C:  BCF    03.5
77
002D:  BTFSS  06.1
78
002E:  GOTO   06A
79
....................      {  
80
....................        for(i=0;i<=100;i++)  
81
002F:  CLRF   0F
82
0030:  MOVF   0F,W
83
0031:  SUBLW  64
84
0032:  BTFSS  03.0
85
0033:  GOTO   04C
86
....................        {  
87
....................         output_high(servo_y);  
88
0034:  BSF    03.5
89
0035:  BCF    06.0
90
0036:  BCF    03.5
91
0037:  BSF    06.0
92
....................         output_high(servo_x);  
93
0038:  BSF    03.5
94
0039:  BCF    05.2
95
003A:  BCF    03.5
96
003B:  BSF    05.2
97
....................         delay_us(1000);  
98
003C:  MOVLW  01
99
003D:  MOVWF  10
100
003E:  CALL   004
101
....................         output_low(servo_y);  
102
003F:  BSF    03.5
103
0040:  BCF    06.0
104
0041:  BCF    03.5
105
0042:  BCF    06.0
106
....................         output_low(servo_x);  
107
0043:  BSF    03.5
108
0044:  BCF    05.2
109
0045:  BCF    03.5
110
0046:  BCF    05.2
111
....................         delay_ms(20);  
112
0047:  MOVLW  14
113
0048:  MOVWF  10
114
0049:  CALL   004
115
....................        }  
116
004A:  INCF   0F,F
117
004B:  GOTO   030
118
....................   
119
....................        for(i=0;i<=100;i++)  
120
004C:  CLRF   0F
121
004D:  MOVF   0F,W
122
004E:  SUBLW  64
123
004F:  BTFSS  03.0
124
0050:  GOTO   069
125
....................        {  
126
....................         output_high(servo_y);  
127
0051:  BSF    03.5
128
0052:  BCF    06.0
129
0053:  BCF    03.5
130
0054:  BSF    06.0
131
....................         output_high(servo_x);  
132
0055:  BSF    03.5
133
0056:  BCF    05.2
134
0057:  BCF    03.5
135
0058:  BSF    05.2
136
....................         delay_us(2000);  
137
0059:  MOVLW  02
138
005A:  MOVWF  10
139
005B:  CALL   004
140
....................         output_low(servo_y);  
141
005C:  BSF    03.5
142
005D:  BCF    06.0
143
005E:  BCF    03.5
144
005F:  BCF    06.0
145
....................         output_low(servo_x);  
146
0060:  BSF    03.5
147
0061:  BCF    05.2
148
0062:  BCF    03.5
149
0063:  BCF    05.2
150
....................         delay_ms(20);  
151
0064:  MOVLW  14
152
0065:  MOVWF  10
153
0066:  CALL   004
154
....................        }  
155
0067:  INCF   0F,F
156
0068:  GOTO   04D
157
....................      }  
158
0069:  GOTO   02A
159
....................      output_high(servo_y);  
160
006A:  BSF    03.5
161
006B:  BCF    06.0
162
006C:  BCF    03.5
163
006D:  BSF    06.0
164
....................      output_high(servo_x);  
165
006E:  BSF    03.5
166
006F:  BCF    05.2
167
0070:  BCF    03.5
168
0071:  BSF    05.2
169
....................      delay_us(1500);  
170
0072:  MOVLW  01
171
0073:  MOVWF  10
172
0074:  CALL   004
173
0075:  MOVLW  02
174
0076:  MOVWF  10
175
0077:  MOVLW  EC
176
0078:  MOVWF  11
177
0079:  GOTO   019
178
007A:  DECFSZ 10,F
179
007B:  GOTO   077
180
....................      output_low(servo_y);  
181
007C:  BSF    03.5
182
007D:  BCF    06.0
183
007E:  BCF    03.5
184
007F:  BCF    06.0
185
....................      output_low(servo_x);  
186
0080:  BSF    03.5
187
0081:  BCF    05.2
188
0082:  BCF    03.5
189
0083:  BCF    05.2
190
....................      delay_ms(20);  
191
0084:  MOVLW  14
192
0085:  MOVWF  10
193
0086:  CALL   004
194
....................    }  
195
0087:  GOTO   02A
196
.................... }  
197
....................  
198
0088:  SLEEP