⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 caminterfaceasm.lst

📁 he AVRcam source files were built using the WinAVR distribution (version 3.3.1 of GCC). I haven t t
💻 LST
📖 第 1 页 / 共 5 页
字号:
  97               	
  98               	#define WDTCR	_SFR_IO8(0x21)
  99               	#define ASSR	_SFR_IO8(0x22)
 100               	
 101               	/* Timer 2 */
 102               	#define OCR2	_SFR_IO8(0x23)
 103               	#define TCNT2	_SFR_IO8(0x24)
 104               	#define TCCR2	_SFR_IO8(0x25)
 105               	
 106               	/* Timer 1 */
 107               	#define ICR1	_SFR_IO16(0x26)
 108               	#define ICR1L	_SFR_IO8(0x26)
 109               	#define ICR1H	_SFR_IO8(0x27)
 110               	#define OCR1B	_SFR_IO16(0x28)
 111               	#define OCR1BL	_SFR_IO8(0x28)
 112               	#define OCR1BH	_SFR_IO8(0x29)
 113               	#define OCR1A	_SFR_IO16(0x2A)
 114               	#define OCR1AL	_SFR_IO8(0x2A)
 115               	#define OCR1AH	_SFR_IO8(0x2B)
 116               	#define TCNT1	_SFR_IO16(0x2C)
 117               	#define TCNT1L	_SFR_IO8(0x2C)
 118               	#define TCNT1H	_SFR_IO8(0x2D)
 119               	#define TCCR1B	_SFR_IO8(0x2E)
 120               	#define TCCR1A	_SFR_IO8(0x2F)
 121               	
 122               	#define SFIOR	_SFR_IO8(0x30)
 123               	
 124               	#define OSCCAL	_SFR_IO8(0x31)
 125               	
 126               	/* Timer 0 */
 127               	#define TCNT0	_SFR_IO8(0x32)
 128               	#define TCCR0	_SFR_IO8(0x33)
 129               	
 130               	#define MCUCSR	_SFR_IO8(0x34)
 131               	#define MCUCR	_SFR_IO8(0x35)
 132               	
 133               	#define TWCR	_SFR_IO8(0x36)
 134               	
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s 			page 9


 135               	#define SPMCR	_SFR_IO8(0x37)
 136               	
 137               	#define TIFR	_SFR_IO8(0x38)
 138               	#define TIMSK	_SFR_IO8(0x39)
 139               	
 140               	#define GIFR	_SFR_IO8(0x3A)
 141               	#define GIMSK	_SFR_IO8(0x3B)
 142               	#define GICR	_SFR_IO8(0x3B)   /* Changed in 2486H-AVR-09/02 */
 143               	
 144               	/* 0x3C reserved (OCR0?) */
 145               	
 146               	/* 0x3D..0x3E SP */
 147               	
 148               	/* 0x3F SREG */
 149               	
 150               	/* Interrupt vectors */
 151               	
 152               	#define SIG_INTERRUPT0		_VECTOR(1)
 153               	#define SIG_INTERRUPT1		_VECTOR(2)
 154               	#define SIG_OUTPUT_COMPARE2	_VECTOR(3)
 155               	#define SIG_OVERFLOW2		_VECTOR(4)
 156               	#define SIG_INPUT_CAPTURE1	_VECTOR(5)
 157               	#define SIG_OUTPUT_COMPARE1A	_VECTOR(6)
 158               	#define SIG_OUTPUT_COMPARE1B	_VECTOR(7)
 159               	#define SIG_OVERFLOW1		_VECTOR(8)
 160               	#define SIG_OVERFLOW0		_VECTOR(9)
 161               	#define SIG_SPI			_VECTOR(10)
 162               	#define SIG_UART_RECV		_VECTOR(11)
 163               	#define SIG_UART_DATA		_VECTOR(12)
 164               	#define SIG_UART_TRANS		_VECTOR(13)
 165               	#define SIG_ADC			_VECTOR(14)
 166               	#define SIG_EEPROM_READY	_VECTOR(15)
 167               	#define SIG_COMPARATOR		_VECTOR(16)
 168               	#define SIG_2WIRE_SERIAL	_VECTOR(17)
 169               	#define SIG_SPM_READY		_VECTOR(18)
 170               	
 171               	#define _VECTORS_SIZE 38
 172               	
 173               	/* Bit numbers */
 174               	
 175               	/* GIMSK / GICR */
 176               	#define INT1	7
 177               	#define INT0	6
 178               	#define IVSEL	1
 179               	#define IVCE	0
 180               	
 181               	/* GIFR */
 182               	#define INTF1	7
 183               	#define INTF0	6
 184               	
 184               	#elif defined (__AVR_ATmega8515__)
  54               	#include "Events.h"
   1               	#ifndef EVENTS_H
   2               	#define EVENTS_H
   3               	
   4               	/*
   5               	    Copyright (C) 2004    John Orlando
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s 			page 10


   6               	    
   7               	   AVRcam: a small real-time image processing engine.
   8               	
   9               	    This program is free software; you can redistribute it and/or
  10               	    modify it under the terms of the GNU General Public
  11               	    License as published by the Free Software Foundation; either
  12               	    version 2 of the License, or (at your option) any later version.
  13               	
  14               	    This program is distributed in the hope that it will be useful,
  15               	    but WITHOUT ANY WARRANTY; without even the implied warranty of
  16               	    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17               	    General Public License for more details.
  18               	
  19               	    You should have received a copy of the GNU General Public
  20               	    License along with this program; if not, write to the Free Software
  21               	    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  22               	
  23               	   For more information on the AVRcam, please contact:
  24               	
  25               	   john@jrobot.net
  26               	
  27               	   or go to www.jrobot.net for more details regarding the system.
  28               	*/
  29               	/*********************************************************** 
  30               		Module Name: Events.h
  31               		Module Date: 05/23/2004
  32               		Module Auth: John Orlando
  33               		
  34               		Description: This file provides the external interface
  35               		to the events that can be published/processed in the
  36               		system.  It is specifically by itself (and nothing
  37               		else should be defined in here) so that both .c and
  38               		.S (assembly) files can include this file without
  39               		a problem.
  40               	    
  41               	    Revision History:
  42               	    Date        Rel Ver.    Notes
  43               	    4/10/2004      0.1     Module created
  44               	    6/30/2004      1.0     Initial release for Circuit Cellar
  45               	                           contest.
  46               	    *******************************************************/
  47               	
  48               	/* Definitions */
  49               	/* Originally, all events were passed in a bitmask...however,
  50               	an event FIFO was finally used, but the coding of the event
  51               	definitions were never translated back....doesn't make a
  52               	difference, but looks a little weird */
  53               	#define EV_SERIAL_DATA_RECEIVED		0x01
  54               	#define EV_DUMP_FRAME				0x02
  55               	#define EV_PROCESS_FRAME_COMPLETE	0x04
  55               			
  56               			.extern fastEventBitmask    ; This is the flag used to indicate to the rest
  57               										; of the system that the line is complete
  58               									
  59               	#define HREF_INTERRUPT_ENABLE_MASK   0x80
  60               	#define HREF_INTERRUPT_DISABLE_MASK  0x7F
  61               	#define ENABLE_PCLK_TIMER1_OVERFLOW_BITMASK  0x04
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s 			page 11


  62               	#define DISABLE_PCLK_TIMER1_OVERFLOW_BITMASK 0xFB
  63               	#define G_PORT						_SFR_IO_ADDR(PINC)  
  64               	#define RB_PORT						_SFR_IO_ADDR(PINB)  
  65               	#define PIXEL_RUN_START_INITIAL     0x50     	; This value causes our pixel counter (TCNT1)
  66               													; to overflow after 176 (horizontal) pixels
  67               	
  68               	#define RED_MEM_OFFSET				0x00
  69               	#define GREEN_MEM_OFFSET			0x10
  70               	#define BLUE_MEM_OFFSET				0x20
  71               	
  72               	; A pixelBlock is defined as a contiguous group of 4 pixels that are combined 
  73               	; together to form a specific color.  Typically, this is formed by sampling a
  74               	; a green value, followed by a red and blue value (since we are dealing
  75               	; with Bayer color data).  We could optionally sample a second green with
  76               	; the red and average the greens, because the eye is more sensitive to
  77               	; green, but for speed we don't do this.  These three values (RGB) are then
  78               	; used as indices into the color membership lookup table (memLookup) to
  79               	; determine which color the pixelBlock maps into.  The memLookup table is
  80               	; manually generated for now (though it will hopefully be modified over
  81               	; the serial interface eventually).
  82               	;
  83               	; Here is a pixel block:
  84               	; ...G  G  G  G...  (row x)
  85               	; ...B  R  B  R...  (row x+1)
  86               	;    |  |  |  |--this is skipped 
  87               	;    |  |  |--this is skipped
  88               	;    |  |--this is sampled
  89               	;    |--this is sampled
  90               	
  91               	; As pixel blocks are sampled, the red, green, and blue values are
  92               	; used to index into their respective color maps.  The color maps
  93               	; return values that can be logically ANDed together so that a 
  94               	; particular RGB triplet will result in a single bit being set
  95               	; after the AND operation.  This single bit indicates which color
  96               	; the RGB triplet represents.  It is also possible for no bits to
  97               	; be set after the AND process, indicating that the RGB triplet
  98               	; does not map to any of the colors configured in the color map.
  99               	; This isn't quite as fast as a pure RGB lookup table, but
 100               	; it then again it doesn't require 2^12 (4-bits for each color
 101               	; channel) bytes to store the lookup table.  It takes just a few
 102               	; more cycles, and only requires 48 bytes of precious RAM (16
 103               	; per color channel, since our resolution on each color channel
 104               	; is only 4-bits).  Not bad....for more information, see:
 105               	; http://www.cs.cmu.edu/~trb/papers/wirevision00.pdf for more
 106               	; information on this color segmentation technique.
 107               	
 108               	; One other note: this code does depend on the colorMap residing
 109               	; at a well-defined position in memory; specifically, it mus
 110               	; start at a 256-byte boundary so that the lowest byte in the
 111               	; map is set to 0x00.  Currently, the colorMap is forced to
 112               	; start at RAM location 0x300.  This could potentially be changed
 113               	; by the developer if needed, but offsets would have to be added
 114               	; in to the colorMap look-up code below to make it work.
 115               	
 116               	
 117               	; These are the registers that will be used throughout this
 118               	; module for acquiring each line of pixel data
GAS LISTING C:\DOCUME~1\John\LOCALS~1\Temp/ccIlaaaa.s 			page 12


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -