Subversion Repositories svnkaklik

Rev

Rev 199 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 199 Rev 251
Line 1... Line 1...
1
CCS PCM C Compiler, Version 3.245, 27853               10-III-07 23:23
1
CCS PCM C Compiler, Version 3.245, 27853               22-IV-07 16:12
2
 
2
 
3
               Filename: D:\KAKLIK\projekty\programy\PIC_C\PICcam\873\camerus.lst
3
               Filename: D:\KAKLIK\projekty\programy\PIC_C\PICcam\873\camerus.lst
4
 
4
 
5
               ROM used: 194 words (5%)
5
               ROM used: 194 words (5%)
6
                         Largest free fragment is 2048
6
                         Largest free fragment is 2048
Line 75... Line 75...
75
0042:  BCF    03.5
75
0042:  BCF    03.5
76
0043:  MOVWF  25
76
0043:  MOVWF  25
77
....................  
77
....................  
78
....................  
78
....................  
79
....................  
79
....................  
-
 
80
.................... #define  CAMERA_ADR   0xC4 
-
 
81
....................  
80
....................  
82
....................  
81
.................... void main() 
83
.................... void main() 
82
.................... { 
84
.................... { 
83
*
85
*
84
0029:  CLRF   04
86
0029:  CLRF   04
Line 145... Line 147...
145
0060:  MOVF   25,W
147
0060:  MOVF   25,W
146
0061:  BSF    03.5
148
0061:  BSF    03.5
147
0062:  MOVWF  07
149
0062:  MOVWF  07
148
0063:  BCF    03.5
150
0063:  BCF    03.5
149
0064:  BCF    07.6
151
0064:  BCF    07.6
150
....................     
152
....................  
151
....................    Delay_ms(200); 
153
....................    Delay_ms(200); 
152
0065:  MOVLW  C8
154
0065:  MOVLW  C8
153
0066:  MOVWF  26
155
0066:  MOVWF  26
154
0067:  CALL   004
156
0067:  CALL   004
155
....................    output_low(PIN_C0); 
157
....................    output_low(PIN_C0); 
Line 174... Line 176...
174
....................    i2c_start();      // Reset 
176
....................    i2c_start();      // Reset 
175
0077:  BSF    03.5
177
0077:  BSF    03.5
176
0078:  BSF    11.0
178
0078:  BSF    11.0
177
0079:  BTFSC  11.0
179
0079:  BTFSC  11.0
178
007A:  GOTO   079
180
007A:  GOTO   079
179
....................    i2c_write(0xC0); 
181
....................    i2c_write(CAMERA_ADR); 
180
007B:  MOVLW  C0
182
007B:  MOVLW  C4
181
007C:  BCF    03.5
183
007C:  BCF    03.5
182
007D:  MOVWF  26
184
007D:  MOVWF  26
183
007E:  CALL   019
185
007E:  CALL   019
184
....................    i2c_write(0x12); 
186
....................    i2c_write(0x12); 
185
007F:  MOVLW  12
187
007F:  MOVLW  12
Line 195... Line 197...
195
0087:  BTFSC  11.2
197
0087:  BTFSC  11.2
196
0088:  GOTO   087
198
0088:  GOTO   087
197
....................  
199
....................  
198
.................... // **** Write data => Adr($13) = 0x05 **** 
200
.................... // **** Write data => Adr($13) = 0x05 **** 
199
.................... // This will tri-state the Y and UV busses on the OV6620, which 
201
.................... // This will tri-state the Y and UV busses on the OV6620, which 
200
.................... // will allow re-programming of the mega8 to proceed at startup 
202
.................... // will allow re-programming of the atmega8 to proceed at startup 
201
.................... // if needed. 
203
.................... // if needed. 
202
....................  
204
....................  
203
....................    i2c_start();       
205
....................    i2c_start(); 
204
0089:  BSF    11.0
206
0089:  BSF    11.0
205
008A:  BTFSC  11.0
207
008A:  BTFSC  11.0
206
008B:  GOTO   08A
208
008B:  GOTO   08A
207
....................    i2c_write(0xC0); 
209
....................    i2c_write(CAMERA_ADR); 
208
008C:  MOVLW  C0
210
008C:  MOVLW  C4
209
008D:  BCF    03.5
211
008D:  BCF    03.5
210
008E:  MOVWF  26
212
008E:  MOVWF  26
211
008F:  CALL   019
213
008F:  CALL   019
212
....................    i2c_write(0x13); 
214
....................    i2c_write(0x13); 
213
0090:  MOVLW  13
215
0090:  MOVLW  13
Line 220... Line 222...
220
....................    i2c_stop(); 
222
....................    i2c_stop(); 
221
0096:  BSF    03.5
223
0096:  BSF    03.5
222
0097:  BSF    11.2
224
0097:  BSF    11.2
223
0098:  BTFSC  11.2
225
0098:  BTFSC  11.2
224
0099:  GOTO   098
226
0099:  GOTO   098
225
....................     
227
....................  
226
....................    Delay_ms(250); 
228
....................    Delay_ms(250); 
227
009A:  MOVLW  FA
229
009A:  MOVLW  FA
228
009B:  BCF    03.5
230
009B:  BCF    03.5
229
009C:  MOVWF  26
231
009C:  MOVWF  26
230
009D:  CALL   004
232
009D:  CALL   004
231
....................  
233
....................  
232
.................... //**** Write data => Adr($3F) = 0x42 **** 
234
.................... //**** Write data => Adr($3F) = 0x42 **** 
233
.................... // This will turn on the external clock for the mega8 to use. 
235
.................... // This will turn on the external clock for the atmega8 to use. 
234
....................  
236
....................  
235
....................    i2c_start();      
237
....................    i2c_start(); 
236
009E:  BSF    03.5
238
009E:  BSF    03.5
237
009F:  BSF    11.0
239
009F:  BSF    11.0
238
00A0:  BTFSC  11.0
240
00A0:  BTFSC  11.0
239
00A1:  GOTO   0A0
241
00A1:  GOTO   0A0
240
....................    i2c_write(0xC0); 
242
....................    i2c_write(CAMERA_ADR); 
241
00A2:  MOVLW  C0
243
00A2:  MOVLW  C4
242
00A3:  BCF    03.5
244
00A3:  BCF    03.5
243
00A4:  MOVWF  26
245
00A4:  MOVWF  26
244
00A5:  CALL   019
246
00A5:  CALL   019
245
....................    i2c_write(0x3F); 
247
....................    i2c_write(0x3F); 
246
00A6:  MOVLW  3F
248
00A6:  MOVLW  3F
Line 253... Line 255...
253
....................    i2c_stop(); 
255
....................    i2c_stop(); 
254
00AC:  BSF    03.5
256
00AC:  BSF    03.5
255
00AD:  BSF    11.2
257
00AD:  BSF    11.2
256
00AE:  BTFSC  11.2
258
00AE:  BTFSC  11.2
257
00AF:  GOTO   0AE
259
00AF:  GOTO   0AE
258
....................     
260
....................  
259
.................... // Wait for a short amount of time for the external clock 
261
.................... // Wait for a short amount of time for the external clock 
260
.................... // to stabilize    
262
.................... // to stabilize 
261
....................  
263
....................  
262
....................    Delay_ms(250); 
264
....................    Delay_ms(250); 
263
00B0:  MOVLW  FA
265
00B0:  MOVLW  FA
264
00B1:  BCF    03.5
266
00B1:  BCF    03.5
265
00B2:  MOVWF  26
267
00B2:  MOVWF  26
Line 271... Line 273...
271
00B5:  MOVF   25,W
273
00B5:  MOVF   25,W
272
00B6:  BSF    03.5
274
00B6:  BSF    03.5
273
00B7:  MOVWF  07
275
00B7:  MOVWF  07
274
00B8:  BCF    03.5
276
00B8:  BCF    03.5
275
00B9:  BCF    07.0
277
00B9:  BCF    07.0
276
....................     
278
....................  
277
.................... // turn on the mega8 by releasing the reset line 
279
.................... // turn on the mega8 by releasing the reset line 
278
....................    output_high(PIN_C6); 
280
....................    output_high(PIN_C6); 
279
00BA:  BCF    25.6
281
00BA:  BCF    25.6
280
00BB:  MOVF   25,W
282
00BB:  MOVF   25,W
281
00BC:  BSF    03.5
283
00BC:  BSF    03.5