📄 caminterfaceasm.lst
字号:
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 1
1 # 1 "CamInterfaceAsm.S"
2 # 1 "<built-in>"
1 ;
0
0
2 ; Copyright (C) 2004 John Orlando
3 ;
4 ; AVRcam: a small real-time image processing engine.
5
6 ; This program is free software; you can redistribute it and/or
7 ; modify it under the terms of the GNU General Public
8 ; License as published by the Free Software Foundation; either
9 ; version 2 of the License, or (at your option) any later version.
10
11 ; This program is distributed in the hope that it will be useful,
12 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ; General Public License for more details.
15
16 ; You should have received a copy of the GNU General Public
17 ; License along with this program; if not, write to the Free Software
18 ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
20 ; For more information on the AVRcam, please contact:
21
22 ; john@jrobot.net
23
24 ; or go to www.jrobot.net for more details regarding the system.
25 ;**********************************************************************
26 ; Module Name: CanInterfaceAsm.S
27 ; Module Date: 04/14/2004
28 ; Module Auth: John Orlando
29 ;
30 ; Description: This module provides the low-level interface
31 ; to the OV6620 camera hardware. It is responsible for
32 ; acquiring each pixel block (R,G,B), performing the mapping
33 ; into an actual color (orange, purple, etc), run-length
34 ; encoding the data, and storing the info off to the appropriate
35 ; line buffer. This routine is synchronized with the pixel data
36 ; so that no polling of the camera data needs to be done (the
37 ; OV6620 is clocked off of the same crystal source as the mega8,
38 ; thus providing inherent synchronization between the two).
39 ;
40 ; Revision History:
41 ; Date Rel Ver. Notes
42 ; 4/10/2004 0.1 Module created
43 ; 6/30/2004 1.0 Initial release for Circuit Cellar
44 ; contest.
45 ; 1/16/2005 1.4 Fixed issue with the TCCR1B register
46 ; where PCLK was getting routed to the
47 ; timer1 even when it wasn't needed.
48 ; This caused excessive counter overflow
49 ; interrupts, and caused problems. Now,
50 ; the "PCLK" pipe feeds timer1 when needed,
51 ; and is turned off when it isn't needed.
52
53 #include <avr/io.h>
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 2
1 /* Copyright (c) 2002,2003 Marek Michalkiewicz, Joerg Wunsch
2 All rights reserved.
3
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions are met:
6
7 * Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in
11 the documentation and/or other materials provided with the
12 distribution.
13
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
18 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 POSSIBILITY OF SUCH DAMAGE. */
25
26 /* $Id: io.h,v 1.10 2003/02/28 23:03:40 marekm Exp $ */
27
28 /** \defgroup avr_io AVR device-specific IO definitions
29 \code #include <avr/io.h> \endcode
30
31 This header file includes the apropriate IO definitions for the
32 device that has been specified by the <tt>-mmcu=</tt> compiler
33 command-line switch. This is done by diverting to the appropriate
34 file <tt><avr/io</tt><em>XXXX</em><tt>.h></tt> which should
35 never be included directly. Some register names common to all
36 AVR devices are defined directly within <tt><avr/io.h></tt>,
37 but most of the details come from the respective include file.
38
39 Note that this file always includes
40 \code #include <avr/sfr_defs.h> \endcode
41 See \ref avr_sfr for the details.
42
43 Included are definitions of the IO register set and their
44 respective bit values as specified in the Atmel documentation.
45 Note that Atmel is not very consistent in its naming conventions,
46 so even identical functions sometimes get different names on
47 different devices.
48
49 Also included are the specific names useable for interrupt
50 function definitions as documented
51 \ref avr_signames "here".
52
53 Finally, the following macros are defined:
54
55 - \b RAMEND
56 <br>
57 A constant describing the last on-chip RAM location.
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 3
58 <br>
59 - \b XRAMEND
60 <br>
61 A constant describing the last possible location in RAM.
62 This is equal to RAMEND for devices that do not allow for
63 external RAM.
64 <br>
65 - \b E2END
66 <br>
67 A constant describing the address of the last EEPROM cell.
68 <br>
69 - \b FLASHEND
70 <br>
71 A constant describing the last byte address in flash ROM.
72 <br>
73 - \b SPM_PAGESIZE
74 <br>
75 For devices with bootloader support, the flash pagesize
76 (in bytes) to be used for the \c SPM instruction. */
77
78 #ifndef _AVR_IO_H_
79 #define _AVR_IO_H_
80
81 #include <avr/sfr_defs.h>
1 /* Copyright (c) 2002, Marek Michalkiewicz <marekm@amelek.gda.pl>
2 All rights reserved.
3
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions are met:
6
7 * Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in
11 the documentation and/or other materials provided with the
12 distribution.
13
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
18 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 POSSIBILITY OF SUCH DAMAGE. */
25
26 /* avr/sfr_defs.h - macros for accessing AVR special function registers */
27
28 /* $Id: sfr_defs.h,v 1.10 2003/08/11 21:42:13 troth Exp $ */
29
30 #ifndef _AVR_SFR_DEFS_H_
31 #define _AVR_SFR_DEFS_H_ 1
32
33 /** \defgroup avr_sfr_notes Additional notes from <avr/sfr_defs.h>
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s page 4
34 \ingroup avr_sfr
35
36 The \c <avr/sfr_defs.h> file is included by all of the \c <avr/ioXXXX.h>
37 files, which use macros defined here to make the special function register
38 definitions look like C variables or simple constants, depending on the
39 <tt>_SFR_ASM_COMPAT</tt> define. Some examples from \c <avr/iom128.h> to
40 show how to define such macros:
41
42 \code
43 #define PORTA _SFR_IO8(0x1b)
44 #define TCNT1 _SFR_IO16(0x2c)
45 #define PORTF _SFR_MEM8(0x61)
46 #define TCNT3 _SFR_MEM16(0x88)
47 \endcode
48
49 If \c _SFR_ASM_COMPAT is not defined, C programs can use names like
50 <tt>PORTA</tt> directly in C expressions (also on the left side of
51 assignment operators) and GCC will do the right thing (use short I/O
52 instructions if possible). The \c __SFR_OFFSET definition is not used in
53 any way in this case.
54
55 Define \c _SFR_ASM_COMPAT as 1 to make these names work as simple constants
56 (addresses of the I/O registers). This is necessary when included in
57 preprocessed assembler (*.S) source files, so it is done automatically if
58 \c __ASSEMBLER__ is defined. By default, all addresses are defined as if
59 they were memory addresses (used in \c lds/sts instructions). To use these
60 addresses in \c in/out instructions, you must subtract 0x20 from them.
61
62 For more backwards compatibility, insert the following at the start of your
63 old assembler source file:
64
65 \code
66 #define __SFR_OFFSET 0
67 \endcode
68
69 This automatically subtracts 0x20 from I/O space addresses, but it's a
70 hack, so it is recommended to change your source: wrap such addresses in
71 macros defined here, as shown below. After this is done, the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -