![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
1 features ? utilizes the avr ? risc architecture 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 10 mips throughput at 10 mhz data and nonvolatile program memory ? 2k bytes of in-system programmable flash endurance: 1,000 write/erase cycles ? 128 bytes internal ram ? 128 bytes of in-system programmable eeprom endurance: 100,000 write/erase cycles ? programming lock for flash program and eeprom data security peripheral features ? one 8-bit timer/counter with separate prescaler ? 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 internal interrupt sources ? power-on reset circuit ? selectable on-chip rc oscillator specifications ? low-power, high-speed cmos process technology ? fully static operation power consumption at 4 mhz, 3v, 25 c ? active: 2.4 ma ? idle mode: 0.5 ma ? power-down mode: <1 a i/o and packages ? three programmable i/o lines for at90s/ls2323 ? five programmable i/o lines for at90s/ls2343 ? 8-pin pdip and soic operating voltages ? 4.0 - 6.0v for at90s2323/at90s2343 ? 2.7 - 6.0v for at90ls2323/at90ls2343 speed grades ? 0 - 10 mhz for at90s2323/at90s2343-10 ? 0 - 4 mhz for at90ls2323/at90ls2343-4 ? 0 - 1 mhz for at90ls2343-1 pin configuration pdip/soic 1 2 3 4 8 7 6 5 reset xtal1 xtal2 gnd vcc pb2 (sck/t0) pb1 (miso/int0) pb0 (mosi) at90s/ls2323 1 2 3 4 8 7 6 5 reset (clock) pb3 pb4 gnd vcc pb2 (sck/t0) pb1 (miso/int0) pb0 (mosi) at90s/ls2343 8-bit microcontroller with 2k bytes of in-system programmable flash at90s2323 at90ls2323 at90s2343 at90ls2343 rev. 1004d ? 09/01
2 at90s/ls2323/2343 1004d ? 09/01 description the at90s/ls2323 and at90s/ls2343 are low-power, cmos, 8-bit microcontrollers based on the avr risc architecture. by executing powerful instructions in a single clock cycle, the at90s2323/2343 achieves throughputs approaching 1 mips per mhz allowing the system designer to optimize power consumption versus processing speed. 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 in one clock cycle. the resulting architecture is more code efficient while achieving throughputs up to ten times faster than conventional cisc microcontrollers. block diagram figure 1. the at90s/ls2343 block diagram program counter internal oscillator watchdog timer stack pointer program flash mcu control register sram general purpose registers instruction register timer/ counter instruction decoder data dir. reg. portb data register portb programming logic timing and control interrupt unit eeprom spi status register z y x alu portb drivers pb0 - pb4 reset vcc gnd control lines 8-bit data bus 3 at90s/ls2323/2343 1004d ? 09/01 figure 2. the at90s/ls2323 block diagram the at90s2323/2343 provides the following features: 2k bytes of in-system program- mable flash, 128 bytes eeprom, 128 bytes sram, 3 (at90s/ls2323)/5 (at90s/ls2343) general-purpose i/o lines, 32 general-purpose working registers, an 8- bit timer/counter, internal and external interrupts, programmable watchdog timer with internal oscillator, an spi serial port for flash memory downloading and two software- selectable power-saving modes. the idle mode stops the cpu while allowing the sram, timer/counters, spi port and interrupt system to continue functioning. the power-down mode saves the register contents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset. the device is manufactured using atmel ? s high-density nonvolatile memory technology. the on-chip flash allows the program memory to be reprogrammed in-system through an spi serial interface. by combining an 8-bit risc cpu with isp flash on a monolithic program counter internal oscillator watchdog timer stack pointer program flash mcu control register sram general purpose registers instruction register timer/ counter instruction decoder data dir. reg. portb data register portb programming logic timing and control oscillator interrupt unit eeprom spi status register z y x alu portb drivers pb0 - pb2 reset vcc gnd control lines 8-bit data bus 4 at90s/ls2323/2343 1004d ? 09/01 chip, the atmel at90s2323/2343 is a powerful microcontroller that provides a highly flexible and cost-effective solution to many embedded control applications. the at90s2323/2343 avr is supported with a full suite of program and system devel- opment tools including: c compilers, macro assemblers, program debugger/simulators, in-circuit emulators and evaluation kits. comparison between at90s/ls2323 and at90s/ls2343 the at90s/ls2323 is intended for use with external quartz crystal or ceramic resonator as the clock source. the start-up time is fuse-selectable as either 1 ms (suitable for ceramic resonator) or 16 ms (suitable for crystal). the device has three i/o pins. the at90s/ls2343 is intended for use with either an external clock source or the inter- nal rc oscillator as clock source. the device has five i/o pins. table 1 summarizes the differences in features of the two devices. pin descriptions at90s/ls2323 vcc supply voltage pin. gnd ground pin. port b (pb2..pb0) port b is a 3-bit bi-directional i/o port with internal pull-up resistors. the port b output buffers can sink 20 ma. as inputs, port b pins that are externally pulled low, will source current if the pull-up resistors are activated. port b also serves the functions of various special features. port pins can provide internal pull-up resistors (selected for each bit). the port b pins are tri-stated when a reset condition becomes active. reset reset input. an external reset is generated by a low level on the reset pin. reset pulses longer than 50 ns will generate a reset, even if the clock is not running. 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. table 1. feature difference summary part at90s/ls2323 at90s/ls2343 on-chip oscillator amplifier yes no internal rc clock no yes pb3 available as i/o pin never internal clock mode pb4 available as i/o pin never always start-up time 1 ms/16 ms 16 s fixed 5 at90s/ls2323/2343 1004d ? 09/01 pin descriptions at90s/ls2343 vcc supply voltage pin. gnd ground pin. port b (pb4..pb0) port b is a 5-bit bi-directional i/o port with internal pull-up resistors. the port b output buffers can sink 20 ma. as inputs, port b pins that are externally pulled low, will source current if the pull-up resistors are activated. port b also serves the functions of various special features. port pins can provide internal pull-up resistors (selected for each bit). the port b pins are tri-stated when a reset condition becomes active. reset reset input. an external reset is generated by a low level on the reset pin. reset pulses longer than 50 ns will generate a reset, even if the clock is not running. shorter pulses are not guaranteed to generate a reset. clock clock signal input in external clock mode. clock options crystal oscillator the at90s/ls2323 contains an inverting amplifier that can be configured for use as an on-chip oscillator, as shown in figure 3. xtal1 and xtal2 are input and output respectively. either a quartz crystal or a ceramic resonator may be used. it is recom- mended that the at90s/ls2343 be used if an external clock source is used, since this gives an extra i/o pin. figure 3. oscillator connection external clock the at90s/ls2343 can be clocked by an external clock signal, as shown in figure 4, or by the on-chip rc oscillator. this rc oscillator runs at a nominal frequency of 1 mhz (v cc = 5v). a fuse bit (rcen) in the flash memory selects the on-chip rc oscillator as the clock source when programmed ( ? 0 ? ). the at90s/ls2343 is shipped with this bit programmed. the at90s/ls2343 is recommended if an external clock source is used, because this gives an extra i/o pin. the at90s/ls2323 can be clocked by an external clock as well, as shown in figure 4. no fuse bit selects the clock source for at90s/ls2323. 6 at90s/ls2323/2343 1004d ? 09/01 figure 4. external clock drive configuration gnd gnd external oscilator signal external oscilator signal nc xtal2 xtal1 pb3 at90s/ls2323 at90s/ls2343 7 at90s/ls2323/2343 1004d ? 09/01 architectural overview the fast-access register file concept contains 32 x 8-bit general-purpose working regis- ters with a single clock cycle access time. this means that during one single clock cycle, one alu (arithmetic logic unit) operation is executed. two operands are output from the register file, the operation is executed and the result is stored back in the register file ? in one clock cycle. six of the 32 registers can be used as three 16-bit indirect address register pointers for data space addressing, enabling efficient address calculations. one of the three address pointers is also used as the address pointer for the constant table look-up func- tion. these added function registers are the 16-bit x-, y-, and z-register. figure 5. the at90s2323/2343 avr risc architecture the alu supports arithmetic and logic functions between registers or between a con- stant and a register. single register operations are also executed in the alu. figure 5 shows the at90s2323/2343 avr risc microcontroller architecture. in addition to the register operation, the conventional memory addressing modes can be used on the register file as well. this is enabled by the fact that the register file is assigned the 32 lowermost data space addresses ($00 - $1f), allowing them to be accessed as though they were ordinary memory locations. the i/o memory space contains 64 addresses for cpu peripheral functions such as control registers, timer/counters, a/d converters and other i/o functions. the i/o memory can be accessed directly or as the data space locations following those of the register file, $20 - $5f. 1k x 16 program flash instruction register instruction decoder program counter control lines 32 x 8 general purpose registers alu status and test control registers interrupt unit spi unit 8-bit timer/counter watchdog timer i/o lines 128 x 8 eeprom data bus 8-bit 128 x 8 data sram direct addressing indirect addressing 8 at90s/ls2323/2343 1004d ? 09/01 the avr has harvard architecture ? with separate memories and buses for program and data. the program memory is accessed with a two-stage pipeline. while one instruction is being executed, the next instruction is pre-fetched from the program mem- ory. this concept enables instructions to be executed in every clock cycle. the program memory is in-system downloadable flash memory. with the relative jump and call instructions, the whole 1k address space is directly accessed. most avr instructions have a single 16-bit word format. every program memory address contains a 16- or 32-bit instruction. during interrupts and subroutine calls, the return address program counter (pc) is stored on the stack. the stack is effectively allocated in the general data sram and consequently, the stack size is only limited by the total sram size and the usage of the sram. all user programs must initialize the sp in the reset routine (before subroutines or interrupts are executed). the 8-bit stack pointer (sp) is read/write-accessible in the i/o space. the 128 bytes data sram + register file and i/o registers can be easily accessed through the five different addressing modes supported in the avr architecture. the memory spaces in the avr architecture are all linear and regular memory maps. figure 6. memory maps a flexible interrupt module has its control registers in the i/o space with an additional global interrupt enable bit in the status register. all the different interrupts have a sepa- rate interrupt vector in the interrupt vector table at the beginning of the program memory. the different interrupts have priority in accordance with their interrupt vector position. the lower the interrupt vector address, the higher the priority. eeprom (128 x 8) $000 $07f eeprom data memory 9 at90s/ls2323/2343 1004d ? 09/01 general-purpose register file figure 7 shows the structure of the 32 general-purpose registers in the cpu. figure 7. avr cpu general-purpose working registers all the register operating instructions in the instruction set have direct and single-cycle access to all registers. the only exception is the five constant arithmetic and logic instructions sbci, subi, cpi, andi and ori between a constant and a register and the ldi instruction for load immediate constant data. these instructions apply to the second half of the registers in the register file (r16..r31). the general sbc, sub, cp, and and or and all other operations between two registers or on a single register apply to the entire register file. as shown in figure 7, each register is also assigned a data memory address, mapping them directly into the first 32 locations of the user data space. although the register file is not physically implemented as sram locations, this memory organization provides great flexibility in access of the registers, as the x-, y-, and z-registers can be set to index any register in the file. 70addr. r0 $00 r1 $01 r2 $02 ? r13 $0d general r14 $0e purpose r15 $0f working r16 $10 registers r17 $11 ? r26 $1a x-register low byte r27 $1b x-register high byte r28 $1c y-register low byte r29 $1d y-register high byte r30 $1e z-register low byte r31 $1f z-register high byte 10 at90s/ls2323/2343 1004d ? 09/01 x-register, y-register and z- register the registers r26..r31 have some added functions to their general-purpose usage. these registers are the address pointers for indirect addressing of the data space. the three indirect address registers x, y, and z, are defined in figure 8. figure 8. the x-, y-, and z-registers in the different addressing modes, these address registers have functions as fixed dis- placement, automatic increment and decrement (see the descriptions for the different instructions). alu ? arithmetic logic unit the high-performance avr alu operates in direct connection with all the 32 general- purpose working registers. within a single clock cycle, alu operations between regis- ters in the register file are executed. the alu operations are divided into three main categories: arithmetic, logic and bit functions. in-system programmable flash program memory the at90s2323/2343 contains 2k bytes on-chip, in-system programmable flash memory for program storage. since all instructions are 16- or 32-bit words, the flash is organized as 1k x 16. the flash memory has an endurance of at least 1000 write/erase cycles. the at90s2323/2343 program counter (pc) is 10 bits wide, hence addressing the 1024 program memory addresses. see page 42 for a detailed description on flash data programming. constant tables must be allocated within the address 0 - 2k (see the lpm ? load pro- gram memory instruction description on page 60). see page 12 for the different addressing modes. eeprom data memory the at90s2323/2343 contains 128 bytes of eeprom data memory. it is organized as a separate data space, in which single bytes can be read and written. the eeprom has an endurance of at least 100,000 write/erase cycles. the access between the eeprom and the cpu is described on page 32, specifying the eeprom address register, the eeprom data register and the eeprom control register. for the spi data downloading, see page 42 for a detailed description. 15 0 x-register 7 0 7 0 r27 ($1b) r26 ($1a) 15 0 y-register 7 0 7 0 r29 ($1d) r28 ($1c) 15 0 z-register 7 0 7 0 r31 ($1f) r30 ($1e) 11 at90s/ls2323/2343 1004d ? 09/01 sram data memory figure 9 shows how the at90s2323/2343 data memory is organized. figure 9. sram organization the 224 data memory locations address the register file, i/o memory and the data sram. the first 96 locations address the register file + i/o memory, and the next 128 locations address the data sram. the five different addressing modes for the data memory cover: direct, indirect with dis- placement, indirect, indirect with pre-decrement and indirect with post-increment. in the register file, registers r26 to r31 feature the indirect addressing pointer registers. the direct addressing reaches the entire data address space. the indirect with displacement mode features 63 address locations reached from the base address given by the y- and z-register. when using register indirect addressing modes with automatic pre-decrement and post- increment, the address registers x, y, and z are used and decremented and incremented. the 32 general-purpose working registers, 64 i/o registers and the 128 bytes of data sram in the at90s2323/2343 are all directly accessible through all these addressing modes. register file data address space r0 $00 r1 $01 r2 $02 ?? r29 $1d r30 $1e r31 $1f i/o registers $00 $20 $01 $21 $02 $22 ?? $3d $5d $3e $5e $3f $5f internal sram $60 $61 $62 ? $dd $de $df 12 at90s/ls2323/2343 1004d ? 09/01 program and data addressing modes the at90s2323/2343 avr risc microcontroller supports powerful and efficient addressing modes for access to the program memory (flash) and data memory. this section describes the different addressing modes supported by the avr architecture. in the figures, op means 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 10. direct single register addressing the operand is contained in register d (rd). register direct, two registers rd and rr figure 11. direct register addressing, two registers operands are contained in register r (rr) and d (rd). the result is stored in register d (rd). 13 at90s/ls2323/2343 1004d ? 09/01 i/o direct figure 12. i/o direct addressing operand address is contained in six bits of the instruction word. n is the destination or source register address. data direct figure 13. direct data addressing a 16-bit data address is contained in the 16 lsbs of a 2-word instruction. rd/rr specify the destination or source register. data indirect with displacement figure 14. data indirect with displacement operand address is the result of the y- or z-register contents added to the address con- tained in six bits of the instruction word. 14 at90s/ls2323/2343 1004d ? 09/01 data indirect figure 15. data indirect addressing operand address is the contents of the x-, y-, or the z-register. data indirect with pre- decrement figure 16. data indirect addressing with pre-decrement the x-, y-, or the z-register is decremented before the operation. operand address is the decremented contents of the x-, y-, or the z-register. data indirect with post- increment figure 17. data indirect addressing with post-increment the x-, y-, or the z-register is incremented after the operation. operand address is the content of the x-, y-, or the z-register prior to incrementing. +1 15 at90s/ls2323/2343 1004d ? 09/01 constant addressing using the lpm instruction figure 18. code memory constant addressing constant byte address is specified by the z-register contents. the 15 msbs select word address (0 - 1k), the lsb selects low byte if cleared (lsb = 0) or high byte if set (lsb = 1). indirect program addressing, ijmp and icall figure 19. indirect program memory addressing program execution continues at address contained by the z-register (i.e., the pc is loaded with the contents of the z-register). relative program addressing, rjmp and rcall figure 20. relative program memory addressing program execution continues at address pc + k + 1. the relative address k is -2048 to 2047. +1 16 at90s/ls2323/2343 1004d ? 09/01 memory access and instruction execution timing this section describes the general access timing concepts for instruction execution and internal memory access. the avr cpu is driven by the system clock ? , directly generated from the external clock signal applied to the clock pin. no internal clock division is used. figure 21. 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 concept to obtain up to 1 mips per mhz with the corresponding unique results for functions per cost, functions per clocks and functions per power unit. figure 21. the parallel instruction fetches and instruction executions figure 22. shows the internal timing concept for the register file. in a single clock cycle an alu operation using two register operands is executed and the result is stored back to the destination register. figure 22. single cycle alu operation the internal data sram access is performed in two system clock cycles as described in figure 23.. system clock ? 1st instruction fetch 1st instruction execute 2nd instruction fetch 2nd instruction execute 3rd instruction fetch 3rd instruction execute 4th instruction fetch t1 t2 t3 t4 system clock ? total execution time register operands fetch alu operation execute result write back t1 t2 t3 t4 17 at90s/ls2323/2343 1004d ? 09/01 figure 23. on-chip data sram access cycles i/o memory the i/o space definition of the at90s2323/2343 is shown in table 2. note: reserved and unused locations are not shown in the table. all at90s2323/2343 i/os and peripherals are placed in the i/o space. the i/o locations are accessed by the in and out instructions transferring data between the 32 general- purpose working registers and the i/o space. i/o registers within the address range $00 - $1f are directly bit-accessible using the sbi and cbi instructions. in these registers, the value of single bits can be checked by using the sbis and sbic instructions. refer to the instruction set section for more details. when using the i/o-specific commands in system clock ? wr rd data data address address t1 t2 t3 t4 prev. address read write table 2. at90s2323/2343 i/o space address hex name function $3f ($5f) sreg status register $3d ($5d) spl stack pointer low $3b ($5b) gimsk general interrupt mask register $3a ($5a) gifr general interrupt flag register $39 ($59) timsk timer/counter interrupt mask register $38 ($58) tifr timer/counter interrupt flag register $35 ($55) mcucr mcu control register $34 ($54) mcusr mcu status register $33 ($53) tccr0 timer/counter0 control register $32 ($52) tcnt0 timer/counter0 (8-bit) $21 ($41) wdtcr watchdog timer control register $1e ($3e) eear eeprom address register $1d ($3d) eedr eeprom data register $1c ($3c) eecr eeprom control register $18 ($38) portb data register, port b $17 ($37) ddrb data direction register, port b $16 ($36) pinb input pins, port b 18 at90s/ls2323/2343 1004d ? 09/01 and out, the i/o addresses $00 - $3f must be used. when addressing i/o registers as sram, $20 must be added to these addresses. all i/o register addresses throughout this document are shown with the sram address in parentheses. for compatibility with future devices, reserved bits should be written to zero if accessed. reserved i/o memory addresses should never be written. 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. the i/o and peripherals control registers are explained in the following sections. status register ? sreg the avr status register (sreg) at i/o space location $3f ($5f) is defined as: bit 7 ? i: global interrupt enable the global interrupt enable bit must be set (one) for the interrupts to be enabled. the individual interrupt enable control is then performed in separate control registers. if the global interrupt enable register is cleared (zero), none of the interrupts are enabled inde- pendent of the individual interrupt enable settings. the i-bit is cleared by hardware after an interrupt has occurred and is set by the reti instruction to enable subsequent interrupts. bit 6 ? t: bit copy storage the bit copy instructions bld (bit load) and bst (bit store) use the t-bit as source and destination for the operated bit. a bit from a register in the register file can be copied into t by the bst instruction and a bit in t can be copied into a bit in a register in the register file by the bld instruction. bit 5 ? h: half-carry flag the half-carry flag h indicates a half-carry in some arithmetic operations. see 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 instruction set description for detailed information. bit 3 ? v: two ? s complement overflow flag the two ? s complement overflow flag v supports two ? s complement arithmetics. see the instruction set description for detailed information. bit 2 ? n: negative flag the negative flag n indicates a negative result from an arithmetical or logical operation. see the instruction set description for detailed information. bit 1 ? z: zero flag the zero flag z indicates a zero result from an arithmetical or logical operation. see the instruction set description for detailed information. bit 76543210 $3f ($5f) i t h s v n z c sreg read/write r/w r/w r/w r/w r/w r/w r/w r/w initial value00000000 19 at90s/ls2323/2343 1004d ? 09/01 bit 0 ? c: carry flag the carry flag c indicates a carry in an arithmetical or logical operation. see the instruc- tion set description for detailed information. note that the status register is not automatically stored when entering an interrupt rou- tine and restored when returning from an interrupt routine. this must be handled by software. stack pointer ? spl an 8-bit register at i/o address $3d ($5d) forms the stack pointer of the at90s2323/2343. eight bits are used to address the 128 bytes of sram in locations $60 - $df. the stack pointer points to the data sram stack area where the subroutine and inter- rupt stacks are located. this stack space in the data sram must be defined by the program before any subroutine calls are executed or interrupts are enabled. the stack pointer must be set to point above $60. the stack pointer is decremented by 1 when data is pushed onto the stack with the push instruction and it is decremented by 2 when an address is pushed onto the stack with subroutine calls and interrupts. the stack pointer is incremented by 1 when data is popped from the stack with the pop instruction and it is incremented by 2 when an address is popped from the stack with return from subroutine ret or return from interrupt reti. reset and interrupt handling the at90s2323/2343 provides two interrupt sources. these interrupts and the separate reset vector each have a separate program vector in the program memory space. both interrupts are assigned individual enable bits that must be set (one) together with the i-bit in the status register in order to enable the interrupt. the lowest addresses in the program memory space are automatically defined as the reset and interrupt vectors. the complete list of vectors is shown in table 3. the list also determines the priority levels of the interrupts. the lower the address, the higher the priority level. reset has the highest priority, and next is int0 (the external interrupt request 0), etc. bit 76543210 $3d ($5d) sp7 sp6 sp5 sp4 sp3 sp2 sp1 sp0 spl read/write r/w r/w r/w r/w r/w r/w r/w r/w initial value00000000 table 3. reset and interrupt vectors vector no. program address source interrupt definition 1 $000 reset hardware pin, power-on reset and watchdog reset 2 $001 int0 external interrupt request 0 3 $002 timer0, ovf0 timer/counter0 overflow 20 at90s/ls2323/2343 1004d ? 09/01 the most typical program setup for the reset and interrupt vector addresses are: reset sources the at90s2323/2343 provides three sources of reset: power-on reset. the mcu is reset when the supply voltage is below the power-on reset threshold (v pot ). external reset. the mcu is reset when a low level is present on the reset pin for more than 50 ns. watchdog reset. the mcu is reset when the watchdog timer period expires and the watchdog is enabled. during reset, all i/o registers are set to their initial values and the program starts execu- tion from address $000. the instruction placed in address $000 must be an rjmp (relative jump) instruction to the reset handling routine. if the program never enables an interrupt source, the interrupt vectors are not used and regular program code can be placed at these locations. the circuit diagram in figure 24 shows the reset logic. table 4 defines the timing and electrical parameters of the reset circuitry. figure 24. reset logic the at90s/ls2323 has a programmable start-up time. a fuse bit (fstrt) in the flash memory selects the shortest start-up time when programmed ( ? 0 ? ). the at90s/ls2323 is shipped with this bit unprogrammed. the at90s/ls2343 has a fixed start-up time. address labels code comments $000 rjmp reset ; reset handler $001 rjmp ext_int0 ; irq0 handler $002 rjmp tim_ovf0 ; timer0 overflow ; handler; $003 main: ldi r16, low(ramend) ; main program start out spl, r16 21 at90s/ls2323/2343 1004d ? 09/01 note: 1. the power-on reset will not work unless the supply voltage has been below v pot (falling). note: 1. the power-on reset will not work unless the supply voltage has been below v pot (falling). power-on reset the at90s2323/2343 is designed for use in systems where it can operate from the internal rc oscillator (at90s/ls2343), on-chip oscillator (at90s/ls2323), or in appli- cations where a clock signal is provided by an external clock source. after v cc has reached v pot , the device will start after the time t tout (see figure 25). if the clock signal is provided by an external clock source, the clock must not be applied until v cc has reached the minimum voltage defined for the applied frequency. for at90s2323, the user can select the start-up time according to typical oscillator start-up. the number of wdt oscillator cycles used for each time-out is shown in table 6. for at90s2343, the start-up time is one watchdog cycle only. the frequency of the watchdog oscillator is voltage-dependent as shown in ? typical characteristics ? on page 49. table 4. reset characteristics (v cc = 5.0v) symbol parameter min typ max units v pot (1) power-on reset threshold voltage, rising 1.0 1.4 1.8 v power-on reset threshold voltage, falling 0.4 0.6 0.8 v v rst reset pin threshold voltage 0.6 v cc v t tout reset delay time-out period at90s/ls2323 fstrt programmed 1.0 1.1 1.2 ms t tout reset delay time-out period at90s/ls2323 fstrt unprogrammed 11.0 16.0 21.0 ms t tout reset delay time-out period at90s/ls2343 11.0 16.0 21.0 s table 5. reset characteristics (v cc = 3.0v) symbol parameter min typ max units v pot (1) power-on reset threshold voltage, rising 1.0 1.4 1.8 v power-on reset threshold voltage, falling 0.4 0.6 0.8 v v rst reset pin threshold voltage 0.6 v cc v t tout reset delay time-out period at90s/ls2323 fstrt programmed 2.0 2.2 2.4 ms t tout reset delay time-out period at90s/ls2323 fstrt unprogrammed 22.0 32.0 42.0 ms t tout reset delay time-out period at90s/ls2343 22.0 32.0 42.0 s table 6. number of watchdog oscillator cycles fstrt time-out at v cc = 5v number of wdt cycles programmed 1.1 ms 1k unprogrammed 16.0 ms 16k 22 at90s/ls2323/2343 1004d ? 09/01 figure 25. mcu start-up, reset tied to v cc . figure 26. mcu start-up, reset controlled externally external reset an external reset is generated by a low level on the reset pin. reset pulses longer than 50 ns will generate a reset, even if the clock is not running. shorter pulses are not guaranteed to generate a reset. when the applied signal reaches the reset threshold voltage (v rst ) on its positive edge, the delay timer starts the mcu after the time-out period t tout has expired. figure 27. external reset during operation vcc reset time-out internal reset t tout v pot v rst vcc reset time-out internal reset t tout v pot v rst 23 at90s/ls2323/2343 1004d ? 09/01 watchdog reset when the watchdog times out, it will generate a short reset pulse of 1 cpu clock cycle duration. on the falling edge of this pulse, the delay timer starts counting the time-out period t tout . refer to page 30 for details on operation of the watchdog. figure 28. watchdog reset during operation mcu status register ? mcusr the mcu status register provides information on which reset source caused an mcu reset. bits 7..2 ? res: reserved bits these bits are reserved bits in the at90s2323/2343 and always read as zero. bit 1 ? extrf: external reset flag after a power-on reset, this bit is undefined (x). it will be set by an external reset. a watchdog reset will leave this bit unchanged. bit 0 ? porf: power-on reset flag this bit is set by a power-on reset. a watchdog reset or an external reset will leave this bit unchanged. to summarize, table 7 shows the value of these two bits after the three modes of reset. to make use of these bits to identify a reset condition, the user software should clear both the porf and extrf bits as early as possible in the program. checking the porf and extrf values is done before the bits are cleared. if the bit is cleared before an external or watchdog reset occurs, the source of reset can be found by using the following truth table, table 8. bit 76543210 $34 ($54) ?????? extrf porf mcusr read/writerrrrrrr/wr/w initial value000000see bit description table 7. porf and extrf values after reset reset source porf extrf power-on reset 1 undefined external reset unchanged 1 watchdog reset unchanged unchanged 24 at90s/ls2323/2343 1004d ? 09/01 interrupt handling the at90s2323/2343 has two 8-bit interrupt mask control registers; gimsk (general interrupt mask register) and timsk (timer/counter interrupt mask register). when an interrupt occurs, the global interrupt enable i-bit is cleared (zero) and all inter- rupts are disabled. the user software can set (one) the i-bit to enable nested interrupts. the i-bit is set (one) when a return from interrupt instruction (reti) is executed. when the program counter is vectored to the actual interrupt vector in order to execute the interrupt handling routine, hardware clears the corresponding flag that generated the interrupt. some of the interrupt flags can also be cleared by writing a logical ? 1 ? to the flag bit position(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 flag is cleared by software. if one or more interrupt conditions occur when the global interrupt enable bit is cleared (zero), the corresponding interrupt flag(s) will be set and remembered until the global interrupt enable bit is set (one) and will be executed by order of priority. note that external level interrupt does not have a flag and will only be remembered for as long as the interrupt condition is active. note that the status register is not automatically stored when entering an interrupt rou- tine and restored when returning from an interrupt routine. this must be handled by software. general interrupt mask register ? gimsk bit 7 ? res: reserved bit this bit is a reserved bit in the at90s2323/2343 and always reads as zero. bit 6 ? int0: external interrupt request 0 enable when the int0 bit is set (one) and the i-bit in the status register (sreg) is set (one), the external pin interrupt is enabled. the interrupt sense control0 bits 1/0 (isc01 and isc00) in the mcu general control register (mcucr) define whether the external interrupt is activated on rising or falling edge of the int0 pin or level sensed. activity on the pin will cause an interrupt request even if int0 is configured as an output. the corre- sponding interrupt of external interrupt request 0 is executed from program memory address $001. see also ? external interrupts. ? bits 5..0 ? res: reserved bits these bits are reserved bits in the at90s2323/2343 and always read as zero. table 8. reset source identification porf extrf reset source 0 0 watchdog reset 0 1 external reset 1 0 power-on reset 1 1 power-on reset bit 7 6 5 4 3 2 1 0 $3b ($5b) ? int0 ?? ???? gimsk read/write r r/w r r r r r r initial value 0 0 0 0 0 0 0 0 25 at90s/ls2323/2343 1004d ? 09/01 general interrupt flag register ? gifr bit 7 ? res: reserved bit this bit is a reserved bit in the at90s2323/2343 and always reads as zero. bit 6 ? intf0: external interrupt flag0 when an edge on the int0 pin triggers an interrupt request, the corresponding interrupt flag, intf0 becomes set (one). if the i-bit in sreg and the corresponding interrupt enable bit, int0 in gimsk, is set (one), the mcu will jump to the interrupt vector. the flag is cleared when the interrupt routine is executed. alternatively, the flag is cleared by writing a logical ? 1 ? to it. this flag is always cleared when int0 is configured as level interrupt. bits 5..0 ? res: reserved bits these bits are reserved bits in the at90s2323/2343 and always read as zero. timer/counter interrupt mask register ? timsk bits 7..2 ? res: reserved bits these bits are reserved bits in the at90s2323/2343 and always read zero. bit 1 ? toie0: timer/counter0 overflow interrupt enable when the toie0 bit is set (one) and the i-bit in the status register is set (one), the timer/counter0 overflow interrupt is enabled. the corresponding interrupt (at vector $002) is executed if an overflow in timer/counter0 occurs, i.e., when the overflow flag (timer/counter0) is set (one) in the timer/counter interrupt flag register (tifr). bit 0 ? res: reserved bit this bit is a reserved bit in the at90s2323/2343 and always reads as zero. timer/counter interrupt flag register ? tifr bits 7..2 ? res: reserved bits these bits are reserved bits in the at90s2323/2343 and always read zero. bit 1 ? tov0: timer/counter0 overflow flag the bit tov0 is set (one) when an overflow occurs in timer/counter0. tov0 is cleared by hardware when executing the corresponding interrupt handling vector. alternatively, tov0 is cleared by writing a logical ? 1 ? to the flag. when the sreg i-bit and toie0 (timer/counter0 overflow interrupt enable) and tov0 are set (one), the timer/counter0 overflow interrupt is executed. bit 7 6 5 4 3 2 1 0 $3a ($5a) ? intf0 ?? ???? gifr read/write r r/w r r r r r r initial value 0 0 0 0 0 0 0 0 bit 7 6 5 4 3 2 1 0 $39 ($59) ???? ? ? toie0 ? timsk read/write r r r r r r r/w r initial value 0 0 0 0 0 0 0 0 bit 7 6 5 4 3 2 1 0 $38 ($58) ?? ???? tov0 ? tifr read/write r r r r r r r/w r initial value 0 0 0 0 0 0 0 0 26 at90s/ls2323/2343 1004d ? 09/01 bit 0 ? res: reserved bit this bit is a reserved bit in the at90s2323/2343 and always reads zero. external interrupt the external interrupt is triggered by the int0 pin. observe that, if enabled, the interrupt will trigger even if the int0 pin is configured as an output. this feature provides a way of generating a software interrupt. the external interrupt can be triggered by a falling or ris- ing edge or a low level. this is set up as indicated in the specification for the mcu control register (mcucr). when the external interrupt is enabled and is configured as level-triggered, the interrupt will trigger as long as the pin is held low. the external interrupt is set up as described in the specification for the mcu control register (mcucr). interrupt response time the interrupt execution response 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 executed. during these four clock cycles, the program counter (2 bytes) is popped back from the stack, the stack pointer is incremented by 2 and the i-flag in sreg is set. the vector is a relative jump to the interrupt routine and this jump takes two clock cycles. if an interrupt occurs during exe- cution of a multi-cycle instruction, this instruction is completed before the interrupt is served. a return from an interrupt handling routine (same as for a subroutine call routine) takes four clock cycles. during these four clock cycles, the program counter (2 bytes) is popped back from the stack and the stack pointer is incremented by 2. when the avr exits from an interrupt, it will always return to the main program and execute one more instruction before any pending interrupt is served. mcu control register ? mcucr the mcu control register contains control bits for general mcu functions. bits 7, 6 ? res: reserved bits these bits are reserved bits in the at90s2323/2343 and always read as zero. bit 5 ? se: sleep enable the se bit must be set (one) to make the mcu enter the sleep mode when the sleep instruction is executed. to avoid the mcu entering the sleep mode, unless it is the pro- grammer ? s purpose, it is recommended to set the sleep enable (se) bit just before the execution of the sleep instruction. bit 4 ? sm: sleep mode this bit selects between the two available sleep modes. when sm is cleared (zero), idle mode is selected as sleep mode. when sm is set (one), power-down mode is selected as sleep mode. for details, refer to the section ? sleep modes ? . bits 3, 2 ? res: reserved bits these bits are reserved bits in the at90s2323/2343 and always read as zero. bits 1, 0 ? isc01, 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 are set. the level and edges on the external int0 pin that bit 76543210 $35 ($55) ?? se sm ?? isc01 isc00 mcucr read/write r r r/w r/w r r r/w r/w initial value 0 0 0 0 0 0 0 0 27 at90s/ls2323/2343 1004d ? 09/01 activate the interrupt are defined in table 9. the value on the int01 pin is sampled before detecting edges. if edge or toggle interrupt is selected, pulses that last longer than one clock period will generate an interrupt. shorter pulses are not guaranteed to generate an interrupt. if low-level interrupt is selected, the low level must be held until the completion of the currently executing instruction to generate an interrupt. sleep modes to enter the sleep modes, the se bit in mcucr must be set (one) and a sleep instruc- tion must be executed. if an enabled interrupt occurs while the mcu is in a sleep mode, the mcu awakes, executes the interrupt routine and resumes execution from the instruction following sleep. the contents of the register file, sram and i/o memory are unaltered. if a reset occurs during sleep mode, the mcu wakes up and executes from the reset vector. idle mode when the sm bit is cleared (zero), the sleep instruction forces the mcu into the idle mode, stopping the cpu but allowing timer/counters, watchdog and the interrupt sys- tem to continue operating. this enables the mcu to wake up from external triggered interrupts as well as internal ones like timer overflow interrupt and watchdog reset. power-down mode when the sm bit is set (one), the sleep instruction forces the mcu into the power- down mode. in this mode, the external oscillator is stopped while the external interrupts and the watchdog (if enabled) continue operating. only an external reset, a watchdog reset (if enabled), or an external level interrupt on int0 can wake up the mcu. note that if a level-triggered interrupt is used for wake-up from power-down mode, the changed level must be held for some time to wake up the mcu. this makes the mcu less sensitive to noise. the changed level is sampled twice by the watchdog oscillator clock and if the input has the required level during this time, the mcu will wake up. the period of the watchdog oscillator is 1 ? (nominal) at 5.0v and 25 c. the frequency of the watchdog oscillator is voltage-dependent as shown in section ? typical characteris- tics ? on page 49. when waking up from power-down mode, a delay from the wake-up condition occurs until the wake-up becomes effective. this allows the clock to restart and become stable after having been stopped. the wake-up period is equal to the clock reset period, as shown in table 4 and table 5 on page 21. if the wake-up condition disappears before the mcu wakes up and starts to execute, e.g., a low-level on is not held long enough, the interrupt causing the wake-up will not be executed. table 9. interrupt 0 sense control isc01 isc00 description 0 0 the low level of int0 generates an interrupt request. 01reserved 1 0 the falling edge of int0 generates an interrupt request. 1 1 the rising edge of int0 generates an interrupt request. 28 at90s/ls2323/2343 1004d ? 09/01 timer/counter the at90s2323/2343 provides one general-purpose 8-bit timer/counter ? timer/counter0. the timer/counter has prescaling selection from the 10-bit prescaling timer. the timer/counter can be used either as a timer with an internal clock time base or as a counter with an external pin connection that triggers the counting. timer/counter prescaler figure 29 shows the timer/counter prescaler. figure 29. timer/counter0 prescaler the four different prescaled selections are: ck/8, ck/64, ck/256 and ck/1024, where ck is the oscillator clock. ck, external source and stop can also be selected as clock sources. 8-bit timer/counter0 figure 30 shows the block diagram for timer/counter0. the 8-bit timer/counter0 can select clock source from ck, prescaled ck or an external pin. in addition, it can be stopped as described in the specification for the timer/counter0 control register (tccr0). the overflow status flag is found in the timer/counter interrupt flag register (tifr). control signals are found in the timer/counter0 control register (tccr0). the interrupt enable/disable settings for timer/counter0 are found in the timer/counter interrupt mask register (timsk). when timer/counter0 is externally clocked, the external signal is synchronized with the oscillator frequency of the cpu. to ensure proper sampling of the external clock, the minimum time between two external clock transitions must be at least one internal cpu clock period. the external clock signal is sampled on the rising edge of the internal cpu clock. the 8-bit timer/counter0 features both a high-resolution and a high-accuracy usage with the lower prescaling opportunities. similarly, the high prescaling opportunities make the timer/counter0 useful for lower speed functions or exact timing functions with infre- quent actions. 10-bit t/c prescaler 0 timer/counter0 clock source tck0 ck t0 cs00 cs01 cs02 ck/8 ck/256 ck/1024 ck/64 29 at90s/ls2323/2343 1004d ? 09/01 figure 30. timer/counter 0 block diagram timer/counter0 control register ? tccr0 bits 7..3 ? res: reserved bits these bits are reserved bits in the at90s2323/2343 and always read zero. bits 2, 1, 0 ? cs02, cs01, cs00: clock select0, bits 2, 1 and 0 the clock select0 bits 2, 1 and 0 define the prescaling source of timer/counter0. t0 bit 7 6 5 4 3 210 $33 ($53) ?? ? ? ? cs02 cs01 cs00 tccr0 read/write r r r r r r/w r/w r/w initial value 0 0 0 0 0 0 0 0 table 10. clock 0 prescale select cs02 cs01 cs00 description 0 0 0 stop, the timer/counter0 is stopped. 001ck 010ck/8 011ck/64 1 0 0 ck/256 1 0 1 ck/1024 1 1 0 external pin t0, falling edge 1 1 1 external pin t0, rising edge 30 at90s/ls2323/2343 1004d ? 09/01 the stop condition provides a timer enable/disable function. the ck down divided modes are scaled directly from the ck oscillator clock. if the external pin modes are used for timer/counter0, transitions on pb2/(t0) will clock the counter even if the pin is configured as an output. this feature can give the user software 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 source is present, the timer/counter0 continues counting in the timer clock cycle following the write operation. watchdog timer the watchdog timer is clocked from a separate on-chip oscillator. by controlling the watchdog timer prescaler, the watchdog reset interval can be adjusted as shown in table 11. see characterization data for typical values at other v cc levels. the wdr (watchdog reset) instruction resets the watchdog timer. eight different clock cycle periods can be selected to determine the reset period. if the reset period expires without another watchdog reset, the at90s2323/2343 resets and executes from the reset vec- tor. for timing details on the watchdog reset, refer to page 23. to prevent unintentional disabling of the watchdog, a special turn-off sequence must be followed when the watchdog is disabled. refer to the description of the watchdog timer control register for details. figure 31. watchdog timer bit 76543210 $32 ($52) msb lsb tcnt0 read/write r/w r/w r/w r/w r/w r/w r/w r/w initial value 0 0 0 0 0 0 0 0 1 mhz at v cc = 5v 350 khz at v cc = 3v oscillator 31 at90s/ls2323/2343 1004d ? 09/01 watchdog timer control register ? wdtcr bits 7..5 ? res: reserved bits these bits are reserved bits in the at90s2323/2343 and will always read as zero. bit 4 ? wdtoe: watchdog turn-off enable this bit must be set (one) when the wde bit is cleared. otherwise, the watchdog will not be disabled. once set, hardware will clear this bit to zero after four clock cycles. refer to the description of the wde bit for a watchdog disable procedure. bit 3 ? wde: watchdog enable when the wde is set (one) the watchdog timer is enabled and if the wde is cleared (zero) the watchdog timer function is disabled. wde can only be cleared if the wdtoe bit is set (one). to disable an enabled watchdog timer, the following procedure must be followed: 1. in the same operation, write a logical ? 1 ? to wdtoe and wde. a logical ? 1 ? must be written to wde even though it is set to ? 1 ? before the disable operation starts. 2. within the next four clock cycles, write a logical ? 0 ? to wde. this disables the watchdog. bits 2..0 ? wdp2, wdp1, wdp0: watchdog timer prescaler 2, 1 and 0 the wdp2, wdp1 and wdp0 bits determine the watchdog timer prescaling when the watchdog timer is enabled. the different prescaling values and their corresponding time-out periods are shown in table 11. note: the frequency of the watchdog oscillator is voltage-dependent as shown in the electrical characteristics section. the wdr (watchdog reset) instruction should always be executed before the watchdog timer is enabled. this ensures that the reset period will be in accordance with the watchdog timer prescale settings. if the watchdog timer is enabled without reset, the watchdog timer may not start counting from zero. to avoid unintentional mcu resets, the watchdog timer should be disabled or reset before changing the watchdog timer prescale select. bit 765 4 3210 $21 ($41) ??? wdtoe wde wdp2 wdp1 wdp0 wdtcr read/write r r r r/w r/w r/w r/w r/w initial value 0 0 0 0 0 0 0 0 table 11. watchdog timer prescale select wdp2 wdp1 wdp0 number of wdt oscillator cycles typical time-out at v cc = 3.0v typical time-out at v cc = 5.0v 0 0 0 16k cycles 47 ms 15 ms 0 0 1 32k cycles 94 ms 30 ms 0 1 0 64k cycles 0.19 s 60 ms 0 1 1 128k cycles 0.38 s 0.12 s 1 0 0 256k cycles 0.75 s 0.24 s 1 0 1 512k cycles 1.5 s 0.49 s 1 1 0 1,024k cycles 3.0 s 0.97 s 1 1 1 2,048k cycles 6.0 s 1.9 s 32 at90s/ls2323/2343 1004d ? 09/01 eeprom read/write access the eeprom access registers are accessible in the i/o space. the write access time is in the range of 2.5 - 4 ms, depending on the v cc voltages. a self-timing function, however, lets the user software detect when the next byte can be written. in order to prevent unintentional eeprom writes, a specific write procedure must be fol- lowed. refer to the description of the eeprom control register for details on this. when the eeprom is written, the cpu is halted for two clock cycles before the next instruction is executed. when the eeprom is read, the cpu is halted for four clock cycles before the next instruction is executed. eeprom address register ? eear bit 7 ? res: reserved bit this bit is a reserved bit in the at90s2323/2343 and will always read as zero. bit 6..0 ? eear6..0: eeprom address the eeprom address register (eear6..0) specifies the eeprom address in the 128-byte eeprom space. the eeprom data bytes are addressed linearly between 0 and 127. eeprom data register ? eedr bits 7..0 ? eedr7..0: eeprom data for the eeprom write operation, the eedr register contains the data to be written to the eeprom in the address given by the eear register. for the eeprom read opera- tion, the eedr contains the data read out from the eeprom at the address given by eear. bit 76543210 $1e ($3e) ? eear6 eear5 eear4 eear3 eear2 eear1 eear0 eear read/write r r/w r/w r/w r/w r/w r/w r/w initial value 0 0 0 0 0 0 0 0 bit 76543210 $1d ($3d) msb lsb eedr read/write r/w r/w r/w r/w r/w r/w r/w r/w initial value 0 0 0 0 0 0 0 0 33 at90s/ls2323/2343 1004d ? 09/01 eeprom control register ? eecr bits 7..3 ? res: reserved bits these bits are reserved bits in the at90s2323/2343 and will always read as zero. bit 2 ? eemwe: eeprom master write enable the eemwe bit determines whether setting eewe to ? 1 ? causes the eeprom to be written. when eemwe is set (one), setting eewe will write data to the eeprom at the selected address. if eemwe is zero, setting eewe will have no effect. when eemwe has been set (one) by software, hardware clears the bit to zero after four clock cycles. see the description of the eewe bit for a eeprom write procedure. bit 1 ? eewe: eeprom write enable the eeprom write enable signal (eewe) is the write strobe to the eeprom. when address and data are correctly set up, the eewe bit must be set to write the value into the eeprom. the eemwe bit must be set when the logical ? 1 ? is written to eewe, oth- erwise no eeprom write takes place. the following procedure should be followed when writing the eeprom (the order of steps 2 and 3 is unessential): 1. wait until eewe becomes zero. 2. write new eeprom address to eear (optional). 3. write new eeprom data to eedr (optional). 4. write a logical ? 1 ? to the eemwe bit in eecr (to be able to write a logical ? 1 ? to the eemwe bit, the eewe bit must be written to ? 0 ? in the same cycle). 5. within four clock cycles after setting eemwe, write a logical ? 1 ? to eewe. caution: an interrupt between step 4 and step 5 will make the write cycle fail, since the eeprom master write enable will time-out. if an interrupt routine accessing the eeprom is interrupting another eeprom access, the eear and eedr registers will be modified, causing the interrupted eeprom access to fail. it is recommended to have the global interrupt flag cleared during the four last steps to avoid these problems. when the write access time (typically 2.5 ms at v cc = 5v or 4 ms at v cc = 2.7v) has elapsed, the eewe bit is cleared (zero) by hardware. the user software can poll this bit and wait for a zero before writing the next byte. when eewe has been set, the cpu is halted for two cycles before the next instruction is executed. bit 0 ? eere: eeprom read enable the eeprom read enable signal (eere) is the read strobe to the eeprom. when the correct address is set up in the eear register, the eere bit must be set. when the eere bit is cleared (zero) by hardware, requested data is found in the eedr register. the eeprom read access takes one instruction and there is no need to poll the eere bit. when eere has been set, the cpu is halted for four cycles before the next instruc- tion is executed. the user should poll the eewe bit before starting the read operation. if a write operation is in progress when new data or address is written to the eeprom i/o registers, the write operation will be interrupted and the result is undefined. bit 76543 210 $1c ($3c) ????? eemwe eewe eere eecr read/write r r r r r r/w r/w r/w initial value 0 0 0 0 0 0 0 0 34 at90s/ls2323/2343 1004d ? 09/01 prevent eeprom corruption during periods of low v cc , the eeprom data can be corrupted because the supply volt- age is too low for the cpu and the eeprom to operate properly. these issues are the same as for board level systems using the eeprom and the same design solutions should be applied. an eeprom data corruption can be caused by two situations when the voltage is too low. first, a regular write sequence to the eeprom requires a minimum voltage to operate correctly. secondly, the cpu itself can execute instructions incorrectly, if the supply voltage for executing instructions is too low. eeprom data corruption can easily be avoided by following these design recommen- dations (one is sufficient): 1. keep the avr reset active (low) during periods of insufficient power supply voltage. this is best done by an external low v cc reset protection circuit, often referred to as a brown-out detector (bod). please refer to application note avr 180 for design considerations regarding power-on reset and low-voltage detection. 2. keep the avr core in power-down sleep mode during periods of low v cc . this will prevent the cpu from attempting to decode and execute instructions, effec- tively protecting the eeprom registers from unintentional writes. 3. store constants in flash memory if the ability to change memory contents from software is not required. flash memory cannot be updated by the cpu and will not be subject to corruption. 35 at90s/ls2323/2343 1004d ? 09/01 i/o port b all avr ports have true read-modify-write functionality when used as general digital i/o ports. this means that the direction of one port pin can be changed without unintention- ally changing the direction of any other pin with the sbi and cbi instructions. the same applies for changing drive value (if configured as output) or enabling/disabling of pull-up resistors (if configured as input). for the at90s/ls2323, port b is an 3-bit bi-directional i/o port. for the at90s/ls2343, port b is a 5-bit bi-directional i/o port. please note: bits 3 and 4 in the description of portb, ddrb and pinb do not apply to the at90s/ls2323. they are read only with a value of 0. three i/o memory address locations are allocated for port b, one each for the data register ? portb, $18 ($38), data direction register ? ddrb, $17($37) and the port b input pins ? pinb, $16($36). the port b input pins address is read-only, while the data register and the data direction register are read/write. all port pins have individually selectable pull-up resistors. the port b output buffers can sink 20 ma and thus drive led displays directly. when pins pb0 to pb4 are used as inputs and are externally pulled low, they will source current if the internal pull-up resis- tors are activated. the port b pins with alternate functions are shown in table 12. 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 data register ? portb port b data direction register ? ddrb table 12. port b pin alternate functions port pin alternate functions pb0 mosi (data input line for memory downloading) pb1 miso (data output line for memory uploading) int0 (external interrupt0 input) pb2 sck (serial clock input for serial programming) to (timer/counter0 counter clock input) pb3 clock (clock input, at90s/ls2343 only) bit 76543210 $18 ($38) ??? portb4 portb3 portb2 portb1 portb0 portb read/write r r r r/w r/w r/w r/w r/w initial value 0 0 0 0 0 0 0 0 bit 76543210 $17 ($37) ??? ddb4 ddb3 ddb2 ddb1 ddb0 ddrb read/write r r r r/w r/w r/w r/w r/w initial value 0 0 0 0 0 0 0 0 36 at90s/ls2323/2343 1004d ? 09/01 port b input pins address ? pinb the port b input pins address (pinb) is not a register and this address enables access to the physical value on each port b pin. when reading portb, the port b data latch is read and when reading pinb, the logical values present on the pins are read. port b as general digital i/o all pins in port b have equal functionality when used as digital i/o pins. pbn, general i/o pin: the ddbn bit in the ddrb register selects the direction of this pin, if ddbn is set (one), pbn is configured as an output pin. if ddbn is cleared (zero), pbn is configured as an input pin. if portbn is set (one) when the pin is configured as an input pin, the mos pull-up resistor is activated. to switch the pull-up resistor off, the portbn has to be cleared (zero) or the pin has to be configured as an output pin. the port pins are tri-stated when a reset condition becomes active, even if the clock is not running. alternate functions of port b the alternate pin functions of port b are as follows: clock ? port b, bit 3 clock input: at90s/ls2343 only. when the rcen fuse is programmed and the device runs from the internal rc oscillator, this pin is a general i/o pin. when the rcen fuse is unprogrammed, an external clock source must be connected to clock. sck/t0 ? port b, bit 2 in serial programming mode, this bit serves as the serial clock input, sck. during normal operation, this pin can serve as the external counter clock input. see the timer/counter description for further details. if external timer/counter clocking is selected, activity on this pin will clock the counter even if it is configured as an output. miso/int0 ? port b, bit 1 in serial programming mode, this bit serves as the serial data output, miso. during normal operation, this pin can serve as the external interrupt0 input. see the interrupt description for details on how to enable this interrupt. note that activity on this pin will trigger the interrupt even if the pin is configured as an output. mosi ? port b, bit 0 in serial programming mode, this pin serves as the serial data input, mosi. bit 76543210 $16 ($36) ??? pinb4 pinb3 pinb2 pinb1 pinb0 pinb read/writerrrrrrrr initial value 0 0 0 n/a n/a n/a n/a n/a table 13. ddbn effects on port b pins ddbn portbn i/o pull-up comment 0 0 input no tri-state (high-z) 0 1 input yes pbn will source current if ext. pulled low 1 0 output no push-pull zero output 1 1 output no push-pull one output 37 at90s/ls2323/2343 1004d ? 09/01 memory programming program and data memory lock bits the at90s2323/2343 mcu provides two lock bits that can be left unprogrammed ( ? 1 ? ) or can be programmed ( ? 0 ? ) to obtain the additional features listed in table 14. the lock bits can only be erased with the chip erase operation. note: 1. in the high-voltage serial programming mode, further programming of the fuse bits are also disabled. program the fuse bits before programming the lock bits. fuse bits in at90s/ls2323 the at90s/ls2323 has two fuse bits, spien and fstrt. when the spien fuse is programmed ( ? 0 ? ), serial program and data downloading are enabled. default value is programmed ( ? 0 ? ). this bit is not accessible in the low- voltage serial programming mode. when the fstrt fuse is programmed ( ? 0 ? ), the shortest start-up time is selected as indicated in table 6 on page 21. default value is programmed ( ? 0 ? ). changing the fstrt fuse does not take effect until the next power-on reset. in at90s/ls2343 the start-up time is fixed. the status of the fuse bits is not affected by chip erase. fuse bits in at90s/ls2343 the at90s/ls2343 has two fuse bits, spien and rcen. when the spien fuse is programmed ( ? 0 ? ), serial program and data downloading are enabled. default value is programmed ( ? 0 ? ). this bit is not accessible in the low- voltage serial programming mode. when the rcen fuse is programmed ( ? 0 ? ), the internal rc oscillator is selected as the mcu clock source. default value is programmed ("0") in at90ls2343-1. default value is un-programmed ("1") in at90ls2343-4 and at90s2343-10. changing the rcen fuse does not take effect until the next power-on reset. at90s/ls2323 cannot select the internal rc oscillator as the mcu source. the status of the fuse bits is not affected by chip erase. signature bytes all atmel microcontrollers have a three-byte signature code that identifies the device. the three bytes reside in a separate address space. for the at90s/ls2323 (note:) , they are: 1. $000: $1e (indicates manufactured by atmel) 2. $001: $91 (indicates 2k bytes flash memory) 3. $002: $02 (indicates at90s/ls2323 when signature byte $001 is $91) for at90s/ls2343 (note:) , they are: 1. $000: $1e (indicates manufactured by atmel) 2. $001: $91 (indicates 2k bytes flash memory) table 14. lock bit protection modes memory lock bits protection type mode lb1 lb2 1 1 1 no memory lock features enabled. 2 0 1 further programming of the flash and eeprom is disabled. (1) 3 0 0 same as mode 2, and verify is also disabled. 38 at90s/ls2323/2343 1004d ? 09/01 3. $002: $03 (indicates at90s/ls2343 when signature byte $001 is $91) note: when both lock bits are programmed (lock mode 3), the signature bytes cannot be read in the low-voltage serial mode. reading the signature bytes will return: $00, $01 and $02. programming the flash and eeprom atmel ? s at90s2323/2343 offers 2k bytes of in-system programmable flash program memory and 128 bytes of eeprom data memory. the at90s2323/2343 is shipped with the on-chip flash program and eeprom data memory arrays in the erased state (i.e., contents = $ff) and ready to be programmed. the device supports a high-voltage (12v) serial programming mode and a low-voltage serial programming mode. the +12v is used for programming enable only and no cur- rent of significance is drawn by this pin. the low-voltage serial programming mode provides a convenient way to download program and data into the device inside the user ? s system. the program and eeprom memory arrays in the at90s2323/2343 are programmed byte-by-byte in either programming modes. for the eeprom, an auto-erase cycle is provided within the self-timed write instruction in the low-voltage serial programming mode. during programming, the supply voltage must be in accordance with table 15. high-voltage serial programming this section describes how to program and verify flash program memory, eeprom data memory, lock bits and fuse bits in the at90s2323/2343. figure 32. high-voltage serial programming table 15. supply voltage during programming part low-voltage serial programming high-voltage serial programming at90s2323 4.0 - 6.0v 4.5 - 5.5v at90ls2323 2.7 - 6.0v 4.5 - 5.5v at90s2323 4.0 - 6.0v 4.5 - 5.5v at90ls2323 2.7 - 6.0v 4.5 - 5.5v reset xtal1/pb3 gnd vcc pb2 pb1 pb0 serial data output serial instr. input serial data input serial clock input 11.5 - 12.5v 4.5 - 5.5v at90s/ls2323, at90s/ls2343 39 at90s/ls2323/2343 1004d ? 09/01 high-voltage serial programming algorithm to program and verify the at90s/ls2323 and at90s/ls234 in the high-voltage serial programming mode, the following sequence is recommended (see instruction formats in table 16): 1. power-up sequence: apply 4.5 - 5.5v between v cc and gnd. set reset and pb0 to ? 0 ? and wait at least 100 ns. then, if the rcen fuse is not programmed, toggle xtal1/pb3 at least four times with minimum 100 ns pulse width. set pb3 to ? 0 ? . wait at least 100 ns. or, if the rcen fuse is programmed, set pb3 to ? 0 ? . wait for least 4 s. in both cases, apply 12v to reset and wait at least 100 ns before changing pb0. wait 8 s before giving any instructions. 2. the flash array is programmed one byte at a time by supplying first the address, then the low and high data bytes. the write instruction is self-timed; wait until the pb2 (rdy/bsy ) pin goes high. 3. the eeprom array is programmed one byte at a time by supplying first the address, then the data byte. the write instruction is self-timed; wait until the pb2 (rdy/bsy ) pin goes high. 4. any memory location can be verified by using the read instruction, which returns the contents at the selected address at serial output pb2. 5. power-off sequence:set pb3 to ? 0 ? . set reset to ? 0 ? . tu r n v cc power off. when writing or reading serial data to the device, data is clocked on the rising edge of the serial clock. see figure 33, figure 34 and table 17 for details. figure 33. high-voltage serial programming waveforms msb msb msb lsb lsb lsb 012 345678910 serial data input pb0 serial instr. input pb1 serial data output pb2 serial clock input xtal1/pb3 40 at90s/ls2323/2343 1004d ? 09/01 table 16. high-voltage serial programming instruction set instruction instruction format operation remarks instr.1 instr.2 instr.3 instr.4 chip erase pb0 pb1 pb2 0_1000_0000_00 0_0100_1100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_0100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_1100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0100_1100_00 x_xxxx_xxxx_xx wait t wlwh_ce after instr.3 for the chip erase cycle to finish. write flash high and low address pb0 pb1 pb2 0_0001_0000_00 0_0100_1100_00 x_xxxx_xxxx_xx 0_0000_00 aa _00 0_0001_1100_00 x_xxxx_xxxx_xx 0_ bbbb _ bbbb _00 0_0000_1100_00 x_xxxx_xxxx_xx repeat instr.2 for a new 256-byte page. repeat instr.3 for each new address. write flash low byte pb0 pb1 pb2 0_ i i i i _ i i i i _00 0_0010_1100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_0100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_1100_00 0_0000_0000_00 wait after instr.3 until pb2 goes high. repeat instr.1, instr. 2 and instr.3 for each new address. write flash high byte pb0 pb1 pb2 0_ i i i i _ i i i i _00 0_0010_1100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0111_0100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0111_1100_00 0_0000_0000_00 wait after instr.3 until pb2 goes high. repeat instr.1, instr. 2 and instr.3 for each new address. read flash high and low address pb0 pb1 pb2 0_0000_0010_00 0_0100_1100_00 x_xxxx_xxxx_xx 0_0000_00 aa _00 0_0001_1100_00 x_xxxx_xxxx_xx 0_ bbbb _ bbbb _00 0_0000_1100_00 x_xxxx_xxxx_xx repeat instr.2 and instr.3 for each new address. read flash low byte pb0 pb1 pb2 0_0000_0000_00 0_0110_1000_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_1100_00 o _ oooo _ ooo x_xx repeat instr.1 and instr.2 for each new address. read flash high byte pb0 pb1p b2 0_0000_0000_00 0_0111_1000_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0111_1100_00 o _ oooo _ ooo x_xx repeat instr.1 and instr.2 for each new address. write eeprom low address pb0 pb1 pb2 0_0001_0001_00 0_0100_1100_00 x_xxxx_xxxx_xx 0_0 bbb _ bbbb _00 0_0000_1100_00 x_xxxx_xxxx_xx repeat instr.2 for each new address. write eeprom byte pb0 pb1 pb2 0_ i i i i _ i i i i _00 0_0010_1100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_0100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_1100_00 0_0000_0000_00 wait after instr.3 until pb2 goes high read eeprom low address pb0 pb1 pb2 0_0000_0011_00 0_0100_1100_00 x_xxxx_xxxx_xx 0_0 bbb _ bbbb _00 0_0000_1100_00 x_xxxx_xxxx_xx repeat instr.2 for each new address. read eeprom byte pb0 pb1 pb2 0_0000_0000_00 0_0110_1000_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_1100_00 o _ oooo _ ooo x_xx repeat instr.2 for each new address write fuse bits (at90s/ ls2323) pb0 pb1 pb2 0_0100_0000_00 0_0100_1100_00 x_xxxx_xxxx_xx 0_11 s 1_111 f _00 0_0010_1100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_0100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_1100_00 x_xxxx_xxxx_xx wait t wlwh_pfb after instr.3 for the write fuse bits cycle to finish. set s , f = ? 0 ? to program, ? 1 ? to unprogram. write fuse bits (at90s/ ls2343) pb0 pb1 pb2 0_0100_0000_00 0_0100_1100_00 x_xxxx_xxxx_xx 0_11 s 1_111 r _00 0_0010_1100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_0100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_1100_00 x_xxxx_xxxx_xx wait t wlwh_pfb after instr.3 for the write fuse bits cycle to finish. set s , r = ? 0 ? to program, ? 1 ? to unprogram. write lock bits pb0 pb1 pb2 0_0010_0000_00 0_0100_1100_00 x_xxxx_xxxx_xx 0_1111_1 21 1_00 0_0010_1100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_0100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_1100_00 0_0000_0000_00 wait after instr.4 until pb2 goes high. write 2 , 1 = ? 0 ? to program the lock bit. 41 at90s/ls2323/2343 1004d ? 09/01 note: a = address high bits b = address low bits i = data in o = data out x = don ? t care 1 = lock bit1 2 = lock bit2 f = fstrt fuse r = rcen fuse s = spien fuse read fuse and lock bits (at90s/ ls2323) pb0 pb1 pb2 0_0000_0100_00 0_0100_1100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0111_1000_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0111_1100_00 1 _ 2 s xx_xx r x_xx reading 1 , 2 , s , r = ? 0 ? means the fuse/lock bit is programmed. read fuse and lock bits (at90s/ ls2343) pb0 pb1 pb2 0_0000_0100_00 0_0100_1100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0111_1000_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0111_1100_00 1 _ 2 s xx_xx r x_xx reading 1 , 2 , s , r = ? 0 ? means the fuse/lock bit is programmed. read signature bytes pb0 pb1 pb2 0_0000_1000_00 0_0100_1100_00 x_xxxx_xxxx_xx 0_0000_00 bb _00 0_0000_1100_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_1000_00 x_xxxx_xxxx_xx 0_0000_0000_00 0_0110_1100_00 o _ oooo _ ooo x_xx repeat instr.2 - instr.4 for each signature byte address. table 16. high-voltage serial programming instruction set (continued) instruction instruction format operation remarks instr.1 instr.2 instr.3 instr.4 42 at90s/ls2323/2343 1004d ? 09/01 high-voltage serial programming characteristics figure 34. high-voltage serial programming timing low-voltage serial downloading both the program and data memory arrays can be programmed using the serial spi bus while reset is pulled to gnd. the serial interface consists of pins sck, mosi (input) and miso (output) (see figure 35). after reset is set low, the programming enable instruction needs to be executed first before program/erase instructions can be executed. figure 35. low-voltage serial programming and verify table 17. high-voltage serial programming characteristics, t a = 25 c ?10%, v cc = 5.0v ?10% (unless otherwise noted) symbol parameter min typ max units t shsl sci (xtal1/pb3) pulse width high 100.0 ns t slsh sci (xtal1/pb3) pulse width low 100.0 ns t ivsh sdi (pb0), sii (pb1) valid to sci (xtal1/pb3) high 50.0 ns t shix sdi (pb0), sii (pb1) hold after sci (xtal1/pb3) high 50.0 ns t shov sci (xtal1/pb3) high to sdo (pb2) valid 10.0 16.0 32.0 ns t wlwh_ce wait after instr.3 for chip erase 5.0 10.0 15.0 ms t wlwh_pfb wait after instr.3 for write fuse bits 1.0 1.5 1.8 ms sdi (pb0), sii (pb1) sdo (pb2) sci (xtal1/pb3) t ivsh t shsl t slsh t shix t shov reset gnd vcc pb2 pb1 pb0 sck miso mosi 2.7 - 6.0v at90s/ls2323, at90s/ls2343 gnd 43 at90s/ls2323/2343 1004d ? 09/01 for the eeprom, an auto-erase cycle is provided within the self-timed write instruction and there is no need to first execute the chip erase instruction. the chip erase instruc- tion turns the content of every memory location in both the program and eeprom arrays into $ff. the program and eeprom memory arrays have separate address spaces: $0000 to $03ff for flash program memory and $000 to $07f for eeprom data memory. either an external clock is applied to the xtal1/pb3 pin or the device must be clocked from the internal rc oscillator (at90s/ls2343 only). the minimum low and high peri- ods for the serial clock (sck) input are defined as follows: low: > 2 mcu clock cycles high: > 2 mcu clock cycles low-voltage serial programming algorithm when writing serial data to the at90s2323/2343, data is clocked on the rising edge of sck. when reading data from the at90s2323/2343, data is clocked on the falling edge of sck. see figure 36, figure 37 and table 20 for timing details. to program and verify the at90s2323/2343 in the low-voltage serial programming mode, the following sequence is recommended (see 4-byte instruction formats in table 19): 1. power-up sequence: apply power between v cc and gnd while reset and sck are set to ? 0 ? . (if the programmer cannot guarantee that sck is held low during power-up, reset must be given a positive pulse after sck has been set to ? 0 ? .) if the device is pro- grammed for external clocking, apply a 0 - 8 mhz clock to the xtal1/pb3 pin. if the internal rc oscillator is selected as the clock source, no external clock source needs to be applied (at90s/ls2343 only). 2. wait for at least 20 ms and enable serial programming by sending the program- ming enable serial instruction to the mosi (pb0) pin. refer to the above section for minimum low and high periods for the serial clock input, sck. 3. the serial programming instructions will not work if the communication is out of synchronization. when in sync, the second byte ($53) will echo back when issu- ing the third byte of the programming enable instruction. whether the echo is correct or not, all four bytes of the instruction must be transmitted. if the $53 did not echo back, give sck a positive pulse and issue a new programming enable instruction. if the $53 is not seen within 32 attempts, there is no functional device connected. 4. if a chip erase is performed (must be done to erase the flash), wait t wd_erase after the instruction, give reset a positive pulse and start over from step 2. see table 21 on page 46 for t wd_erase value. 5. the flash or eeprom array is programmed one byte at a time by supplying the address and data together with the appropriate write instruction. an eeprom memory location is first automatically erased before new data is written. use data polling to detect when the next byte in the flash or eeprom can be writ- ten. if polling is not used, wait t wd_prog before transmitting the next instruction. see table 22 on page 46 for t wd_prog value. in an erased device, no $ffs in the data file(s) need to be programmed. 6. any memory location can be verified by using the read instruction, which returns the content at the selected address at the serial output miso (pb1) pin. 44 at90s/ls2323/2343 1004d ? 09/01 7. at the end of the programming session, reset can be set high to commence normal operation. 8. power-off sequence (if needed): set clock/xtal1 to ? 0 ? . set reset to ? 1 ? . turn v cc power off. data polling eeprom when a byte is being programmed into the eeprom, reading the address location being programmed will give the value p1 until the auto-erase is finished, and then the value p2 will be given. see table 18 for p1 and p2 values. at the time the device is ready for a new eeprom byte, the programmed value will read correctly. this is used to determine when the next byte can be written. this will not work for the values p1 and p2, so when programming these values, the user will have to wait for at least the prescribed time t wd_prog before programming the next byte. see table 22 for t wd_prog value. as a chip-erased device contains $ff in all locations, programming of addresses that are meant to contain $ff can be skipped. this does not apply if the eeprom is reprogrammed without first chip-erasing the device. data polling flash when a byte is being programmed into the flash, reading the address location being programmed will give the value $ff. at the time the device is ready for a new byte, the programmed value will read correctly. this is used to determine when the next byte can be written. this will not work for the value $ff, so when programming this value, the user will have to wait for at least t wd_prog before programming the next byte. as a chip- erased device contains $ff in all locations, programming of addresses that are meant to contain $ff can be skipped. figure 36. low-voltage serial downloading waveforms table 18. read back value during eeprom polling part p1 p2 at90s2323 $00 $ff at90s2343 $00 $ff msb msb lsb lsb serial clock input pb2(sck) serial data input pb0(mosi) serial data output pb1(miso) 45 at90s/ls2323/2343 1004d ? 09/01 notes: 1. a = address high bits b = address low bits h = 0 ? low byte, 1 ? high byte o = data out i = data in x = don ? t care 1 = lock bit 1 2 = lock bit 2 f = fstrt fuse r = rcen fuse s = spien fuse 2. when the state of the rcen/fstrt bit is changed, the device must be power cycled for the changes to have any effect. 3. the signature bytes are not readable in lock mode 3, i.e., both lock bits programmed. table 19. low-voltage serial programming instruction set at90s2323/2343 instruction instruction format operation byte 1 byte 2 byte 3 byte 4 programming enable 1010 1100 0101 0011 xxxx xxxx xxxx xxxx enable serial programming while reset is low. chip erase 1010 1100 100x xxxx xxxx xxxx xxxx xxxx chip erase both flash and eeprom memory arrays. read program memory 0010 h 000 0000 00 aa bbbb bbbb oooo oooo read h (high or low) data o from program memory at word address a : b . write program memory 0100 h 000 0000 00 aa bbbb bbbb iiii iiii write h (high or low) data i to program memory at word address a : b . read eeprom memory 1010 0000 0000 0000 x bbb bbbb oooo oooo read data o from eeprom memory at address b . write eeprom memory 1100 0000 0000 0000 x bbb bbbb iiii iiii write data i to eeprom memory at address b . read lock and fuse bits (at90s/ls2323) 0101 1000 xxxx xxxx xxxx xxxx 12 s x xxx f read lock and fuse bits. ? 0 ? = programmed, ? 1 ? = unprogrammed read lock and fuse bits (at90s/ls2343) 0101 1000 xxxx xxxx xxxx xxxx 12 s x xxx r read lock and fuse bits. ? 0 ? = programmed, ? 1 ? = unprogrammed write lock bits 1010 1100 1111 1 21 1 xxxx xxxx xxxx xxxx write lock bits. set bits 1 , 2 = ? 0 ? to program lock bits. write fstrt bit (at90s/ls2323) 1010 1100 1011 111 f xxxx xxxx xxxx xxxx write fstrt fuse. set bit f = ? 0 ? to program, ? 1 ? to unprogram. (2) write rcen bit (at90s/ls2343) 1010 1100 1011 111 r xxxx xxxx xxxx xxxx write rcen fuse. set bit r = ? 0 ? to program, ? 1 ? to unprogram. (2) read signature bytes 0011 0000 xxxx xxxx xxxx xx bb oooo oooo read signature byte o from address b . (3) 46 at90s/ls2323/2343 1004d ? 09/01 low-voltage serial programming characteristics figure 37. low-voltage serial programming timing table 20. low-voltage serial programming characteristics, t a = -40 c to 85 c, v cc = 2.7 - 6.0v (unless otherwise noted) symbol parameter min typ max units 1/t clcl oscillator frequency (v cc = 2.7 - 4.0v) 0 4.0 mhz t clcl oscillator period (v cc = 2.7 - 4.0v) 250.0 ns 1/t clcl oscillator frequency (v cc = 4.0 - 6.0v) 0 8.0 mhz t clcl oscillator period (v cc = 4.0 - 6.0v) 125.0 ns t shsl sck pulse width high 2.0 t clcl ns t slsh sck pulse width low 2.0 t clcl ns t ovsh mosi setup to sck high t clcl ns t shox mosi hold after sck high 2.0 t clcl ns t sliv sck low to miso valid 10.0 16.0 32.0 ns table 21. minimum wait delay after the chip erase instruction symbol 3.2v 3.6v 4.0v 5.0v t wd_erase 18 ms 14 ms 12 ms 8 ms table 22. minimum wait delay after writing a flash or eeprom location symbol 3.2v 3.6v 4.0v 5.0v t wd_prog 9 ms 7 ms 6 ms 4 ms mosi miso sck t ovsh t shsl t slsh t shox t sliv 47 at90s/ls2323/2343 1004d ? 09/01 electrical characteristics notes: 1. ? max ? means the highest value where the pin is guaranteed to be read as low. 2. ? min ? means the lowest value where the pin is guaranteed to be read as high. 3. minimum v cc for power-down is 2v. absolute maximum ratings* operating temperature.................................. -55 c to +125 c *notice: stresses beyond those listed under ?absolute maximum ratings? may cause permanent dam- age to the device. this is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied. exposure to absolute maximum rating conditions for extended periods may affect device reliability. storage temperature ..................................... -65 c to +150 c voltage on any pin except reset with respect to ground ..............................-1.0v to v cc + 0.5v voltage on reset with respect to ground ....-1.0v to +13.0v maximum operating voltage ............................................ 6.6v dc current per i/o pin ............................................... 40.0 ma dc current v cc and gnd pins................................ 200.0 ma dc characteristics t a = -40 c to 85 c, v cc = 2.7v to 6.0v (unless otherwise noted) symbol parameter condition min typ max units v il input low voltage (except xtal) -0.5 0.3 v cc (1) v v il1 input low voltage xtal -0.5 0.1 (1) v v ih input high voltage (except xtal, reset )0.6 v cc (2) v cc + 0.5 v v ih1 input high voltage xtal 0.7 v cc (2) v cc + 0.5 v v ih2 input high voltage reset 0.85 v cc (2) v cc + 0.5 v v ol output low voltage ports b i ol = 20 ma, v cc = 5v i ol = 10 ma, v cc = 3v 0.5 0.4 v v v oh output high voltage ports b i oh = -3 ma, v cc = 5v i oh = -1.5 ma, v cc = 3v 4.2 2.4 v v i il input leakage current i/o pin v cc = 6v, pin low (absolute value) 8.0 a i ih input leakage current i/o pin v cc = 6v, pin high (absolute value) 8.0 a rrst reset pull-up 100.0 500.0 k ? r i/o i/o pin pull-up 30.0 150.0 k ? i cc power supply current at90s2343 active 4 mhz, v cc = 3v 3.0 ma idle 4 mhz, v cc = 3v 1.1 ma power-down 4 mhz (3) , v cc = 3v wdt enabled 25.0 a power-down 4 mhz (3) , v cc = 3v wdt disabled 20.0 a power supply current at90s2323 active 4 mhz, v cc = 3v 4.0 ma idle 4 mhz, v cc = 3v 1.0 1.2 ma power-down (3) , v cc = 3v wdt enabled 9.0 15.0 a power-down (3) , v cc = 3v wdt disabled <1.0 2.0 a 48 at90s/ls2323/2343 1004d ? 09/01 external clock drive waveforms figure 38. waveforms external clock drive t a = -40 c to 85 c symbol parameter v cc : 2.7v to 4.0v v cc : 4.0v to 6.0v units min max min max 1/t clcl oscillator frequency 0 4.0 0 10.0 mhz t clcl clock period 250.0 100.0 ns t chcx high time 100.0 40.0 ns t clcx low time 100.0 40.0 ns t clch rise time 1.6 0.5 ? t chcl fall time 1.6 0.5 ? vil1 vih1 49 at90s/ls2323/2343 1004d ? 09/01 typical characteristics the following charts show typical behavior. these figures are not tested during manu- facturing. all current consumption measurements are performed with all i/o pins configured as inputs and with internal pull-ups enabled. a sine wave generator with rail- to-rail output is used as clock source. the current consumption is a function of several factors such as: operating voltage, operating frequency, loading of i/o pins, switching rate of i/o pins, code executed and ambient temperature. the dominating factors are operating voltage and frequency. the current drawn from capacitive loaded pins may be estimated (for one pin) as c l v cc f where c l = load capacitance, v cc = operating voltage and f = average switch- ing frequency of i/o pin. the parts are characterized at frequencies higher than test limits. parts are not guaran- teed to function properly at frequencies higher than the ordering code indicates. the difference between current consumption in power-down mode with watchdog timer enabled and power-down mode with watchdog timer disabled represents the dif- ferential current drawn by the watchdog timer. figure 39. active supply current vs. frequency 0.00 2.00 4.00 6.00 8.00 10.00 12.00 14.00 16.00 18.00 20.00 0 1 2 3 4 5 6 7 8 9 1011 12131415 active supply current vs. frequency t = 25?c a v cc = 6v v cc = 5.5v v cc = 5v v cc = 4.5v v cc = 4v v cc = 3.6v v cc = 3.3v v cc = 3.0v v cc = 2.7v frequency (mhz) i cc (ma) 50 at90s/ls2323/2343 1004d 09/01 figure 40. active supply current vs. v cc figure 41. active supply current vs. v cc 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. v cc frequency = 4 mhz i cc (ma) v cc (v) t = 25 ? c a t = 85 ? c a active supply current vs. v cc device clocked by internal rc oscillator i cc (ma) v cc (v) 0 1 2 3 4 5 6 7 2 2.5 3 3.5 4 4.5 5 5.5 6 t = 25 ? c a t = 85 ? c a 51 at90s/ls2323/2343 1004d 09/01 figure 42. idle supply current vs. frequency figure 43. idle supply current vs. v cc 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 v cc = 6v v cc = 5.5v v cc = 5v v cc = 4.5v v cc = 4v v cc = 3.6v v cc = 3.3v v cc = 3.0v v cc = 2.7v idle supply current vs. frequency t = 25 ? c a frequency (mhz) i cc (ma) 0 0.5 1 1.5 2 2.5 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. v cc i cc (ma) v cc (v) frequency = 4 mhz 52 at90s/ls2323/2343 1004d 09/01 figure 44. idle supply current vs. v cc figure 45. power-down supply current vs. v cc 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 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. v cc i cc (ma) v cc (v) device clocked by internal rc oscillator t = 85 ? c a t = 25 ? c a power down supply current vs. v cc i cc (?) v cc (v) watchdog timer disabled t = 45 ? c a t = 70 ? c a 0 5 10 15 20 25 2 2.5 3 3.5 4 4.5 5 5.5 6 53 at90s/ls2323/2343 1004d 09/01 figure 46. power-down supply current vs. v cc figure 47. watchdog oscillator frequency vs. v cc 0 20 40 60 80 100 120 140 160 180 2 2.5 3 3.5 4 4.5 5 5.5 6 t = 85 ? c a power down supply current vs. v cc i cc (?) v cc (v) watchdog timer enabled t = 25 ? c a 0 200 400 600 800 1000 1200 1400 1600 2 2.5 3 3.5 4 4.5 5 5.5 6 t = 85 ? c a t = 25 ? c a watchdog oscillator frequency vs. v cc v (v) cc f (khz) rc 54 at90s/ls2323/2343 1004d 09/01 note: sink and source capabilities of i/o ports are measured on one pin at a time. figure 48. pull-up resistor current vs. input voltage figure 49. 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 ? c a t = 25 ? c a 0 5 10 15 20 25 30 0 0.5 1 1.5 2 2.5 3 pull-up resistor current vs. input voltage i ( a) op v (v) op v = 2.7v cc t = 85 ? c a t = 25 ? c a 55 at90s/ls2323/2343 1004d 09/01 figure 50. i/o pin sink current vs. output voltage figure 51. i/o pin source 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 3 3.5 4 4.5 5 i/o pin source current vs. output voltage v = 5v cc i (ma) oh v (v) oh t = 85 ? c a t = 25 ? c a 56 at90s/ls2323/2343 1004d 09/01 figure 52. i/o pin sink current vs. output voltage figure 53. 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 pin source current vs. output voltage i (ma) oh v (v) oh t = 85 ? c a t = 25 ? c a v = 2.7v cc 57 at90s/ls2323/2343 1004d 09/01 figure 54. i/o pin input threshold voltage vs. v cc figure 55. i/o pin input hysteresis vs. v cc 0 0.5 1 1.5 2 2.5 2.7 4.0 5.0 threshold voltage (v) v cc i/o pin input threshold voltage vs. v cc t = 25 ? c a 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 2.7 4.0 5.0 input hysteresis (v) v cc i/o pin input hysteresis vs. v cc t = 25 ? c a 58 at90s/ls2323/2343 1004d 09/01 note: 1. for compatibility with future devices, reserved bits should be written to zero if accessed. reserved i/o memory addresse s 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 one back into any flag read as set, thus clearing the flag. the cbi and sbi instructions wo rk with registers $00 to $1f only. at90s2323/2343 register summary address 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) reserved $3d ($5d) spl sp7 sp6 sp5 sp4 sp3 sp2 sp1 sp0 page 19 $3c ($5c) reserved $3b ($5b) gimsk -int0 - - - - - - page 24 $3a ($5a) gifr -intf0 page 25 $39 ($59) timsk - - - - - -toie0 - page 25 $38 ($58) tifr - - - - - -tov0 - page 25 $37 ($57) reserved $36 ($56) reserved $35 ($55) mcucr - -sesm - - isc01 isc00 page 26 $34 ($54) mcusr - - - - - - extrf porf page 23 $33 ($53) tccr0 - - - - - cs02 cs01 cs00 page 29 $32 ($52) tcnt0 timer/counter0 (8 bits) page 30 $31 ($51) reserved $30 ($50) reserved $2f ($4f) reserved $2e ($4e) reserved $2d ($4d) reserved $2c ($4c) reserved $2b ($4b) reserved $2a ($4a) reserved $29 ($49) reserved $28 ($48) reserved $27 ($47) reserved $26 ($46) reserved $25 ($45) reserved $24 ($44) reserved $23 ($43) reserved $22 ($42) reserved $21 ($41) wdtcr - - - wdtoe wde wdp2 wdp1 wdp0 page 31 $20 ($40) reserved $1f ($3f) reserved $1e ($3e) eear - eeprom address register page 32 $1d ($3d) eedr eeprom data register page 32 $1c ($3c) eecr - - - - - eemwe eewe eere page 33 $1b ($3b) reserved $1a ($3a) reserved $19 ($39) reserved $18 ($38) portb - - - portb4 portb3 portb2 portb1 portb0 page 35 $17 ($37) ddrb - - - ddb4 ddb3 ddb2 ddb1 ddb0 page 35 $16 ($36) pinb - - - pinb4 pinb3 pinb2 pinb1 pinb0 page 36 $15 ($35) reserved reserved $00 ($20) reserved 59 at90s/ls2323/2343 1004d 09/01 instruction set summary mnemonic 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 sbiw rdl, k subtract immediate from word rdh:rdl rdh:rdl ? k z,c,n,v,s 2 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 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 (r(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 60 at90s/ls2323/2343 1004d 09/01 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 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 1c1 clc clear carry c 0c1 sen set negative flag n 1n1 cln clear negative flag n 0n1 sez set zero flag z 1z1 clz clear zero flag z 0z1 sei global interrupt enable i 1i1 cli global interrupt disable i 0i1 ses set signed test flag s 1s1 cls clear signed test flag s 0s1 sev set two s complement overflow v 1v1 clv clear two s complement overflow v 0v1 set set t in sreg t 1t1 clt clear t in sreg t 0t1 seh set half-carry flag in sreg h 1h1 clh clear half-carry flag in sreg h 0h1 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 61 at90s/ls2323/2343 1004d 09/01 notes: 1. the speed grade refers to maximum clock rate when using an external crystal or external clock drive. the internal rc os cil- lator has the same nominal clock frequency for all speed grades. 2. in at90ls2343-1xx, the internal rc oscillator is selected as default mcu clock source (rcen fuse is programmed) when the device is shipped from atmel. in at90ls2343-4xx and at90s2343-10xx, the default mcu clock source is the clock input pin (rcen fuse is unprogrammed). the fuse settings can be changed by high voltage serial programming. ordering information power supply speed (mhz) ordering code package operation range 2.7 - 6.0v 4 at90ls2323-4pc at90ls2323-4sc 8p3 8s2 commercial (0 c to 70 c) at90ls2323-4pi at90ls2323-4si 8p3 8s2 industrial (-40 c to 85 c) 4.0 - 6.0v 10 at90s2323-10pc at90s2323-10sc 8p3 8s2 commercial (0 c to 70 c) at90s2323-10pi at90s2323-10si 8p3 8s2 industrial (-40 c to 85 c) 2.7 - 6.0v 1 at90ls2343-1pc at90ls2343-1sc 8p3 8s2 commercial (0 c to 70 c) at90ls2343-1pi at90ls2343-1si 8p3 8s2 industrial (-40 c to 85 c) 2.7 - 6.0v 4 at90ls2343-4pc at90ls2343-4sc 8p3 8s2 commercial (0 c to 70 c) at90ls2343-4pi at90ls2343-4si 8p3 8s2 industrial (-40 c to 85 c) 4.0 - 6.0v 10 at90s2343-10pc at90s2343-10sc 8p3 8s2 commercial (0 c to 70 c) at90s2343-10pi at90s2343-10si 8p3 8s2 industrial (-40 c to 85 c) package type 8p3 8-lead, 0.300" wide, plastic dual inline package (pdip) 8s2 8-lead, 0.200" wide, plastic gull wing small outline package (eiaj soic) 62 at90s/ls2323/2343 1004d 09/01 packaging information 8p3 10.16(0.400) 9.017(0.355) pin 1 7.11(0.280) 6.10(0.240) .300 (7.62) ref 5.33(0.210) max 254(0.100) bsc 0.381(0.015)min 0.559(0.022) 0.356(0.014) 3.81(0.150) 2.92(0.115) 1.78(0.070) 1.14(0.045) 8.26(0.325) 7.62(0.300) 10.90(0.430) max 0.356(0.014) 0.203(0.008) 4.95(0.195) 2.92(0.115) seating plane *controlling dimension: inches 8p3, 8-lead, plastic dual inline package (pdip), 0.300" wide. dimensions in millimeters and (inches)* jedec standard ms-001 ba 1.524(0.060) 0.000(0.000) rev. a 04/11/2001 63 at90s/ls2323/2343 1004d 09/01 8s2 .020 (.508) .012 (.305) .213 (5.41) .205 (5.21) .330 (8.38) .300 (7.62) pin 1 .050 (1.27) bsc .212 (5.38) .203 (5.16) .080 (2.03) .070 (1.78) .013 (.330) .004 (.102) 0 8 ref .010 (.254) .007 (.178) .035 (.889) .020 (.508) ? atmel corporation 2001. atmel corporation makes no warranty for the use of its products, other than those expressly contained in the company s standard warranty which is detailed in atmel s terms and conditions located on the company s web site. the company assumes no responsibility for any errors which may appear in this document, reserves the right to change devices or specifications detailed herein at any time without n otice, and does not make any commitment to update the information contained herein. no licenses to patents or other intellectual property of at mel are granted by the company in connection with the sale of atmel products, expressly or by implication. atmel s products are not authorized for use as critical components in life support devices or systems. atmel headquarters atmel product operations corporate headquarters 2325 orchard parkway san jose, ca 95131 tel (408) 441-0311 fax (408) 487-2600 europe atmel sarl route des arsenaux 41 casa postale 80 ch-1705 fribourg switzerland tel (41) 26-426-5555 fax (41) 26-426-5500 asia atmel asia, ltd. room 1219 chinachem golden plaza 77 mody road tsimhatsui east kowloon hong kong tel (852) 2721-9778 fax (852) 2722-1369 japan atmel japan k.k. 9f, tonetsu shinkawa bldg. 1-24-8 shinkawa chuo-ku, tokyo 104-0033 japan tel (81) 3-3523-3551 fax (81) 3-3523-7581 atmel colorado springs 1150 e. cheyenne mtn. blvd. colorado springs, co 80906 tel (719) 576-3300 fax (719) 540-1759 atmel grenoble avenue de rochepleine bp 123 38521 saint-egreve cedex, france tel (33) 4-7658-3000 fax (33) 4-7658-3480 atmel heilbronn theresienstrasse 2 pob 3535 d-74025 heilbronn, germany tel (49) 71 31 67 25 94 fax (49) 71 31 67 24 23 atmel nantes la chantrerie bp 70602 44306 nantes cedex 3, france tel (33) 0 2 40 18 18 18 fax (33) 0 2 40 18 19 60 atmel rousset zone industrielle 13106 rousset cedex, france tel (33) 4-4253-6000 fax (33) 4-4253-6001 atmel smart card ics scottish enterprise technology park east kilbride, scotland g75 0qr tel (44) 1355-357-000 fax (44) 1355-242-743 e-mail literature@atmel.com web site http://www.atmel.com bbs 1-(408) 436-4309 printed on recycled paper. at m e l and avr are the registered trademarks of atmel. other terms and product names may be the trademarks of others. 1004d 09/01/xm |
Price & Availability of AT90LS2343-14
![]() |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |