Rainbow-electronics AT89LP214 User Manual

Browse online or download User Manual for Sensors Rainbow-electronics AT89LP214. Rainbow Electronics AT89LP214 User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 90
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
Features
8-bit Microcontroller Compatible with MCS
®
51 Products
Enhanced 8051 Architecture
Single Clock Cycle per Byte Fetch
Up to 20 MIPS Throughput at 20 MHz Clock Frequency
Fully Static Operation: 0 Hz to 20 MHz
On-chip 2-cycle Hardware Multiplier
128 x 8 Internal RAM
4-level Interrupt Priority
Nonvolatile Program Memory
2K Bytes of In-System Programmable (ISP) Flash Memory
Endurance: Minimum 10,000 Write/Erase Cycles
Data Retention: Minimum 10 Years
Serial Interface for Program Downloading
32-byte Fast Page Programming Mode
64-byte User Signature Array
2-level Program Memory Lock for Software Security
Peripheral Features
Two 16-bit Enhanced Timer/Counters
Two 8-bit PWM Outputs (AT89LP213 only)
Enhanced UART with Automatic Address Recognition and Framing Error
Detection (AT89LP214 only)
Enhanced Master/Slave SPI with Double-buffered Send/Receive
Programmable Watchdog Timer with Software Reset
Analog Comparator with Selectable Interrupt and Debouncing
8 General-purpose Interrupt Pins
Special Microcontroller Features
Two-wire On-chip Debug Interface
Brown-out Detection and Power-on Reset with Power-off Flag
Internal RC Oscillator
Low Power Idle and Power-down Modes
Interrupt Recovery from Power-down Mode
I/O and Packages
Up to 12 Programmable I/O Lines
Configurable I/O with Quasi-bidirectional, Input, Push-pull Output, and
Open-drain Modes
5V Tolerant I/O
14-lead TSSOP or PDIP
Operating Conditions
2.4V to 5.5V V
CC
Voltage Range
–-40° C to 85°C Temperature Range
1. Description
The AT89LP213/214 is a low-power, high-performance CMOS 8-bit microcontroller
with 2K bytes of In-System Programmable Flash memory. The device is manufactured
using Atmel's high-density nonvolatile memory technology and is compatible with the
industry-standard MCS-51 instruction set. The AT89LP213/214 is built around an
enhanced CPU core that can fetch a single byte from memory every clock cycle.
In the classic 8051 architecture, each fetch requires 6 clock cycles, forcing instruc-
tions to execute in 12, 24 or 48 clock cycles. In the AT89LP213/214 CPU, instructions
need only 1 to 4 clock cycles providing 6 to 12 times more throughput than the stan-
dard 8051. Seventy percent of instructions need only as many clock cycles as they
8-bit
Microcontroller
with 2K Bytes
Flash
AT89LP213
AT89LP214
Preliminary
3538A–MICRO–7/06
Page view 0
1 2 3 4 5 6 ... 89 90

Summary of Contents

Page 1 - 1. Description

Features• 8-bit Microcontroller Compatible with MCS®51 Products• Enhanced 8051 Architecture– Single Clock Cycle per Byte Fetch– Up to 20 MIPS Throughp

Page 2

103538A–MICRO–7/06AT89LP213/214 [Preliminary]8. Enhanced CPUThe AT89LP213/214 uses an enhanced 8051 CPU that runs at 6 to 12 times the speed of stan-d

Page 3

113538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 8-3. Two-cycle ALU Operation (Example: ADD A, #data)8.1 Restrictions on Certain InstructionsThe AT

Page 4

123538A–MICRO–7/06AT89LP213/214 [Preliminary]9. System ClockThe system clock is generated directly from one of three selectable clock sources. The thr

Page 5

133538A–MICRO–7/06AT89LP213/214 [Preliminary] 10. ResetDuring reset, all I/O Registers are set to their initial values, the port pins are tristated, a

Page 6

143538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 10-1. Power-on Reset Sequence (BOD Disabled)If the Brown-out Detector (BOD) is also enabled, the s

Page 7

153538A–MICRO–7/06AT89LP213/214 [Preliminary]10.2 Brown-out ResetThe AT89LP213/214 has an on-chip Brown-out Detection (BOD) circuit for monitoring the

Page 8

163538A–MICRO–7/06AT89LP213/214 [Preliminary]10.4 Watchdog ResetWhen the Watchdog times out, it will generate an internal reset pulse lasting 16 clock

Page 9

173538A–MICRO–7/06AT89LP213/214 [Preliminary]begin. The time-out period is controlled by the Start-up Timer Fuses (see Table 10-1 on page15). The inte

Page 10 - AT89LP213/214 [Preliminary]

183538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 11-3. Reset Recovery from Power-down. 12. InterruptsThe AT89LP213/214 provides 7 interrupt sources

Page 11

193538A–MICRO–7/06AT89LP213/214 [Preliminary]instruction, an internal polling sequence determines which request is serviced. The pollingsequence is ba

Page 12

23538A–MICRO–7/06AT89LP213/214 [Preliminary]have bytes to execute, and most of the remaining instructions require only one additional clock.The enhanc

Page 13

203538A–MICRO–7/06AT89LP213/214 [Preliminary]12.1 Interrupt Response TimeThe interrupt flags may be set by their hardware in any clock cycle. The inte

Page 14

213538A–MICRO–7/06AT89LP213/214 [Preliminary].Table 12-2. IE – Interrupt Enable RegisterIE = A8H Reset Value = 0000 0000BBit AddressableEA EC EGP ES E

Page 15

223538A–MICRO–7/06AT89LP213/214 [Preliminary]13. I/O PortsThe AT89LP213/214 can be configured for between 9 and 12 I/O pins. The exact number of I/Opi

Page 16

233538A–MICRO–7/06AT89LP213/214 [Preliminary].13.1.1 Quasi-bidirectional OutputPort pins in quasi-bidirectional output mode function similar to standa

Page 17

243538A–MICRO–7/06AT89LP213/214 [Preliminary]13.1.2 Input-only ModeThe input only port configuration is shown in Figure 13-2. The output drivers are t

Page 18

253538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 13-5. Push-pull Output13.2 Port 1 Analog FunctionsThe AT89LP213/214 incorporates an analog compara

Page 19

263538A–MICRO–7/06AT89LP213/214 [Preliminary]13.4 Port Alternate FunctionsMost general-purpose digital I/O pins of the AT89LP213/214 share functionali

Page 20

273538A–MICRO–7/06AT89LP213/214 [Preliminary]14. Enhanced Timer/CountersThe AT89LP213/214 has two 16-bit Timer/Counter registers: Timer 0 and Timer 1.

Page 21

283538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 14-1. Timer/Counter 1 Mode 0: Variable Width CounterMode 0 operation is the same for Timer 0 as fo

Page 22

293538A–MICRO–7/06AT89LP213/214 [Preliminary]14.3 Mode 2 – 8-bit Auto-reload Timer/CounterMode 2 configures the Timer register as an 8-bit Counter (TL

Page 23

33538A–MICRO–7/06AT89LP213/214 [Preliminary]3. Pin DescriptionTable 3-1. AT89LP213 Pin DescriptionPin Symbol Type Description1P1.5I/OI/OIP1.5: User-co

Page 24

303538A–MICRO–7/06AT89LP213/214 [Preliminary].Table 14-1. TCON – Timer/Counter Control RegisterTCON = 88H Reset Value = 0000 0000BBit AddressableTF1 T

Page 25

313538A–MICRO–7/06AT89LP213/214 [Preliminary]Table 14-2. TMOD: Timer/Counter Mode Control RegisterTMOD = 88H Reset Value = 0000 0000B Not Bit Addressa

Page 26

323538A–MICRO–7/06AT89LP213/214 [Preliminary].14.5 Pulse Width ModulationOn the AT89LP213, Timer 0 and Timer 1 may be independently configured as 8-bi

Page 27

333538A–MICRO–7/06AT89LP213/214 [Preliminary]14.5.1 Mode 0 – 8-bit PWM with 8-bit Logarithmic PrescalerIn Mode 0, TLx acts as a logarithmic prescaler

Page 28

343538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 14-7. Timer/Counter 1 PWM Mode 114.5.3 Mode 2 – 8-bit Frequency GeneratorTimer 0 in PWM Mode 2 fun

Page 29

353538A–MICRO–7/06AT89LP213/214 [Preliminary]14.5.4 Mode 3 – Split 8-bit PWMTimer 1 in PWM Mode 3 simply holds its count. The effect is the same as se

Page 30

363538A–MICRO–7/06AT89LP213/214 [Preliminary]15. External InterruptsWhen the AT89LP213/214 is configured to use the internal RC Oscillator, XTAL1 and

Page 31

373538A–MICRO–7/06AT89LP213/214 [Preliminary]..Table 16-2. GPLS – General-purpose Interrupt Level Select RegisterGPLS = 9BH Reset Value = 0000 0000BNo

Page 32

383538A–MICRO–7/06AT89LP213/214 [Preliminary]17. Serial InterfaceThe serial interface on the AT89LP214 implements a Universal Asynchronous Receiver/Tr

Page 33

393538A–MICRO–7/06AT89LP213/214 [Preliminary]bit and prepares to receive the data bytes that follows. The slaves that are not addressed settheir SM2 b

Page 34

43538A–MICRO–7/06AT89LP213/214 [Preliminary]Table 3-2. AT89LP214 Pin DescriptionPin Symbol Type Description1P1.5I/OI/OIP1.5: User-configurable I/O Por

Page 35

403538A–MICRO–7/06AT89LP213/214 [Preliminary]17.2 Baud RatesThe baud rate in Mode 0 is fixed as shown in the following equation:The baud rate in Mode

Page 36

413538A–MICRO–7/06AT89LP213/214 [Preliminary]17.3 More About Mode 0Serial data enters and exits through RXD. TXD outputs the shift clock. Eight data b

Page 37

423538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 17-1. Serial Port Mode 0INTERNAL BUS1/2 foscINTERNAL BUSTXD (SHIFT CLOCK)RXD (DATA OUT)TXD (SHIFT

Page 38

433538A–MICRO–7/06AT89LP213/214 [Preliminary]17.4 More About Mode 1Ten bits are transmitted (through TXD), or received (through RXD): a start bit (0),

Page 39

443538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 17-2. Serial Port Mode 1 TXCLOCKWRITE TO SBUFINTERNAL BUSREADSBUFLOADSBUFSBUFSHIFTINPUT SHIFT REG.

Page 40

453538A–MICRO–7/06AT89LP213/214 [Preliminary]17.5 More About Modes 2 and 3Eleven bits are transmitted (through TXD), or received (through RXD): a star

Page 41

463538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 17-3. Serial Port Mode 2SMOD1 1SMOD1 0INTERNAL BUSINTERNAL BUSCPU CLOCK

Page 42

473538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 17-4. Serial Port Mode 3 TXCLOCKWRITE TO SBUFSENDDATASHIFTTXDSTOP BIT GENTID0 D1 D2 D3 D4 D5 D6 D7

Page 43

483538A–MICRO–7/06AT89LP213/214 [Preliminary]17.6 Framing Error DetectionIn addition to all of its usual modes, the UART can perform framing error det

Page 44

493538A–MICRO–7/06AT89LP213/214 [Preliminary]In a more complex system, the following could be used to select slaves 1 and 2 while excludingslave 0: Sl

Page 45

53538A–MICRO–7/06AT89LP213/214 [Preliminary]4. Block DiagramFigure 4-1. AT89LP213 Block DiagramFigure 4-2. AT89LP214 Block Diagram

Page 46

503538A–MICRO–7/06AT89LP213/214 [Preliminary]The interconnection between master and slave CPUs with SPI is shown in Figure 18-1. The fourpins in the i

Page 47

513538A–MICRO–7/06AT89LP213/214 [Preliminary]Notes: 1. Set up the clock mode before enabling the SPI: set all bits needed in SPCR except the SPE bit,

Page 48

523538A–MICRO–7/06AT89LP213/214 [Preliminary]Table 18-3. SPSR – SPI Status RegisterSPSR Address = E8H Reset Value = 000X X000BNot Bit AddressableSPIF

Page 49

533538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 18-2. SPI Shift Register DiagramFigure 18-3. SPI Block Diagram2:1MUX2:1MUXSerial Master Serial Sla

Page 50 - 3538A–MICRO–7/06

543538A–MICRO–7/06AT89LP213/214 [Preliminary]The CPHA (Clock PHAse), CPOL (Clock POLarity), and SPR (Serial Peripheral clock Rate =baud rate) bits in

Page 51

553538A–MICRO–7/06AT89LP213/214 [Preliminary]19. Analog ComparatorA single analog comparator is provided on the AT89LP213/214. The analog comparator h

Page 52

563538A–MICRO–7/06AT89LP213/214 [Preliminary]Note: 1. Debouncing modes require the use of Timer 1 to generate the sampling delay.Table 19-1. ACSR – An

Page 53 - Pin Control Logic

573538A–MICRO–7/06AT89LP213/214 [Preliminary]20. Programmable Watchdog TimerThe programmable Watchdog Timer (WDT) protects the system from incorrect e

Page 54 - 1 2 3 4 5 6 7 8

583538A–MICRO–7/06AT89LP213/214 [Preliminary]20.1 Software ResetA Software Reset of the AT89LP213/214 is accomplished by writing the software resetseq

Page 55 - Timer 1 Overflow

593538A–MICRO–7/06AT89LP213/214 [Preliminary]21. Instruction Set SummaryThe AT89LP213/214 is fully binary compatible with the MCS-51 instruction set.

Page 56

63538A–MICRO–7/06AT89LP213/214 [Preliminary]5. Comparison to Standard 8051The AT89LP213/214 is part of a family of devices with enhanced features that

Page 57

603538A–MICRO–7/06AT89LP213/214 [Preliminary]Arithmetic BytesClock CyclesHex Code8051 AT89LPINC DPTR 1 24 2 A3MUL AB 1 48 2 A4DIV AB 1 48 4 84DA A 1 1

Page 58

613538A–MICRO–7/06AT89LP213/214 [Preliminary]Data Transfer BytesClock CyclesHex Code8051 AT89LPMOV A, Rn 1 12 1 E8-EFMOV A, direct 2 12 2 E5MOV A, @Ri

Page 59

623538A–MICRO–7/06AT89LP213/214 [Preliminary]Note: 1. This escaped instruction is an extension to the instruction set.Bit Operations BytesClock Cycles

Page 60

633538A–MICRO–7/06AT89LP213/214 [Preliminary]22. On-chip Debug SystemThe AT89LP213/214 On-chip Debug (OCD) System uses a two-wire serial interface to

Page 61

643538A–MICRO–7/06AT89LP213/214 [Preliminary]22.2 Software BreakpointsThe AT89LP213/214 microcontroller includes a BREAK instruction for implementing

Page 62

653538A–MICRO–7/06AT89LP213/214 [Preliminary]23. Programming the Flash MemoryThe Atmel AT89LP213/214 microcontroller features 2KB of on-chip In-System

Page 63

663538A–MICRO–7/06AT89LP213/214 [Preliminary]The In-System Programming Interface is the only means of externally programming theAT89LP213/214 microcon

Page 64

673538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 23-2. AT89LP213/214 Memory Organization23.3 Command FormatProgramming commands consist of an opcod

Page 65

683538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 23-3. Command Sequence Flow ChartFigure 23-4. ISP Command PacketInput Preamble 2(55h)Input OpcodeI

Page 66

693538A–MICRO–7/06AT89LP213/214 [Preliminary]Notes: 1. Program Enable must be the first command issued after entering into programming mode.2. Any num

Page 67

73538A–MICRO–7/06AT89LP213/214 [Preliminary]5.6 Watchdog TimerThe Watchdog Timer in AT89LP213/214 counts at a rate of once per clock cycle. This compa

Page 68

703538A–MICRO–7/06AT89LP213/214 [Preliminary]23.4 Status RegisterThe current state of the memory may be accessed by reading the status register. The s

Page 69

713538A–MICRO–7/06AT89LP213/214 [Preliminary]23.7 User Configuration FusesThe AT89LP213/214 includes 19 user fuses for configuration of the device. Ea

Page 70

723538A–MICRO–7/06AT89LP213/214 [Preliminary]23.8 Programming Interface TimingThis section details general system timing sequences and constraints for

Page 71

733538A–MICRO–7/06AT89LP213/214 [Preliminary]23.8.3 ISP Start Sequence Execute this sequence to exit CPU execution mode and enter ISP mode when the de

Page 72

743538A–MICRO–7/06AT89LP213/214 [Preliminary]23.8.5 Serial Peripheral InterfaceThe Serial Peripheral Interface (SPI) is a byte-oriented full duplex sy

Page 73

753538A–MICRO–7/06AT89LP213/214 [Preliminary]23.8.6 Timing ParametersThe timing parameters for Figure 23-5, Figure 23-6, Figure 23-7, Figure 23-8, and

Page 74

763538A–MICRO–7/06AT89LP213/214 [Preliminary]24. Electrical CharacteristicsNotes: 1. Under steady state (non-transient) conditions, IOL must be extern

Page 75

773538A–MICRO–7/06AT89LP213/214 [Preliminary]24.3 Serial Peripheral Interface Timing Table 24-1. SPI Master CharacteristicsSymbol Parameter Min Max Un

Page 76

783538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 24-1. SPI Master Timing (CPHA = 0)Figure 24-2. SPI Slave Timing (CPHA = 0)Figure 24-3. SPI Master

Page 77

793538A–MICRO–7/06AT89LP213/214 [Preliminary]Figure 24-4. SPI Slave Timing (CPHA = 1)24.4 External Clock DriveFigure 24-5. External Clock Drive Wavefo

Page 78

83538A–MICRO–7/06AT89LP213/214 [Preliminary]A map of the AT89LP213/214 program memory is shown in Figure 6-1. In addition to the 2Kcode space from 000

Page 79

803538A–MICRO–7/06AT89LP213/214 [Preliminary] Figure 24-6. Shift Register Mode Timing Waveform24.6 Test Conditions24.6.1 AC Testing Input/Output Wavef

Page 80

813538A–MICRO–7/06AT89LP213/214 [Preliminary]24.6.3 ICC Test Condition, Active Mode, All Other Pins are Disconnected24.6.4 ICC Test Condition, Idle Mo

Page 81

823538A–MICRO–7/06AT89LP213/214 [Preliminary]25. Ordering Information 25.1 Standard PackageSpeed (MHz)PowerSupply Ordering Code Package Operation Rang

Page 82

833538A–MICRO–7/06AT89LP213/214 [Preliminary]26. Packaging Information26.1 14P3 – PDIP 2325 Orchard Parkway San Jose, CA 95131TITLEDRAWING NO.RREV.

Page 83

843538A–MICRO–7/06AT89LP213/214 [Preliminary]26.2 14X – TSSOP 2325 Orchard Parkway San Jose, CA 95131TITLEDRAWING NO.RREV. 14X (Formerly "14T

Page 84

853538A–MICRO–7/06AT89LP213/214 [Preliminary]27. Revision History Revision No. HistoryRevision A – July 2006 • Initial Release

Page 85

863538A–MICRO–7/06AT89LP213/214 [Preliminary]

Page 86

i3538A–MICRO–7/06AT89LP213/214 [Preliminary]Table of Contents1. Description ...

Page 87

ii3538A–MICRO–7/06AT89LP213/214 [Preliminary]Table of Contents (Continued)11. Power Saving Modes ...

Page 88

iii3538A–MICRO–7/06AT89LP213/214 [Preliminary]Table of Contents (Continued)22. On-Chip Debug System ...

Page 89

93538A–MICRO–7/06AT89LP213/214 [Preliminary]7. Special Function RegistersA map of the on-chip memory area called the Special Function Register (SFR) s

Page 90 - Regional Headquarters

Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise,

Comments to this Manuals

No comments