Atmel AT90S1200 Manual Download Page 62

62

AT90S1200 

0838H–AVR–03/02

Notes:

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

should 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 all

bits in the I/O register, writing a “1” back into any flag read as set, thus clearing the flag. The CBI and SBI instructions work
with registers $00 to $1F only.

AT90S1200 Register Summary

Address

Name

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

Page

$3F

SREG

I

T

H

S

V

N

Z

C

page 11

$3E

Reserved

$3D

Reserved

$3C

Reserved

$3B

GIMSK

-

INT0

-

-

-

-

-

-

page 15

$3A

Reserved

$39

TIMSK

-

-

-

-

-

-

TOIE0

-

page 16

$38

TIFR

-

-

-

-

-

-

TOV0

-

page 16

$37

Reserved

$36

Reserved

$35

MCUCR

-

-

SE

SM

-

-

ISC01

ISC00

page 18

$34

Reserved

$33

TCCR0

-

-

-

-

-

CS02

CS01

CS00

page 21

$32

TCNT0

 Timer/Counter0 (8 Bits)

page 22

$31

Reserved

$30

Reserved

$2F

Reserved

$2E

Reserved

$2D

Reserved

$2C

Reserved

$2B

Reserved

$2A

Reserved

$29

Reserved

$28

Reserved

$27

Reserved

$26

Reserved

$25

Reserved

$24

Reserved

$23

Reserved

$22

Reserved

$21

WDTCR

-

-

-

-

WDE

WDP2

WDP1

WDP0

page 23

$20

Reserved

$1F

Reserved

$1E

EEAR

-

 EEPROM Address Register

page 25

$1D

EEDR

   EEPROM Data Register

page 25

$1C

EECR

-

-

-

-

-

-

EEWE

EERE

page 25

$1B

Reserved

$1A

Reserved

$19

Reserved

$18

PORTB

PORTB7

PORTB6

PORTB5

PORTB4

PORTB3

PORTB2

PORTB1

PORTB0

page 29

$17

DDRB

DDB7

DDB6

DDB5

DDB4

DDB3

DDB2

DDB1

DDB0

page 29

$16

PINB

PINB7

PINB6

PINB5

PINB4

PINB3

PINB2

PINB1

PINB0

page 29

$15

Reserved

$14

Reserved

$13

Reserved

$12

PORTD

-

PORTD6

PORTD5

PORTD4

PORTD3

PORTD2

PORTD1

PORTD0

page 34

$11

DDRD

-

DDD6

DDD5

DDD4

DDD3

DDD2

DDD1

DDD0

page 34

$10

PIND

-

PIND6

PIND5

PIND4

PIND3

PIND2

PIND1

PIND0

page 34

$0F

Reserved

 

...

Reserved

$09

Reserved

$08

ACSR

ACD

-

ACO

ACI

ACIE

-

ACIS1

ACIS0

page 27

Reserved

$00

Reserved

Summary of Contents for AT90S1200

Page 1: ...p Analog Comparator Programmable Watchdog Timer with On chip Oscillator SPI Serial Interface for In System Programming Special Microcontroller Features Low power Idle and Power down Modes External and...

Page 2: ...cessed in one single instruction executed in one clock cycle The resulting architecture is more code efficient while achieving throughputs up to ten times faster than conventional CISC microcontroller...

Page 3: ...0 mA and thus drive LED displays directly When pins PB0 to PB7 are used as inputs and are externally pulled low they will source current if the internal pull up resistors are activated The Port B pins...

Page 4: ...clock source If enabled the AT90S1200 can operate with no external compo nents A control bit RCEN in the Flash Memory selects the On chip RC Oscillator as the clock source when programmed 0 The AT90S1...

Page 5: ...a register Single register operations are also executed in the ALU Figure 4 shows the AT90S1200 AVR RISC microcontroller architecture The AVR uses a Har vard architecture concept with separate memorie...

Page 6: ...e only exception is the five constant arithmetic and logic instructions SBCI SUBI CPI ANDI ORI between a constant and a register and the LDI instruction for load immediate constant data These instruct...

Page 7: ...the operation code part of the instruction word To simplify not all figures show the exact location of the addressing bits Register Direct Single Register Rd Figure 6 Direct Single Register Addressing...

