avr - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ara r. pd0 - pd7 pc0 - pc7 8-bit data bus....

15
Features AVR ® – High-performance and Low-power RISC Architecture 118 Powerful Instructions – Most Single Clock Cycle Execution 32 x 8 General-purpose Working Registers Up to 8 MIPS Throughput at 8 MHz Data and Nonvolatile Program Memories 8K Bytes of In-System Programmable Flash SPI Serial Interface for In-System Programming Endurance: 1,000 Write/Erase Cycles 512 Bytes EEPROM Endurance: 100,000 Write/Erase Cycles 512 Bytes Internal SRAM Programming Lock for Software Security Peripheral Features 8-channel, 10-bit ADC Programmable UART Master/Slave SPI Serial Interface Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode One 16-bit Timer/Counter with Separate Prescaler, Compare and Capture Modes and Dual 8-, 9-, or 10-bit PWM Programmable Watchdog Timer with On-chip Oscillator On-chip Analog Comparator Special Microcontroller Features Power-on Reset Circuit Real-time Clock (RTC) with Separate Oscillator and Counter Mode External and Internal Interrupt Sources Three Sleep Modes: Idle, Power Save and Power-down Power Consumption at 4 MHz, 3V, 20°C Active: 6.4 mA Idle Mode: 1.9 mA Power-down Mode: <1 μA I/O and Packages 32 Programmable I/O Lines 40-lead PDIP, 44-lead PLCC, 44-lead TQFP, and 44-pad MLF Operating Voltages –V CC : 4.0 - 6.0V AT90S8535 –V CC : 2.7 - 6.0V AT90LS8535 Speed Grades: 0 - 8 MHz for the AT90S8535 0 - 4 MHz for the AT90LS8535 8-bit Microcontroller with 8K Bytes In-System Programmable Flash AT90S8535 AT90LS8535 Summary Rev. 1041HS–11/01 Note: This i s a summary d ocument. A comp let e documen t i s available on our web site at www.atmel.com.

Upload: others

Post on 29-Oct-2019

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

8-bit Microcontroller with 8K Bytes In-System Programmable Flash

AT90S8535AT90LS8535

Summary

Rev. 1041HS–11/01

Features• AVR® – High-performance and Low-power RISC Architecture

– 118 Powerful Instructions – Most Single Clock Cycle Execution– 32 x 8 General-purpose Working Registers– Up to 8 MIPS Throughput at 8 MHz

• Data and Nonvolatile Program Memories– 8K Bytes of In-System Programmable Flash

SPI Serial Interface for In-System ProgrammingEndurance: 1,000 Write/Erase Cycles

– 512 Bytes EEPROMEndurance: 100,000 Write/Erase Cycles

– 512 Bytes Internal SRAM– Programming Lock for Software Security

• Peripheral Features– 8-channel, 10-bit ADC– Programmable UART– Master/Slave SPI Serial Interface– Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode– One 16-bit Timer/Counter with Separate Prescaler, Compare and

Capture Modes and Dual 8-, 9-, or 10-bit PWM– Programmable Watchdog Timer with On-chip Oscillator– On-chip Analog Comparator

• Special Microcontroller Features– Power-on Reset Circuit– Real-time Clock (RTC) with Separate Oscillator and Counter Mode– External and Internal Interrupt Sources– Three Sleep Modes: Idle, Power Save and Power-down

• Power Consumption at 4 MHz, 3V, 20°C– Active: 6.4 mA– Idle Mode: 1.9 mA– Power-down Mode: <1 µA

• I/O and Packages– 32 Programmable I/O Lines– 40-lead PDIP, 44-lead PLCC, 44-lead TQFP, and 44-pad MLF

• Operating Voltages– VCC: 4.0 - 6.0V AT90S8535– VCC: 2.7 - 6.0V AT90LS8535

• Speed Grades:– 0 - 8 MHz for the AT90S8535– 0 - 4 MHz for the AT90LS8535

1Note: This is a summary document. A complete document is available on our web site at www.atmel.com.

LM
Peripheral Features
LM
– 8-channel, 10-bit ADC
LM
– Programmable UART
LM
– Master/Slave SPI Serial Interface
LM
– Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode
LM
– One 16-bit Timer/Counter with Separate Prescaler, Compare and
LM
Capture Modes and Dual 8-, 9-, or 10-bit PWM
LM
– Programmable Watchdog Timer with On-chip Oscillator
LM
– On-chip Analog Comparator
LM
Special Microcontroller Features
LM
– Power-on Reset Circuit – Real-time Clock (RTC) with Separate Oscillator and Counter Mode
LM
– External and Internal Interrupt Sources
LM
– Three Sleep Modes: Idle, Power Save and Power-down
LM
Atenção as partes sublinhadas foram sublinhadas por Marco.
Page 2: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

Pin Configurations

2 AT90S/LS85351041HS–11/01

Page 3: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

AT90S/LS8535

Description The AT90S8535 is a low-power CMOS 8-bit microcontroller based on the AVR RISCarchitecture. By executing powerful instructions in a single clock cycle, the AT90S8535achieves throughputs approaching 1 MIPS per MHz allowing the system designer tooptimize power consumption versus processing speed.

Block Diagram Figure 1. The AT90S8535 Block Diagram

PROGRAMCOUNTER

INTERNALOSCILLATOR

WATCHDOGTIMER

STACKPOINTER

PROGRAMFLASH

MCU CONTROLREGISTERSRAM

GENERALPURPOSE

REGISTERS

INSTRUCTIONREGISTER

TIMER/COUNTERS

INSTRUCTIONDECODER

DATA DIR.REG. PORTB

DATA DIR.REG. PORTA

DATA DIR.REG. PORTD

DATA DIR.REG. PORTC

DATA REGISTERPORTB

DATA REGISTERPORTA

ANALOG MUX ADC

DATA REGISTERPORTD

DATA REGISTERPORTC

PROGRAMMINGLOGIC

TIMING ANDCONTROL

OSCILLATOR

OSCILLATOR

INTERRUPTUNIT

EEPROM

SPI UART

STATUSREGISTER

Z

YX

ALU

PORTB DRIVERS

PORTA DRIVERS

PORTD DRIVERS

PORTC DRIVERS

PB0 - PB7

PA0 - PA7

RESET

VCC

AVCC

AGNDAREF

GND

XTAL2

XTAL1

CONTROLLINES

+ -

AN

ALO

GC

OM

P AR

ATO

R

PD0 - PD7

PC0 - PC7

8-BIT DATA BUS

31041HS–11/01

Page 4: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

The AVR core combines a rich instruction set with 32 general-purpose working regis-ters. All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU),allowing two independent registers to be accessed in one single instruction executed inone clock cycle. The resulting architecture is more code efficient while achievingthroughputs up to ten times faster than conventional CISC microcontrollers.

The AT90S8535 provides the following features: 8K bytes of In-System ProgrammableFlash, 512 bytes EEPROM, 512 bytes SRAM, 32 general-purpose I/O lines, 32 general-purpose working registers, Real-time Clock (RTC), three flexible timer/counters withcompare modes, internal and external interrupts, a programmable serial UART, 8-chan-nel, 10-bit ADC, programmable Watchdog Timer with internal oscillator, an SPI serialport and three software-selectable power-saving modes. The Idle Mode stops the CPUwhile allowing the SRAM, timer/counters, SPI port and interrupt system to continuefunctioning. The Power-down mode saves the register contents but freezes the oscilla-tor, disabling all other chip functions until the next interrupt or hardware reset. In PowerSave Mode, the timer oscillator continues to run, allowing the user to maintain a timerbase while the rest of the device is sleeping.

The device is manufactured using Atmel’s high-density nonvolatile memory technology.The On-chip ISP Flash allows the program memory to be reprogrammed in-systemthrough an SPI serial interface or by a conventional nonvolatile memory programmer.By combining an 8-bit RISC CPU with In-System Programmable Flash on a monolithicchip, the Atmel AT90S8535 is a powerful microcontroller that provides a highly flexibleand cost effective solution to many embedded control applications.

The AT90S8535 AVR is supported with a full suite of program and system developmenttools including: C compilers, macro assemblers, program debugger/simulators, in-circuitemulators and evaluation kits.

Pin Descriptions

VCC Digital supply voltage.

GND Digital ground.

Port A (PA7..PA0) Port A is an 8-bit bi-directional I/O port. Port pins can provide internal pull-up resistors(selected for each bit). The Port A output buffers can sink 20 mA and can drive LED dis-plays directly. 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.

Port A also serves as the analog inputs to the A/D Converter.

The Port A pins are tri-stated when a reset condition becomes active, even if the clock isnot running.

Port B (PB7..PB0) Port B is an 8-bit bi-directional I/O port with internal pull-up resistors. The Port B outputbuffers can sink 20 mA. As inputs, Port B pins that are externally pulled low will sourcecurrent if the pull-up resistors are activated. Port B also serves the functions of variousspecial features of the AT90S8535 as listed on page 74.

The Port B pins are tri-stated when a reset condition becomes active, even if the clock isnot running.

Port C (PC7..PC0) Port C is an 8-bit bi-directional I/O port with internal pull-up resistors. The Port C outputbuffers can sink 20 mA. As inputs, Port C pins that are externally pulled low will source

4 AT90S/LS85351041HS–11/01

LM
32 general-purpose working registers.
LM
The AT90S8535 provides the following features: 8K bytes of In-System Programmable Flash, 512 bytes EEPROM, 512 bytes SRAM, 32 general-purpose I/O lines, 32 generalpurpose working registers, Real-time Clock (RTC), three flexible timer/counters with compare modes, internal and external interrupts, a programmable serial UART, 8-channel, 10-bit ADC, programmable Watchdog Timer with internal oscillator, an SPI serial port and three software-selectable power-saving modes.
LM
VCC Digital supply voltage.
LM
GND Digital ground.
LM
Port A also serves as the analog inputs to the A/D Converter.
LM
Port A (PA7..PA0)
LM
Port A is an 8-bit bi-directional I/O port.
LM
Port B (PB7..PB0)
LM
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors.
LM
Port C (PC7..PC0)
LM
Port C is an 8-bit bi-directional I/O port with internal pull-up resistors.
Page 5: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

AT90S/LS8535

current if the pull-up resistors are activated. Two Port C pins can alternatively be usedas oscillator for Timer/Counter2.

The Port C pins are tri-stated when a reset condition becomes active, even if the clock isnot running.

Port D (PD7..PD0) Port D is an 8-bit bi-directional I/O port with internal pull-up resistors. The Port D outputbuffers can sink 20 mA. As inputs, Port D pins that are externally pulled low will sourcecurrent if the pull-up resistors are activated.

Port D also serves the functions of various special features of the AT90S8535 as listedon page 83.

The Port D pins are tri-stated when a reset condition becomes active, even if the clock isnot running.

RESET Reset input. An external reset is generated by a low level on the RESET pin. Resetpulses longer than 50 ns will generate a reset, even if the clock is not running. Shorterpulses 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. If the ADC is not used,this pin must be connected to VCC. If the ADC is used, this pin must be connected toVCC via a low-pass filter. See page 65 for details on operation of the ADC.

AREF AREF is the analog reference input for the A/D Converter. For ADC operations, a volt-age in the range 2V to AVCC must be applied to this pin.

AGND Analog ground. If the board has a separate analog ground plane, this pin should be con-nected to this ground plane. Otherwise, connect to GND.

51041HS–11/01

LM
Port D (PD7..PD0)
LM
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors.
LM
AVCC AVCC is the supply voltage pin for Port A and the A/D Converter.
LM
AREF AREF is the analog reference input for the A/D Converter.
LM
AGND Analog ground. If the board has a separate analog ground plane,
Page 6: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

Register SummaryAddress Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Page$3F ($5F) SREG I T H S V N Z C page 18

$3E ($5E) SPH - - - - - - SP9 SP8 page 19

$3D ($5D) SPL SP7 SP6 SP5 SP4 SP3 SP2 SP1 SP0 page 19

$3C ($5C) Reserved

$3B ($5B) GIMSK INT1 INT0 - - - - - - page 24

$3A ($5A) GIFR INTF1 INTF0 page 25

$39 ($59) TIMSK OCIE2 TOIE2 TICIE1 OCIE1A OCIE1B TOIE1 - TOIE0 page 25

$38 ($58) TIFR OCF2 TOV2 ICF1 OCF1A OCF1B TOV1 - TOV0 page 26

$37 ($57) Reserved

$36 ($56) Reserved

$35 ($55) MCUCR - SE SM1 SM0 ISC11 ISC10 ISC01 ISC00 page 28

$34 ($54) MCUSR - - - - - - EXTRF PORF page 23

$33 ($53) TCCR0 - - - - - CS02 CS01 CS00 page 32

$32 ($52) TCNT0 Timer/Counter0 (8 Bits) page 33

$31 ($51) Reserved

$30 ($50) Reserved

$2F ($4F) TCCR1A COM1A1 COM1A0 COM1B1 COM1B0 - - PWM11 PWM10 page 35

$2E ($4E) TCCR1B ICNC1 ICES1 - - CTC1 CS12 CS11 CS10 page 36

$2D ($4D) TCNT1H Timer/Counter1 – Counter Register High Byte page 37

$2C ($4C) TCNT1L Timer/Counter1 – Counter Register Low Byte page 37

$2B ($4B) OCR1AH Timer/Counter1 – Output Compare Register A High Byte page 38

$2A ($4A) OCR1AL Timer/Counter1 – Output Compare Register A Low Byte page 38

$29 ($49) OCR1BH Timer/Counter1 – Output Compare Register B High Byte page 38

$28 ($48) OCR1BL Timer/Counter1 – Output Compare Register B Low Byte page 38

$27 ($47) ICR1H Timer/Counter1 – Input Capture Register High Byte page 39

$26 ($46) ICR1L Timer/Counter1 – Input Capture Register Low Byte page 39

$25 ($45) TCCR2 - PWM2 COM21 COM20 CTC2 CS22 CS21 CS20 page 42

$24 ($44) TCNT2 Timer/Counter2 (8 Bits) page 43

$23 ($43) OCR2 Timer/Counter2 Output Compare Register page 43

$22 ($42) ASSR - - - - AS2 TCN2UB OCR2UB TCR2UB page 45

$21 ($41) WDTCR - - - WDTOE WDE WDP2 WDP1 WDP0 page 47

$20 ($40) Reserved

$1F ($3F) EEARH EEAR8 page 49

$1E ($3E) EEARL EEAR7 EEAR6 EEAR5 EEAR4 EEAR3 EEAR2 EEAR1 EEAR0 page 49

$1D ($3D) EEDR EEPROM Data Register page 49

$1C ($3C) EECR - - - - EERIE EEMWE EEWE EERE page 49

$1B ($3B) PORTA PORTA7 PORTA6 PORTA5 PORTA4 PORTA3 PORTA2 PORTA1 PORTA0 page 73

$1A ($3A) DDRA DDA7 DDA6 DDA5 DDA4 DDA3 DDA2 DDA1 DDA0 page 73

$19 ($39) PINA PINA7 PINA6 PINA5 PINA4 PINA3 PINA2 PINA1 PINA0 page 73

$18 ($38) PORTB PORTB7 PORTB6 PORTB5 PORTB4 PORTB3 PORTB2 PORTB1 PORTB0 page 75

$17 ($37) DDRB DDB7 DDB6 DDB5 DDB4 DDB3 DDB2 DDB1 DDB0 page 75

$16 ($36) PINB PINB7 PINB6 PINB5 PINB4 PINB3 PINB2 PINB1 PINB0 page 75

$15 ($35) PORTC PORTC7 PORTC6 PORTC5 PORTC4 PORTC3 PORTC2 PORTC1 PORTC0 page 80

$14 ($34) DDRC DDC7 DDC6 DDC5 DDC4 DDC3 DDC2 DDC1 DDC0 page 80

$13 ($33) PINC PINC7 PINC6 PINC5 PINC4 PINC3 PINC2 PINC1 PINC0 page 81

$12 ($32) PORTD PORTD7 PORTD6 PORTD5 PORTD4 PORTD3 PORTD2 PORTD1 PORTD0 page 84

$11 ($31) DDRD DDD7 DDD6 DDD5 DDD4 DDD3 DDD2 DDD1 DDD0 page 84

$10 ($30) PIND PIND7 PIND6 PIND5 PIND4 PIND3 PIND2 PIND1 PIND0 page 84

$0F ($2F) SPDR SPI Data Register page 56

$0E ($2E) SPSR SPIF WCOL - - - - - - page 55

$0D ($2D) SPCR SPIE SPE DORD MSTR CPOL CPHA SPR1 SPR0 page 54

$0C ($2C) UDR UART I/O Data Register page 59

$0B ($2B) USR RXC TXC UDRE FE OR - - - page 60

$0A ($2A) UCR RXCIE TXCIE UDRIE RXEN TXEN CHR9 RXB8 TXB8 page 61

$09 ($29) UBRR UART Baud Rate Register page 62

$08 ($28) ACSR ACD - ACO ACI ACIE ACIC ACIS1 ACIS0 page 63

$07 ($27) ADMUX - - - - - MUX2 MUX1 MUX0 page 68

$06 ($26) ADCSR ADEN ADSC ADFR ADIF ADIE ADPS2 ADPS1 ADPS0 page 69

$05 ($25) ADCH - - - - - - ADC9 ADC8 page 70

$04 ($24) ADCL ADC7 ADC6 ADC5 ADC4 ADC3 ADC2 ADC1 ADC0 page 70

$03 ($20) Reserved

$02 ($22) Reserved

$01 ($21) Reserved

$00 ($20) Reserved

6 AT90S/LS85351041HS–11/01

Page 7: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

AT90S/LS8535

Notes: 1. For compatibility with future devices, reserved bits should be written to zero if accessed. Reserved I/O memory addressesshould never be written.

2. Some of the status flags are cleared by writing a logical “1” to them. Note that the CBI and SBI instructions will operate on allbits in the I/O register, writing a one back into any flag read as set, thus clearing the flag. The CBI and SBI instructions workwith registers $00 to $1F only.

71041HS–11/01

Page 8: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

Instruction Set SummaryMnemonic Operands Description Operation Flags # Clocks

ARITHMETIC AND LOGIC INSTRUCTIONS

ADD Rd, Rr Add Two Registers Rd ← Rd + Rr Z,C,N,V,H 1

ADC Rd, Rr Add with Carry Two Registers Rd ← Rd + Rr + C Z,C,N,V,H 1

ADIW Rdl, K Add Immediate to Word Rdh:Rdl ← Rdh:Rdl + K Z,C,N,V,S 2

SUB Rd, Rr Subtract Two Registers Rd ← Rd - Rr Z,C,N,V,H 1

SUBI Rd, K Subtract Constant from Register Rd ← Rd - K Z,C,N,V,H 1

SBC Rd, Rr Subtract with Carry Two Registers Rd ← Rd - Rr - C Z,C,N,V,H 1

SBCI Rd, K Subtract with Carry Constant from Reg. Rd ← Rd - K - C Z,C,N,V,H 1

SBIW Rdl, K Subtract Immediate from Word Rdh:Rdl ← Rdh:Rdl - K Z,C,N,V,S 2

AND Rd, Rr Logical AND Registers Rd ←=Rd • Rr Z,N,V 1

ANDI Rd, K Logical AND Register and Constant Rd ← Rd •=K Z,N,V 1

OR Rd, Rr Logical OR Registers Rd ← Rd v Rr Z,N,V 1

ORI Rd, K Logical OR Register and Constant Rd ←=Rd v K Z,N,V 1

EOR Rd, Rr Exclusive OR Registers Rd ← Rd ⊕ Rr Z,N,V 1

COM Rd One’s Complement Rd ← $FF − Rd Z,C,N,V 1

NEG Rd Two’s Complement Rd ← $00 − Rd Z,C,N,V,H 1

SBR Rd, K Set Bit(s) in Register Rd ← Rd v K Z,N,V 1

CBR Rd, K Clear Bit(s) in Register Rd ← Rd • ($FF - K) Z,N,V 1

INC Rd Increment Rd ← Rd + 1 Z,N,V 1

DEC Rd Decrement Rd ← Rd − 1 Z,N,V 1

TST Rd Test for Zero or Minus Rd ← Rd • Rd Z,N,V 1

CLR Rd Clear Register Rd ← Rd ⊕ Rd Z,N,V 1

SER Rd Set Register Rd ← $FF None 1

BRANCH INSTRUCTIONS

RJMP k Relative Jump PC=← PC + k + 1 None 2

IJMP Indirect Jump to (Z) PC ← Z None 2

RCALL k Relative Subroutine Call PC ← PC + k + 1 None 3

ICALL Indirect Call to (Z) PC ← Z None 3

RET Subroutine Return PC ← STACK None 4

RETI Interrupt Return PC ← STACK I 4

CPSE Rd, Rr Compare, Skip if Equal if (Rd = Rr) PC=← PC + 2 or 3 None 1/2/3

CP Rd, Rr Compare Rd − Rr Z,N,V,C,H 1

CPC Rd, Rr Compare with Carry Rd − Rr − C Z,N,V,C,H 1

CPI Rd, K Compare Register with Immediate Rd − K Z,N,V,C,H 1

SBRC Rr, b Skip if Bit in Register Cleared if (Rr(b) = 0) PC ← PC + 2 or 3 None 1/2/3

SBRS Rr, b Skip if Bit in Register is Set if (Rr(b) = 1) PC ← PC + 2 or 3 None 1/2/3

SBIC P, b Skip if Bit in I/O Register Cleared if (P(b) = 0) PC ← PC + 2 or 3 None 1/2/3

SBIS P, b Skip if Bit in I/O Register is Set if (P(b) = 1) PC ← PC + 2 or 3 None 1/2/3

BRBS s, k Branch if Status Flag Set if (SREG(s) = 1) then PC ←=PC + k + 1 None 1/2

BRBC s, k Branch if Status Flag Cleared if (SREG(s) = 0) then PC ←=PC + k + 1 None 1/2

BREQ k Branch if Equal if (Z = 1) then PC ← PC + k + 1 None 1/2

BRNE k Branch if Not Equal if (Z = 0) then PC ← PC + k + 1 None 1/2

BRCS k Branch if Carry Set if (C = 1) then PC ← PC + k + 1 None 1/2

BRCC k Branch if Carry Cleared if (C = 0) then PC ← PC + k + 1 None 1/2

BRSH k Branch if Same or Higher if (C = 0) then PC ← PC + k + 1 None 1/2

BRLO k Branch if Lower if (C = 1) then PC ← PC + k + 1 None 1/2

BRMI k Branch if Minus if (N = 1) then PC ← PC + k + 1 None 1/2

BRPL k Branch if Plus if (N = 0) then PC ← PC + k + 1 None 1/2

BRGE k Branch if Greater or Equal, Signed if (N ⊕ V= 0) then PC ← PC + k + 1 None 1/2

BRLT k Branch if Less Than Zero, Signed if (N ⊕ V= 1) then PC ← PC + k + 1 None 1/2

BRHS k Branch if Half-carry Flag Set if (H = 1) then PC ← PC + k + 1 None 1/2

BRHC k Branch if Half-carry Flag Cleared if (H = 0) then PC ← PC + k + 1 None 1/2

BRTS k Branch if T-flag Set if (T = 1) then PC ← PC + k + 1 None 1/2

BRTC k Branch if T-flag Cleared if (T = 0) then PC ← PC + k + 1 None 1/2

BRVS k Branch if Overflow Flag is Set if (V = 1) then PC ← PC + k + 1 None 1/2

BRVC k Branch if Overflow Flag is Cleared if (V = 0) then PC ← PC + k + 1 None 1/2

BRIE k Branch if Interrupt Enabled if (I = 1) then PC ← PC + k + 1 None 1/2

BRID k Branch if Interrupt Disabled if (I = 0) then PC ← PC + k + 1 None 1/2

DATA TRANSFER INSTRUCTIONS

MOV Rd, Rr Move between Registers Rd ← Rr None 1

LDI Rd, K Load Immediate Rd ← K None 1

LD Rd, X Load Indirect Rd ← (X) None 2

LD Rd, X+ Load Indirect and Post-inc. Rd ← (X), X ← X + 1 None 2

LD Rd, -X Load Indirect and Pre-dec. X ← X - 1, Rd ← (X) None 2

8 AT90S/LS85351041HS–11/01

Page 9: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

AT90S/LS8535

LD Rd, Y Load Indirect Rd ← (Y) None 2

LD Rd, Y+ Load Indirect and Post-inc. Rd ← (Y), Y ← Y + 1 None 2

LD Rd, -Y Load Indirect and Pre-dec. Y ← Y - 1, Rd ← (Y) None 2

LDD Rd, Y+q Load Indirect with Displacement Rd ← (Y + q) None 2

LD Rd, Z Load Indirect Rd ← (Z) None 2

LD Rd, Z+ Load Indirect and Post-inc. Rd ← (Z), Z ← Z + 1 None 2

LD Rd, -Z Load Indirect and Pre-dec. Z ← Z - 1, Rd ← (Z) None 2

LDD Rd, Z+q Load Indirect with Displacement Rd ← (Z + q) None 2

LDS Rd, k Load Direct from SRAM Rd ← (k) None 2

ST X, Rr Store Indirect (X)=← Rr None 2

ST X+, Rr Store Indirect and Post-inc. (X)=← Rr, X ← X + 1 None 2

ST -X, Rr Store Indirect and Pre-dec. X ← X - 1, (X) ← Rr None 2

ST Y, Rr Store Indirect (Y) ← Rr None 2

ST Y+, Rr Store Indirect and Post-inc. (Y) ← Rr, Y ← Y + 1 None 2

ST -Y, Rr Store Indirect and Pre-dec. Y ← Y - 1, (Y) ← Rr None 2

STD Y+q, Rr Store Indirect with Displacement (Y + q) ← Rr None 2

ST Z, Rr Store Indirect (Z) ← Rr None 2

ST Z+, Rr Store Indirect and Post-inc. (Z) ← Rr, Z ← Z + 1 None 2

ST -Z, Rr Store Indirect and Pre-dec. Z ← Z - 1, (Z) ← Rr None 2

STD Z+q, Rr Store Indirect with Displacement (Z + q) ← Rr None 2

STS k, Rr Store Direct to SRAM (k) ← Rr None 2

LPM Load Program Memory R0 ← (Z) None 3

IN Rd, P In Port Rd ← P None 1

OUT P, Rr Out Port P ← Rr None 1

PUSH Rr Push Register on Stack STACK ← Rr None 2

POP Rd Pop Register from Stack Rd ← STACK None 2

BIT AND BIT-TEST INSTRUCTIONS

SBI P, b Set Bit in I/O Register I/O(P,b) ← 1 None 2

CBI P, b Clear Bit in I/O Register I/O(P,b) ← 0 None 2

LSL Rd Logical Shift Left Rd(n+1) ← Rd(n), Rd(0) ← 0 Z,C,N,V 1

LSR Rd Logical Shift Right Rd(n) ← Rd(n+1), Rd(7) ← 0 Z,C,N,V 1

ROL Rd Rotate Left through Carry Rd(0) ←=C, Rd(n+1) ← Rd(n), C ←=Rd(7) Z,C,N,V 1

ROR Rd Rotate Right through Carry Rd(7) ←=C, Rd(n) ← Rd(n+1), C ←=Rd(0) Z,C,N,V 1

ASR Rd Arithmetic Shift Right Rd(n) ← Rd(n+1), n = 0..6 Z,C,N,V 1

SWAP Rd Swap Nibbles Rd(3..0) ← Rd(7..4), Rd(7..4) ← Rd(3..0) None 1

BSET s Flag Set SREG(s) ← 1 SREG(s) 1

BCLR s Flag Clear SREG(s) ← 0 SREG(s) 1

BST Rr, b Bit Store from Register to T T ← Rr(b) T 1

BLD Rd, b Bit Load from T to Register Rd(b) ← T None 1

SEC Set Carry C ← 1 C 1

CLC Clear Carry C ← 0 C 1

SEN Set Negative Flag N ← 1 N 1

CLN Clear Negative Flag N ← 0 N 1

SEZ Set Zero Flag Z ← 1 Z 1

CLZ Clear Zero Flag Z ← 0 Z 1

SEI Global Interrupt Enable I ← 1 I 1

CLI Global Interrupt Disable I=← 0 I 1

SES Set Signed Test Flag S ← 1 S 1

CLS Clear Signed Test Flag S ← 0 S 1

SEV Set Two’s Complement Overflow V ← 1 V 1

CLV Clear Two’s Complement Overflow V ← 0 V 1

SET Set T in SREG T ← 1 T 1

CLT Clear T in SREG T ← 0 T 1

SEH Set Half-carry Flag in SREG H ← 1 H 1

CLH Clear Half-carry Flag in SREG H ← 0 H 1

NOP No Operation None 1

SLEEP Sleep (see specific descr. for Sleep function) None 1

WDR Watchdog Reset (see specific descr. for WDR/timer) None 1

Instruction Set Summary (Continued)Mnemonic Operands Description Operation Flags # Clocks

91041HS–11/01

Page 10: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

Ordering InformationPower Supply Speed (MHz) Ordering Code Package Operation Range

2.7 - 6.0V 4 AT90LS8535-4ACAT90LS8535-4JC

AT90LS8535-4PCAT90LS8535-4MC

44A44J

40P644M1

Commercial(0°C to 70°C)

AT90LS8535-4AIAT90LS8535-4JIAT90LS8535-4PI

AT90LS8535-4MI

44A44J40P6

44M1

Industrial(-40°C to 85°C)

4.0 - 6.0V 8 AT90S8535-8AC

AT90S8535-8JCAT90S8535-8PCAT90LS8535-8MC

44A

44J40P644M1

Commercial

(0°C to 70°C)

AT90S8535-8AIAT90S8535-8JI

AT90S8535-8PIAT90LS8535-8MI

44A44J

40P644M1

Industrial(-40°C to 85°C)

Package Type

44A 44-lead, Thin (1.0 mm) Plastic Gull Wing Quad Flat Package (TQFP)

44J 44-lead, Plastic J-leaded Chip Carrier (PLCC)

40P6 40-lead, 0.600" Wide, Plastic Dual Inline Package (PDIP)

44M1 44-pad, 7 x 7 x 1.0 mm body, lead pitch 0.50 mm, Micro Lead Frame Package (MLF)

10 AT90S/LS85351041HS–11/01

Page 11: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

AT90S/LS8535

Packaging Information

44A

1.20(0.047) MAX

10.10(0.394) 9.90(0.386)

SQ

12.25(0.482)11.75(0.462)

SQ

0.75(0.030)0.45(0.018)

0.15(0.006)0.05(0.002)

0.20(0.008)0.09(0.004)

0˚~7˚

0.80(0.0315) BSC

PIN 1 ID

0.45(0.018)0.30(0.012)

PIN 1

*Controlling dimension: millimetter

44-lead, Thin (1.0mm) Plastic Quad Flat Package (TQFP), 10x10mm body, 2.0mm footprint, 0.8mm pitch.Dimension in Millimeters and (Inches)*JEDEC STANDARD MS-026 ACB

REV. A 04/11/2001

111041HS–11/01

Page 12: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

44J

1.14(0.045) X 45˚ PIN NO. 1IDENTIFY

0.813(0.032)0.660(0.026)

1.27(0.050) TYP12.70(0.500) REF SQ

1.14(0.045) X 45˚

0.51(0.020)MAX 45˚ MAX (3X)

0.318(0.0125)0.191(0.0075)

0.533(0.021)

0.330(0.013)

0.50(0.020)MIN

3.05(0.120)2.29(0.090)

4.57(0.180)4.19(0.165)

16.70(0.656)16.50(0.650)

17.70(0.695)17.40(0.685)

SQ

SQ

2.11(0.083)1.57(0.062)

16.00(0.630) 15.00(0.590)

SQ

44J, 44-lead, Plastic J-leaded Chip Carrier (PLCC)Dimensions in Milimeters and (Inches)*JEDEC STANDARD MS-018 AC

*Controlling dimensions: Inches

REV. A 04/11/2001

12 AT90S/LS85351041HS–11/01

Page 13: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

AT90S/LS8535

40P6

52.71(2.075)51.94(2.045) PIN

1

13.97(0.550)13.46(0.530)

0.38(0.015)MIN

0.56(0.022)0.38(0.015)

REF

15.88(0.625)15.24(0.600)

1.65(0.065)1.27(0.050)

17.78(0.700)MAX

0.38(0.015)0.20(0.008)

2.54(0.100)BSC

3.56(0.140)3.05(0.120)

SEATINGPLANE

4.83(0.190)MAX

48.26(1.900) REF

0º ~ 15º

40-lead, Plastic Dual InlineParkage (PDIP), 0.600" wideDemension in Millimeters and (Inches)*JEDEC STANDARD MS-011 AC

*Controlling dimension: Inches

REV. A 04/11/2001

131041HS–11/01

Page 14: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

44M1

2325 Orchard Parkway San Jose, CA 95131

TITLE44M1, 44-pad ,7 x 7 x 1.0 mm body, lead pitch 0.50mm

Micro lead frame package (MLF)

DRAWING NO. REV AR

07/23/01

44M1

E

D2

E2

L

eb

A

A1

SE

AT

ING

PL

AN

E

TOP VIEW

BOTTOM VIEW

SIDE VIEW

Marked pin#1 identifier

PIN #1 CORNER

(*Unit of Measure = mm)COMMON DIMENSIONS

A3

SYMBOL MIN NOM MAX NOTE

E2 2.25 4.70 5.25

D2

L 0.35 0.55 0.75

b

A

2.25 4.70 5.25

0.80 0.90 1.00

0.00 0.02 0.05

0.18 0.23 0.30

0.25 REF

7.00 BSCD

A1

E 7.00 BSC

e 0.50 BSC

A3

NOTE 1. JEDEC STANDARD MO-220, Fig 1 (Saw Singulation), VKKD-1

D

14 AT90S/LS85351041HS–11/01

Page 15: AVR - web.fe.up.ptee00222/pstfc/docs/8535_summary.pdf · ARA R. PD0 - PD7 PC0 - PC7 8-BIT DATA BUS. 4. AT90S/LS8535. 1041HS–11/01. The AVR core combines a rich instruction set with

© Atmel Corporation 2001.Atmel Corporation makes no warranty for the use of its products, other than those expressly contained in the Company’s standard warrantywhich is detailed in Atmel’s Terms and Conditions located on the Company’s web site. The Company assumes no responsibility for any errorswhich may appear in this document, reserves the right to change devices or specifications detailed herein at any time without notice, and doesnot make any commitment to update the information contained herein. No licenses to patents or other intellectual property of Atmel are grantedby the Company in connection with the sale of Atmel products, expressly or by implication. Atmel’s products are not authorized for use as criticalcomponents in life support devices or systems.

Atmel Headquarters Atmel Product Operations

Corporate Headquarters2325 Orchard ParkwaySan Jose, CA 95131TEL (408) 441-0311FAX (408) 487-2600

EuropeAtmel SarLRoute des Arsenaux 41Casa Postale 80CH-1705 FribourgSwitzerlandTEL (41) 26-426-5555FAX (41) 26-426-5500

AsiaAtmel Asia, Ltd.Room 1219Chinachem Golden Plaza77 Mody Road TsimhatsuiEast KowloonHong KongTEL (852) 2721-9778FAX (852) 2722-1369

JapanAtmel Japan K.K.9F, Tonetsu Shinkawa Bldg.1-24-8 ShinkawaChuo-ku, Tokyo 104-0033JapanTEL (81) 3-3523-3551FAX (81) 3-3523-7581

Atmel Colorado Springs1150 E. Cheyenne Mtn. Blvd.Colorado Springs, CO 80906TEL (719) 576-3300FAX (719) 540-1759

Atmel GrenobleAvenue de RochepleineBP 12338521 Saint-Egreve Cedex, FranceTEL (33) 4-7658-3000FAX (33) 4-7658-3480

Atmel HeilbronnTheresienstrasse 2POB 3535D-74025 Heilbronn, GermanyTEL (49) 71 31 67 25 94FAX (49) 71 31 67 24 23

Atmel NantesLa ChantrerieBP 7060244306 Nantes Cedex 3, FranceTEL (33) 0 2 40 18 18 18FAX (33) 0 2 40 18 19 60

Atmel RoussetZone Industrielle13106 Rousset Cedex, FranceTEL (33) 4-4253-6000FAX (33) 4-4253-6001

Atmel Smart Card ICsScottish Enterprise Technology ParkEast Kilbride, Scotland G75 0QRTEL (44) 1355-357-000FAX (44) 1355-242-743

[email protected]

Web Sitehttp://www.atmel.com

Printed on recycled paper.

ATMEL® and AVR® are the registered trademarks of Atmel.

Other terms and product names may be the trademarks of others.

1041HS–11/01/0M