Datasheet ATmega8535, ATmega8535L (Atmel) - 5

HerstellerAtmel
Beschreibung8-bit AVR Microcontroller with 8K Bytes In-System Programmable Flash
Seiten / Seite321 / 5 — ATmega8535(L). Pin Descriptions. GND. Port A (PA7..PA0). Port B …
Dateiformat / GrößePDF / 2.6 Mb
DokumentenspracheEnglisch

ATmega8535(L). Pin Descriptions. GND. Port A (PA7..PA0). Port B (PB7..PB0). Port C (PC7..PC0). Port D (PD7..PD0). RESET. XTAL1. XTAL2. AVCC

ATmega8535(L) Pin Descriptions GND Port A (PA7..PA0) Port B (PB7..PB0) Port C (PC7..PC0) Port D (PD7..PD0) RESET XTAL1 XTAL2 AVCC

Modelllinie für dieses Datenblatt

Textversion des Dokuments

link to page 60 link to page 64
ATmega8535(L) Pin Descriptions V
Digital supply voltage.
CC GND
Ground.
Port A (PA7..PA0)
Port A serves as the analog inputs to the A/D Converter. Port A also serves as an 8-bit bi-directional I/O port, if the A/D Converter is not used. Port pins can provide internal pull-up resistors (selected for each bit). The Port A output buffers have symmetrical drive characteristics with both high sink and source capability. When pins PA0 to PA7 are used as inputs and are externally pulled low, they will source current if the internal pull-up resistors are activated. The Port A pins are tri-stated when a reset condition becomes active, even if the clock is not running.
Port B (PB7..PB0)
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port B output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running. Port B also serves the functions of various special features of the ATmega8535 as listed on page 60.
Port C (PC7..PC0)
Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port C output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes active, even if the clock is not running.
Port D (PD7..PD0)
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port D output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes active, even if the clock is not running. Port D also serves the functions of various special features of the ATmega8535 as listed on page 64.
RESET
Reset input. A low level on this pin for longer than the minimum pulse length will gener- ate a reset, even if the clock is not running. The minimum pulse length is given in Table 15 on page 37. Shorter pulses are not guaranteed to generate a reset.
XTAL1
Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.
XTAL2
Output from the inverting Oscillator amplifier.
AVCC
AVCC is the supply voltage pin for Port A and the A/D Converter. It should be externally connected to V , even if the ADC is not used. If the ADC is used, it should be con- CC nected to V through a low-pass filter. CC
AREF
AREF is the analog reference pin for the A/D Converter.
5
2502K–AVR–10/06 Document Outline Features Pin Configurations Disclaimer Overview Block Diagram AT90S8535 Compatibility AT90S8535 Compatibility Mode Pin Descriptions VCC GND Port A (PA7..PA0) Port B (PB7..PB0) Port C (PC7..PC0) Port D (PD7..PD0) RESET XTAL1 XTAL2 AVCC AREF Resources About Code Examples AVR CPU Core Introduction Architectural Overview ALU - Arithmetic Logic Unit Status Register General Purpose Register File The X-register, Y-register, and Z-register Stack Pointer Instruction Execution Timing Reset and Interrupt Handling Interrupt Response Time AVR ATmega8535 Memories In-System Reprogrammable Flash Program Memory SRAM Data Memory Data Memory Access Times EEPROM Data Memory EEPROM Read/Write Access The EEPROM Address Register - EEARH and EEARL The EEPROM Data Register - EEDR The EEPROM Control Register - EECR EEPROM Write During Power- down Sleep Mode Preventing EEPROM Corruption I/O Memory System Clock and Clock Options Clock Systems and their Distribution CPU Clock - clkCPU I/O Clock - clkI/O Flash Clock - clkFLASH Asynchronous Timer Clock - clkASY ADC Clock - clkADC Clock Sources Default Clock Source Crystal Oscillator Low-frequency Crystal Oscillator External RC Oscillator Calibrated Internal RC Oscillator Oscillator Calibration Register - OSCCAL External Clock Timer/Counter Oscillator Power Management and Sleep Modes MCU Control Register - MCUCR Idle Mode ADC Noise Reduction Mode Power-down Mode Power-save Mode Standby Mode Extended Standby Mode Minimizing Power Consumption Analog-to-Digital Converter Analog Comparator Brown-out Detector Internal Voltage Reference Watchdog Timer Port Pins System Control and Reset Resetting the AVR Reset Sources Power-on Reset External Reset Brown-out Detection Watchdog Reset MCU Control and Status Register - MCUCSR Internal Voltage Reference Voltage Reference Enable Signals and Start-up Time Watchdog Timer Watchdog Timer Control Register - WDTCR Timed Sequences for Changing the Configuration of the Watchdog Timer Safety Level 0 Safety Level 1 Safety Level 2 Interrupts Interrupt Vectors in ATmega8535 Moving Interrupts Between Application and Boot Space General Interrupt Control Register - GICR I/O-Ports Introduction Ports as General Digital I/O Configuring the Pin Reading the Pin Value Digital Input Enable and Sleep Modes Unconnected pins Alternate Port Functions Special Function IO Register - SFIOR Alternate Functions of Port A Alternate Functions Of Port B Alternate Functions of Port C Alternate Functions of Port D Register Description for I/O-Ports Port A Data Register - PORTA Port A Data Direction Register - DDRA Port A Input Pins Address - PINA Port B Data Register - PORTB Port B Data Direction Register - DDRB Port B Input Pins Address - PINB Port C Data Register - PORTC Port C Data Direction Register - DDRC Port C Input Pins Address - PINC Port D Data Register - PORTD Port D Data Direction Register - DDRD Port D Input Pins Address - PIND External Interrupts MCU Control Register - MCUCR MCU Control and Status Register - MCUCSR General Interrupt Control Register - GICR General Interrupt Flag Register - GIFR 8-bit Timer/Counter0 with PWM Overview Registers Definitions Timer/Counter Clock Sources Counter Unit Output Compare Unit Force Output Compare Compare Match Blocking by TCNT0 Write Using the Output Compare Unit Compare Match Output Unit Compare Output Mode and Waveform Generation Modes of Operation Normal Mode Clear Timer on Compare Match (CTC) Mode Fast PWM Mode Phase Correct PWM Mode Timer/Counter Timing Diagrams 8-bit Timer/Counter Register Description Timer/Counter Control Register - TCCR0 Timer/Counter Register - TCNT0 Output Compare Register - OCR0 Timer/Counter Interrupt Mask Register - TIMSK Timer/Counter Interrupt Flag Register - TIFR Timer/Counter0 and Timer/Counter1 Prescalers Internal Clock Source Prescaler Reset External Clock Source Special Function IO Register - SFIOR 16-bit Timer/Counter1 Overview Registers Definitions Compatibility Accessing 16-bit Registers Re-using the Temporary High Byte Register Timer/Counter Clock Sources Counter Unit Input Capture Unit Input Capture Trigger Source Noise Canceler Using the Input Capture Unit Output Compare Units Force Output Compare Compare Match Blocking by TCNT1 Write Using the Output Compare Unit Compare Match Output Unit Compare Output Mode and Waveform Generation Modes of Operation Normal Mode Clear Timer on Compare Match (CTC) Mode Fast PWM Mode Phase Correct PWM Mode Phase and Frequency Correct PWM Mode Timer/Counter Timing Diagrams 16-bit Timer/Counter Register Description Timer/Counter1 Control Register A - TCCR1A Timer/Counter1 Control Register B - TCCR1B Timer/Counter1 - TCNT1H and TCNT1L Output Compare Register 1 A - OCR1AH and OCR1AL Output Compare Register 1 B - OCR1BH and OCR1BL Input Capture Register 1 - ICR1H and ICR1L Timer/Counter Interrupt Mask Register - TIMSK(1) Timer/Counter Interrupt Flag Register - TIFR(1) 8-bit Timer/Counter2 with PWM and Asynchronous Operation Overview Registers Definitions Timer/Counter Clock Sources Counter Unit Output Compare Unit Force Output Compare Compare Match Blocking by TCNT2 Write Using the Output Compare Unit Compare Match Output Unit Compare Output Mode and Waveform Generation Modes of Operation Normal Mode Clear Timer on Compare Match (CTC) Mode Fast PWM Mode Phase Correct PWM Mode Timer/Counter Timing Diagrams 8-bit Timer/Counter Register Description Timer/Counter Control Register - TCCR2 Timer/Counter Register - TCNT2 Output Compare Register - OCR2 Asynchronous Operation of the Timer/Counter Asynchronous Status Register - ASSR Asynchronous Operation of Timer/Counter2 Timer/Counter Interrupt Mask Register - TIMSK Timer/Counter Interrupt Flag Register - TIFR Timer/Counter Prescaler Special Function IO Register - SFIOR Serial Peripheral Interface - SPI SS Pin Functionality Slave Mode Master Mode SPI Control Register - SPCR SPI Status Register - SPSR SPI Data Register - SPDR Data Modes USART Overview AVR USART vs. AVR UART - Compatibility Clock Generation Internal Clock Generation - The Baud Rate Generator Double Speed Operation (U2X) External Clock Synchronous Clock Operation Frame Formats Parity Bit Calculation USART Initialization Data Transmission - The USART Transmitter Sending Frames with 5 to 8 Data Bits Sending Frames with 9 Data Bits Transmitter Flags and Interrupts Parity Generator Disabling the Transmitter Data Reception - The USART Receiver Receiving Frames with 5 to 8 Data Bits Receiving Frames with 9 Data Bits Receive Compete Flag and Interrupt Receiver Error Flags Parity Checker Disabling the Receiver Flushing the Receive Buffer Asynchronous Data Reception Asynchronous Clock Recovery Asynchronous Data Recovery Asynchronous Operational Range Multi-processor Communication Mode Using MPCM Accessing UBRRH/UCSRC Registers Write Access Read Access USART Register Description USART I/O Data Register - UDR USART Control and Status Register A - UCSRA USART Control and Status Register B - UCSRB USART Control and Status Register C - UCSRC(1) USART Baud Rate Registers - UBRRL and UBRRH(1) Examples of Baud Rate Setting Two-wire Serial Interface Features Two-wire Serial Interface Bus Definition TWI Terminology Electrical Interconnection Data Transfer and Frame Format Transferring Bits START and STOP Conditions Address Packet Format Data Packet Format Combining Address and Data Packets into a Transmission Multi-master Bus Systems, Arbitration and Synchronization Overview of the TWI Module SCL and SDA Pins Bit Rate Generator Unit Bus Interface Unit Address Match Unit Control Unit TWI Register Description TWI Bit Rate Register - TWBR TWI Control Register - TWCR TWI Status Register - TWSR TWI Data Register - TWDR TWI (Slave) Address Register - TWAR Using the TWI Transmission Modes Master Transmitter Mode Master Receiver Mode Slave Receiver Mode Slave Transmitter Mode Miscellaneous States Combining Several TWI Modes Multi-master Systems and Arbitration Analog Comparator Special Function IO Register - SFIOR Analog Comparator Control and Status Register - ACSR Analog Comparator Multiplexed Input Analog-to-Digital Converter Features Operation Starting a Conversion Prescaling and Conversion Timing Differential Gain Channels Changing Channel or Reference Selection ADC Input Channels ADC Voltage Reference ADC Noise Canceler Analog Input Circuitry Analog Noise Canceling Techniques Offset Compensation Schemes ADC Accuracy Definitions ADC Conversion Result ADC Multiplexer Selection Register - ADMUX ADC Control and Status Register A - ADCSRA The ADC Data Register - ADCL and ADCH ADLAR = 0 ADLAR = 1 Special Function IO Register - SFIOR Boot Loader Support - Read-While-Write Self-Programming Boot Loader Features Application and Boot Loader Flash Sections Application Section BLS - Boot Loader Section Read-While-Write and No Read-While-Write Flash Sections RWW - Read-While-Write Section NRWW - No Read-While-Write Section Boot Loader Lock Bits Entering the Boot Loader Program Store Program Memory Control Register - SPMCR Addressing the Flash during Self- Programming Self-Programming the Flash Performing Page Erase by SPM Filling the Temporary Buffer (Page Loading) Performing a Page Write Using the SPM Interrupt Consideration While Updating BLS Prevent Reading the RWW Section During Self-Programming Setting the Boot Loader Lock Bits by SPM EEPROM Write Prevents Writing to SPMCR Reading the Fuse and Lock Bits from Software Preventing Flash Corruption Programming Time for Flash When Using SPM Simple Assembly Code Example for a Boot Loader ATmega8535 Boot Loader Parameters Memory Programming Program And Data Memory Lock Bits Fuse Bits Latching of Fuses Signature Bytes Calibration Byte Parallel Programming Parameters, Pin Mapping, and Commands Signal Names Parallel Programming Enter Programming Mode Considerations for Efficient Programming Chip Erase Programming the Flash Programming the EEPROM Reading the Flash Reading the EEPROM Programming the Fuse Low Bits Programming the Fuse High Bits Programming the Lock Bits Reading the Fuse and Lock Bits Reading the Signature Bytes Reading the Calibration Byte Parallel Programming Characteristics Serial Downloading Serial Programming Pin Mapping Serial Programming Algorithm Data Polling Flash Data Polling EEPROM SPI Serial Programming Characteristics Electrical Characteristics Absolute Maximum Ratings* DC Characteristics External Clock Drive Waveforms External Clock Drive Two-wire Serial Interface Characteristics SPI Timing Characteristics ADC Characteristics ATmega8535 Typical Characteristics Active Supply Current Idle Supply Current Power-Down Supply Current Power-Save Supply Current Standby Supply Current Pin Pullup Pin Driver Strength Pin Thresholds And Hysteresis BOD Thresholds And Analog Comparator Offset Internal Oscillator Speed Current Consumption Of Peripheral Units Current Consumption In Reset And Reset Pulsewidth Register Summary Instruction Set Summary Ordering Information Packaging Information 44A 40P6 44J 44M1-A Errata ATmega8535 Rev. A and B Datasheet Revision History Changes from Rev. 2502J- 08/06 to Rev. 2502K- 10/06 Changes from Rev. 2502I- 06/06 to Rev. 2502J- 08/06 Changes from Rev. 2502H- 04/06 to Rev. 2502I- 06/06 Changes from Rev. 2502G- 04/05 to Rev. 2502H- 04/06 Changes from Rev. 2502F- 06/04 to Rev. 2502G- 04/05 Changes from Rev. 2502E-12/03 to Rev. 2502G-06/04 Changes from Rev. 2502E-12/03 to Rev. 2502F-06/04 Changes from Rev. 2502D-09/03 to Rev. 2502E-12/03 Changes from Rev. 2502C-04/03 to Rev. 2502D-09/03 Changes from Rev. 2502B-09/02 to Rev. 2502C-04/03 Changes from Rev. 2502A-06/02 to Rev. 2502B-09/02 Table of Contents