Page 8: ...Stack The AT90S1200 uses a 3 level deep hardware stack for subroutines and interrupts The hardware stack is 9 bits wide and stores the Program Counter PC return address while subroutines and interrupt...

Page 9: ...ision is used Figure 11 shows the parallel instruction fetches and instruction executions enabled by the Harvard architecture and the fast access register file concept This is the basic pipe lining co...

Page 10: ...y writing a logical one to them Note that the CBI and SBI instructions will operate on all bits in the I O register writing a one back into any flag read as set thus clearing the flag The CBI and SBI...

Page 11: ...the Instruction Set description for detailed information Bit 4 S Sign Bit S N V The S bit is always an exclusive or between the negative flag N and the two s comple ment overflow flag V See the Instru...

Page 12: ...Sources The AT90S1200 has three sources of reset Power on Reset The MCU is reset when the supply voltage is below the power on Reset threshold VPOT External Reset The MCU is reset when a low level is...

Page 13: ...onnected to VCC directly or via an external pull up resistor By holding the RESET pin low for a period after VCC has Table 3 Reset Characteristics VCC 5 0V Symbol Parameter Min Typ Max Units VPOT 1 Po...

Page 14: ...uaranteed to generate a reset When the applied signal reaches the Reset Threshold Voltage VRST on its positive edge the delay timer starts the MCU after the Time out period tTOUT has expired Figure 16...

Page 15: ...ion s to be cleared If an interrupt condition occurs when the corresponding interrupt enable bit is cleared zero the interrupt flag will be set and remembered until the interrupt is enabled or the fla...

Page 16: ...is enabled The corresponding interrupt at vector 002 is executed if an overflow in Timer Counter0 occurs i e when the TOV0 bit is set in the Timer Counter Interrupt Flag Register TIFR Bit 0 Res Reserv...

Page 17: ...ponse for all the enabled AVR interrupts is four clock cycles minimum Four clock cycles after the interrupt flag has been set the program vector address for the actual interrupt handling routine is ex...

Page 18: ...1 ISC00 Interrupt Sense Control 0 Bit 1 and Bit 0 The External Interrupt 0 is activated by the external pin INT0 if the SREG I flag and the corresponding interrupt mask in the GIMSK register is set Th...

Page 19: ...ts as well as internal ones like Timer Overflow interrupt and Watchdog Reset If wakeup from the Analog Comparator interrupt is not required the Analog Comparator can be powered down by setting the ACD...

Page 20: ...r as a Counter with an external pin connection which triggers the counting Timer Counter0 Prescaler Figure 18 shows the general Timer Counter0 prescaler Figure 18 Timer Counter0 Prescaler The four dif...

Page 21: ...ynchronized with the oscillator frequency of the CPU To assure proper sampling of the external clock the minimum time between two external clock transitions must be at least one internal CPU clock per...

Page 22: ...s feature can give the user SW control of the counting Timer Counter0 TCNT0 The Timer Counter0 is realized as an up counter with read and write access If the Timer Counter0 is written and a clock sour...

Page 23: ...es without another WDR instruction the AT90S1200 resets and executes from the Reset Vector For timing details on the Watchdog Reset refer to page 14 Figure 20 Watchdog Timer Watchdog Timer Control Reg...

Page 24: ...Reset the Watchdog Timer may not start to count from zero To avoid unintentional MCU resets the Watchdog Timer should be disabled or reset before changing the Watchdog Timer Prescale Select Table 6 Wa...

Page 25: ...When the EEPROM is read or written the CPU is halted for two clock cycles before the next instruction is executed EEPROM Address Register EEAR Bit 7 6 Res Reserved Bits These bits are reserved bits in...

Page 26: ...write operation to avoid these problems Prevent EEPROM Corruption During periods of low VCC the EEPROM data can be corrupted because the supply volt age is too low for the CPU and the EEPROM to operat...

Page 27: ...ive and Idle modes When changing the ACD bit the Analog Comparator Interrupt must be disabled by clearing the ACIE bit in ACSR Otherwise an interrupt can occur when the bit is changed Bit 6 Res Reserv...

Page 28: ...arator Interrupt Mode Select These bits determine which comparator events trigger the Analog Comparator Interrupt The different settings are shown in Table 7 Note When changing the ACIS1 ACIS0 bits th...

