ATmega8 (961722), страница 53
Текст из файла (страница 53)
This is now added in the followingsections:Improved description of “Oscillator Calibration Register – OSCCAL” on page 29 and“Calibration Byte” on page 222.3Added Some Preliminary Test Limits and Characterization Data.Removed some of the TBD’s in the following tables and pages:Table 3 on page 24, Table 15 on page 36, Table 16 on page 40, Table 17 on page42, “TA = -40×C to 85×C, VCC = 2.7V to 5.5V (unless otherwise noted)” on page239, Table 99 on page 241, and Table 102 on page 243.4Updated Programming Figures.Figure 104 on page 223 and Figure 112 on page 234 are updated to also reflect thatAVCC must be connected during Programming mode.5Added a Description on how to Enter Parallel Programming Mode if RESETPin is Disabled or if External Oscillators are Selected.Added a note in section “Enter Programming Mode” on page 225.2972486O–AVR–10/04298ATmega8(L)2486O–AVR–10/04ATmega8(L)Table of ContentsFeatures................................................................................................
1Pin Configurations............................................................................... 2Overview............................................................................................... 3Block Diagram ...................................................................................................... 3Disclaimer ............................................................................................................. 4Pin Descriptions.................................................................................................... 5About Code Examples......................................................................... 6AVR CPU Core ..................................................................................... 7Introduction ...........................................................................................................
7Architectural Overview.......................................................................................... 7Arithmetic Logic Unit – ALU.................................................................................. 9Status Register ..................................................................................................... 9General Purpose Register File ........................................................................... 10Stack Pointer ......................................................................................................
11Instruction Execution Timing............................................................................... 12Reset and Interrupt Handling.............................................................................. 12AVR ATmega8 Memories .................................................................. 15In-System Reprogrammable Flash Program Memory ........................................SRAM Data Memory...........................................................................................Data Memory Access Times...............................................................................EEPROM Data Memory......................................................................................I/O Memory .........................................................................................................1516171722System Clock and Clock Options ....................................................
23Clock Systems and their Distribution ..................................................................Clock Sources.....................................................................................................Crystal Oscillator.................................................................................................Low-frequency Crystal Oscillator ........................................................................External RC Oscillator ........................................................................................Calibrated Internal RC Oscillator ........................................................................External Clock.....................................................................................................Timer/Counter Oscillator.....................................................................................2324252627283030Power Management and Sleep Modes.............................................
31Idle Mode ............................................................................................................ADC Noise Reduction Mode...............................................................................Power-down Mode..............................................................................................Power-save Mode...............................................................................................Standby Mode.....................................................................................................Minimizing Power Consumption .........................................................................323232323333i2486O–AVR–10/04System Control and Reset ................................................................
35Internal Voltage Reference ................................................................................. 40Watchdog Timer ................................................................................................. 41Timed Sequences for Changing the Configuration of the Watchdog Timer ....... 43Interrupts ............................................................................................ 44Interrupt Vectors in ATmega8............................................................................. 44I/O Ports..............................................................................................
49Introduction .........................................................................................................Ports as General Digital I/O ................................................................................Alternate Port Functions .....................................................................................Register Description for I/O Ports .......................................................................49505463External Interrupts............................................................................. 648-bit Timer/Counter0..........................................................................
67Overview.............................................................................................................Timer/Counter Clock Sources.............................................................................Counter Unit........................................................................................................Operation ............................................................................................................Timer/Counter Timing Diagrams.........................................................................8-bit Timer/Counter Register Description ...........................................................676868686970Timer/Counter0 and Timer/Counter1 Prescalers ............................
7216-bit Timer/Counter1........................................................................ 74Overview.............................................................................................................Accessing 16-bit Registers .................................................................................Timer/Counter Clock Sources.............................................................................Counter Unit........................................................................................................Input Capture Unit...............................................................................................Output Compare Units ........................................................................................Compare Match Output Unit ...............................................................................Modes of Operation ............................................................................................Timer/Counter Timing Diagrams.........................................................................16-bit Timer/Counter Register Description .........................................................747780808183858693958-bit Timer/Counter2 with PWM and Asynchronous Operation ..
102Overview...........................................................................................................Timer/Counter Clock Sources...........................................................................Counter Unit......................................................................................................Output Compare Unit........................................................................................Compare Match Output Unit .............................................................................Modes of Operation ..........................................................................................Timer/Counter Timing Diagrams.......................................................................ii102103104105107108113ATmega8(L)2486O–AVR–10/04ATmega8(L)8-bit Timer/Counter Register Description .........................................................
115Asynchronous Operation of the Timer/Counter ................................................ 117Timer/Counter Prescaler................................................................................... 121Serial Peripheral Interface – SPI..................................................... 122SS Pin Functionality.......................................................................................... 126Data Modes ......................................................................................................
129USART .............................................................................................. 130Overview...........................................................................................................Clock Generation ..............................................................................................Frame Formats .................................................................................................USART Initialization..........................................................................................Data Transmission – The USART Transmitter .................................................Data Reception – The USART Receiver ..........................................................Asynchronous Data Reception .........................................................................Multi-processor Communication Mode .............................................................Accessing UBRRH/UCSRC Registers..............................................................USART Register Description ............................................................................Examples of Baud Rate Setting........................................................................130131134135137140144148149150156Two-wire Serial Interface ................................................................