Page 29: ...B pins with alternate functions are shown in Table 8 When the pins are used for the alternate function the DDRB and PORTB register has to be set according to the alternate function description Port B...

Page 30: ...of Port B are SCK Port B Bit 7 SCK Clock Input pin for memory up downloading MISO Port B Bit 6 MISO Data Output pin for memory uploading MOSI Port B Bit 5 MOSI Data Input pin for memory downloading A...

Page 31: ...AT90S1200 0838H AVR 03 02 Port B Schematics Note that all port pins are synchronized The synchronization latches are however not shown in the figures Figure 22 Port B Schematic Diagram Pins PB0 and P...

Page 32: ...32 AT90S1200 0838H AVR 03 02 Figure 23 Port B Schematic Diagram Pins PB2 PB3 and PB4 Figure 24 Port B Schematic Diagram Pin PB5 2...

Page 33: ...33 AT90S1200 0838H AVR 03 02 Figure 25 Port B Schematic Diagram Pin PB6 Figure 26 Port B Schematic Diagram Pin PB7...

Page 34: ...he pins are read Port D as General Digital I O PDn general I O pin The DDDn bit in the DDRD Register selects the direction of this pin If DDDn is set one PDn is configured as an output pin If DDDn is...

Page 35: ...e the interrupt description for further details Port D Schematics Note that all port pins are synchronized The synchronization latches are however not shown in the figures Figure 27 Port D Schematic D...

Page 36: ...Pin PD2 Figure 29 Port D Schematic Diagram Pin PD4 DATA BUS D D Q Q RESET RESET C C WD WP RD MOS PULL UP PD4 R R WP WD RL RP RD WRITE PORTD WRITE DDRD READ PORTD LATCH READ PORTD PIN READ DDRD DDD4 PO...

Page 37: ...are 1 00 1E indicates manufactured by Atmel 2 01 90 indicates 1 Kb Flash memory 3 02 01 indicates AT90S1200 device when 01 is 90 Note When both Lock bits are programmed lock mode 3 the signature byte...

Page 38: ...mes The XA1 XA0 pins determines the action executed when the XTAL1 pin is given a posi tive pulse The coding is shown in Table 15 When pulsing WR or OE the command loaded determines the action execute...

Page 39: ...DATA to 1000 0000 This is the command for Chip Erase 4 Give XTAL1 a positive pulse This loads the command 5 Give WR a tWLWH_CE wide negative pulse to execute Chip Erase tWLWH_CE is found in Table 17...

Page 40: ...it until RDY BSY goes high to program the next byte See Figure 31 for signal waveforms F Load Data High Byte 1 Set XA1 XA0 to 01 This enables data loading 2 Set DATA Data high byte 00 FF 3 Give XTAL1...

Page 41: ...ash for details on command and address loading 1 A Load Command 0000 0010 2 B Load Address High Byte 00 01 3 C Load Address Low Byte 00 FF 4 Set OE to 0 and BS to 0 The Flash word low byte can now be...

Page 42: ...e Bit 7 6 4 1 1 These bits are reserved and should be left unprogrammed 1 3 Give WR a tWLWH_PFB wide negative pulse to execute the programming tWLWH_PFB is found in Table 17 Programming the Fuse bits...

Page 43: ...er Min Typ Max Units VPP Programming Enable Voltage 11 5 12 5 V IPP Programming Enable Current 250 0 A tDVXH Data and Control Setup before XTAL1 High 67 0 ns tXHXL XTAL1 Pulse Width High 67 0 ns tXLDX...

Page 44: ...XTAL1 or a crystal needs to be con nected across pins XTAL1 and XTAL2 The minimum low and high periods for the Serial Clock SCK input are defined as follows Low 1 XTAL1 clock cycle High 4 XTAL1 clock...

Page 45: ...ogrammed will give the value P1 until the auto erase is finished and then the value P2 See Table 18 for P1 and P2 values At the time the device is ready for a new EEPROM byte the programmed value will...

Page 46: ...0x xxxx xxxx xxxx xxxx xxxx Chip erase both Flash and EEPROM memory arrays Read Program Memory 0010 H000 0000 000a bbbb bbbb oooo oooo Read H high or low byte o from program memory at word address a b...

Page 47: ...4 0 6 0V 0 12 0 MHz tCLCL Oscillator Period VCC 4 0 6 0V 83 3 ns tSHSL SCK Pulse Width High 4 0 tCLCL ns tSLSH SCK Pulse Width Low tCLCL ns tOVSH MOSI Setup to SCK High 1 25 tCLCL ns tSHOX MOSI Hold a...

Page 48: ...Pins 200 0 mA DC Characteristics TA 40 C to 85 C VCC 2 7V to 6 0V unless otherwise noted Symbol Parameter Condition Min Typ Max Units VIL Input Low Voltage Except XTAL1 0 5 0 3 VCC 1 V VIL1 Input Low...

Page 49: ...Although each I O port can source more than the test conditions 3 mA at VCC 5V 1 5 mA at VCC 3V under steady state conditions non transient the following must be observed 1 The sum of all IOH for all...

Page 50: ...rive VIL1 VIH1 Table 23 External Clock Drive Symbol Parameter VCC 2 7V to 4 0V VCC 4 0V to 6 0V Units Min Max Min Max 1 tCLCL Oscillator Frequency 0 4 0 0 12 0 MHz tCLCL Clock Period 250 0 83 3 ns tCH...

Page 51: ...erating voltage and frequency The current drawn from capacitive loaded pins may be estimated for one pin as CL VCC f where CL load capacitance VCC operating voltage and f average switching frequency o...

Page 52: ...e Clocked by Internal Oscillator 0 1 2 3 4 5 6 7 8 9 10 2 2 5 3 3 5 4 4 5 5 5 5 6 ACTIVE SUPPLY CURRENT vs Vcc FREQUENCY 4 MHz I cc mA Vcc V T 85 C A T 25 C A T 40 C A 0 1 2 3 4 5 6 7 2 2 5 3 3 5 4 4...

Page 53: ...2 5 3 3 5 4 4 5 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Vcc 6V Vcc 5 5V Vcc 5V Vcc 4 5V Vcc 4V Vcc 3 6V Vcc 3 3V Vcc 3 0V Vcc 2 7V IDLE SUPPLY CURRENT vs FREQUENCY T 25 C A Frequency MHz I cc mA 0 0...

Page 54: ...chdog Timer Disabled 0 0 05 0 1 0 15 0 2 0 25 0 3 0 35 0 4 2 2 5 3 3 5 4 4 5 5 5 5 6 T 25 C A T 85 C A IDLE SUPPLY CURRENT vs Vcc I cc mA Vcc V DEVICE CLOCKED BY INTERNAL RC OSCILLATOR 0 0 2 0 4 0 6 0...

Page 55: ...nal RC Oscillator Frequency vs VCC 0 20 40 60 80 100 120 140 2 2 5 3 3 5 4 4 5 5 5 5 6 T 85 C A T 25 C A POWER DOWN SUPPLY CURRENT vs Vcc I cc Vcc V WATCHDOG TIMER ENABLED 0 200 400 600 800 1000 1200...

Page 56: ...og Comparator Offset Voltage vs Common Mode Voltage 0 0 2 0 4 0 6 0 8 1 1 2 2 2 5 3 3 5 4 4 5 5 5 5 6 ANALOG COMPARATOR CURRENT vs Vcc I cc mA Vcc V T 25 C A T 85 C A T 40 C A 0 2 4 6 8 10 12 14 16 18...

Page 57: ...r Input Leakage Current 0 2 4 6 8 10 0 0 5 1 1 5 2 2 5 3 ANALOG COMPARATOR OFFSET VOLTAGE vs COMMON MODE VOLTAGE Common Mode Voltage V Offset Voltage mV V 2 7V cc T 85 C A T 25 C A 60 50 40 30 20 10 0...

Page 58: ...Current vs Input Voltage Figure 52 Pull up Resistor Current vs Input Voltage 0 20 40 60 80 100 120 0 0 5 1 1 5 2 2 5 3 3 5 4 4 5 5 PULL UP RESISTOR CURRENT vs INPUT VOLTAGE V 5V cc I A OP V V OP T 85...

Page 59: ...ource Current vs Output Voltage 0 10 20 30 40 50 60 70 0 0 5 1 1 5 2 2 5 3 V 5V cc I mA OL V V OL T 85 C A T 25 C A I O PIN SINK CURRENT vs OUTPUT VOLTAGE 0 2 4 6 8 10 12 14 16 18 20 0 0 5 1 1 5 2 2 5...

Page 60: ...igure 56 I O Pin Source Current vs Output Voltage 0 5 10 15 20 25 0 0 5 1 1 5 2 I mA OL V V OL T 85 C A T 25 C A I O PIN SINK CURRENT vs OUTPUT VOLTAGE V 2 7V cc 0 1 2 3 4 5 6 0 0 5 1 1 5 2 2 5 3 I O...

Page 61: ...57 I O Pin Input Threshold Voltage vs VCC Figure 58 I O Pin Input Hysteresis vs VCC 0 0 5 1 1 5 2 2 5 2 7 4 0 5 0 Threshold Voltage V Vcc I O PIN INPUT THRESHOLD VOLTAGE vs Vcc T 25 C A 0 0 02 0 04 0...

Page 62: ...rved 33 TCCR0 CS02 CS01 CS00 page 21 32 TCNT0 Timer Counter0 8 Bits page 22 31 Reserved 30 Reserved 2F Reserved 2E Reserved 2D Reserved 2C Reserved 2B Reserved 2A Reserved 29 Reserved 28 Reserved 27 R...

Page 63: ...PC PC 2 or 3 None 1 2 SBRS Rr b Skip if Bit in Register is Set if Rr b 1 PC PC 2 or 3 None 1 2 SBIC P b Skip if Bit in I O Register Cleared if P b 0 PC PC 2 or 3 None 1 2 SBIS P b Skip if Bit in I O...

Page 64: ...ter 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...

Page 65: ...C to 70 C AT90S1200 4PI AT90S1200 4SI AT90S1200 4YI 20P3 20S 20Y Industrial 40 C to 85 C 12 4 0 6 0V AT90S1200 12PC AT90S1200 12SC AT90S1200 12YC 20P3 20S 20Y Commercial 0 C to 70 C AT90S1200 12PI AT...

Page 66: ...NE A D e eB eC COMMON DIMENSIONS Unit of Measure mm SYMBOL MIN NOM MAX NOTE A 5 334 A1 0 381 D 25 984 25 493 Note 2 E 7 620 8 255 E1 6 096 7 112 Note 2 B 0 356 0 559 B1 1 270 1 551 L 2 921 3 810 C 0 2...

Page 67: ...1 27 0 050 BSC 13 00 0 5118 12 60 0 4961 0 30 0 0118 0 10 0 0040 2 65 0 1043 2 35 0 0926 0 8 1 27 0 050 0 40 0 016 0 32 0 0125 0 23 0 0091 Controlling dimension Inches 20S 20 lead Plastic Gull Wing S...

Page 68: ...0 015 0 25 0 010 PIN 1 ID 7 33 0 289 7 07 0 278 0 21 0 008 0 05 0 002 1 99 0 078 1 73 0 068 0 20 0 008 0 09 0 004 0 95 0 037 0 63 0 025 0 8 PIN 1 20Y 20 lead Plastic Shrink Small Outline SSOP 5 3mm b...

Page 69: ...upt Hardware Stack 8 EEPROM Data Memory 9 Instruction Execution Timing 9 I O Memory 10 Reset and Interrupt Handling 12 Sleep Modes 19 Timer Counter0 20 Timer Counter0 Prescaler 20 Watchdog Timer 23 EE...

Page 70: ...mum Ratings 48 DC Characteristics 48 External Clock Drive Waveforms 50 External Clock Drive 50 Typical Characteristics 51 AT90S1200 Register Summary 62 Instruction Set Summary 63 Ordering Information...

Page 71: ...Tonetsu Shinkawa Bldg 1 24 8 Shinkawa Chuo ku Tokyo 104 0033 Japan TEL 81 3 3523 3551 FAX 81 3 3523 7581 Memory Atmel Corporate 2325 Orchard Parkway San Jose CA 95131 TEL 1 408 436 4270 FAX 1 408 436...

Page 72: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information Atmel AT90S1200 12SC AT90S1200A 4YI AT90S1200A 4SI AT90S1200A 12PC AT90S1200A 4PC...

Reviews: