Channel Plus 8051 Specifikace

Procházejte online nebo si stáhněte Specifikace pro Síťové přepínače Channel Plus 8051. Channel Plus 8051 Specifications Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 200
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
16x16 Multiply–Accumulate Unit
256x8 Internal RAM
4096x8 Internal Extra RAM
Up to 4KB Extended Stack in Extra RAM
Dual Data Pointers
4-level Interrupt Priority
Nonvolatile Program and Data Memory
32K/64K Bytes of In-System Programmable (ISP) Flash Program Memory
8K Bytes of Flash Data Memory
Endurance: Minimum 100,000 Write/Erase Cycles
Serial Interface for Program Downloading
64-byte Fast Page Programming Mode
256-Byte User Signature Array
2-level Program Memory Lock for Software Security
In-Application Programming of Program Memory
Peripheral Features
Three 16-bit Enhanced Timer/Counters
Two 8-bit PWM Outputs
4-Channel 16-bit Compare/Capture/PWM Array
Enhanced UART with Automatic Address Recognition and Framing
Error Detection
Enhanced Master/Slave SPI with Double-buffered Send/Receive
Master/Slave Two-Wire Serial Interface
Programmable Watchdog Timer with Software Reset
Dual Analog Comparators with Selectable Interrupts and Debouncing
8-channel 10-bit ADC/DAC
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
Active-low External Reset Pin
Internal RC Oscillator
Low Power Idle and Power-down Modes
Interrupt Recovery from Power-down Mode
I/O and Packages
Up to 38 Programmable I/O Lines
40-lead PDIP or 44-lead TQFP/PLCC or 44-pad VQFN/MLF
Configurable I/O Modes
Quasi-bidirectional (80C51 Style)
Input-Only (Tristate)
Push-pull CMOS Output
Open-drain
Operating Conditions
2.4V to 3.6V V
DD
Voltage Range
–-40° C to 85°C Temperature Range
0 to 20 MHz @ 2.4–3.6V
8-bit
Microcontroller
with 32K/64K
Bytes In-System
Programmable
Flash
AT89LP3240
AT89LP6440
3706C–MICRO–2/11
Zobrazit stránku 0
1 2 3 4 5 6 ... 199 200

Shrnutí obsahu

Strany 1 - Features

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

Strany 2

103706C–MICRO–2/11AT89LP3240/6440There is no difference in counting rate between Timer 2’s Auto-Reload/Capture and Bau dRate/Clock Out modes. All mode

Strany 3

1003706C–MICRO–2/11AT89LP3240/6440Figure 17-2. SPI Master-Slave InterconnectionWhen the SPI is configured as a Master (MSTR in SPCR is set), the opera

Strany 4

1013706C–MICRO–2/11AT89LP3240/6440and if the ENH bit in SPSR is set. For multi-byte transfers, TXE may be used to remove anydead time between byte tra

Strany 5

1023706C–MICRO–2/11AT89LP3240/6440.Notes:1.In these modes MOSI is active only during transfers. MOSI will be pulled high between trans-fers to allow o

Strany 6

1033706C–MICRO–2/11AT89LP3240/6440Notes:1.Set up the clock mode before enabling the SPI: set all bits needed in SPCR except the SPE bit, then set SPE.

Strany 7

1043706C–MICRO–2/11AT89LP3240/644017.4 Serial Clock TimingThe CPHA, CPOL and SPR bits in SPCR control the shape and rate of SCK. The two SPR bitsprovi

Strany 8

1053706C–MICRO–2/11AT89LP3240/644018. Two-Wire Serial InterfaceThe Two-Wire Interface (TWI) is a bi-directional 2-wire serial communication standard.

Strany 9

1063706C–MICRO–2/11AT89LP3240/644018.1 Data Transfer and Frame Format18.1.1 Transferring BitsEach data bit transferred on the TWI bus is accompanied b

Strany 10 - AT89LP3240/6440

1073706C–MICRO–2/11AT89LP3240/6440ter’s requ est, the SDA line should be left high in the ACK clock cycle. The Master can thentransmit a STOP conditio

Strany 11

1083706C–MICRO–2/11AT89LP3240/644018.1.5 Combining Address and Data Packets Into a TransmissionA transmission basically consists of a START condition,

Strany 12

1093706C–MICRO–2/11AT89LP3240/6440Figure 18-7. SCL Synchronization between Multiple MastersArbitration is carried out by all masters continuously moni

Strany 13

113706C–MICRO–2/11AT89LP3240/64403. Memory OrganizationThe AT89LP3240/6440 uses a Harvard Architecture with separate address spaces for programand dat

Strany 14

1103706C–MICRO–2/11AT89LP3240/6440It is the user software’s responsibility to ensure tha t these illegal arbitration conditions neveroccur. This impli

Strany 15

1113706C–MICRO–2/11AT89LP3240/6440average TWI bus clock period. The SCL frequency is generated according to the followingequation:18.3.3 Bus Interface

Strany 16

1123706C–MICRO–2/11AT89LP3240/644018.4 Register OverviewTable 18-1. TWCR – Two-Wire Control RegisterTWCR Address = AAH Reset Value = X000 00XXBNot Bit

Strany 17

1133706C–MICRO–2/11AT89LP3240/644018.5 Using the TWIThe AT89LP TWI is byte-oriented and interrupt based. Interrupts are issued after all bus events,li

Strany 18

1143706C–MICRO–2/11AT89LP3240/6440Figure 18-10. Interfacing the Application to the TWI in a Typical Transmission1. The first step in a TWI transmissio

Strany 19

1153706C–MICRO–2/11AT89LP3240/6440long as the TWIF bit in TWCR is set. Immediately after the application has cleared TWIF, the TWI will initiate trans

Strany 20

1163706C–MICRO–2/11AT89LP3240/6440SLA: Slave AddressIn Figure 18-11 to Figure 18-14, circles are used to indicate that the TWIF flag is set. The num-

Strany 21

1173706C–MICRO–2/11AT89LP3240/6440.Table 18-6. Status Codes for Master Transmitter ModeStatus Code(TWSR)Status of the Two-wire Serial Bus and Two-wire

Strany 22

1183706C–MICRO–2/11AT89LP3240/6440Figure 18-11. Format and States in Master Transmitter Mode18.6.2 Master Receiver ModeIn the Master Receiver mode, a

Strany 23

1193706C–MICRO–2/11AT89LP3240/6440TWEN must be written to one to enable the Two-wire Serial Interface, STA must be written toone to transmit a START c

Strany 24

123706C–MICRO–2/11AT89LP3240/6440Figure 3-1. Program Memory Map3.2 Internal Data MemoryThe AT89LP3240/6440 contains 256 bytes of general SRAM data mem

Strany 25

1203706C–MICRO–2/11AT89LP3240/6440Figure 18-12. Format and States in Master Receiver Mode18.6.3 Slave Receiver ModeIn the Slave Receiver mode, a numbe

Strany 26

1213706C–MICRO–2/11AT89LP3240/6440TWEN must be written to one to enable the TWI. The AA bit must be written to one to enable theacknowledgment of the

Strany 27

1223706C–MICRO–2/11AT89LP3240/6440Figure 18-13. Format and States in Slave Receiver Mode88hPreviously addressed with own SLA+W; data has been received

Strany 28

1233706C–MICRO–2/11AT89LP3240/644018.6.4 Slave Transmitter ModeIn the Slave Transmitter mode, a number of data bytes are transmitted to a master recei

Strany 29

1243706C–MICRO–2/11AT89LP3240/6440.Table 18-9. Status Codes for Slave Transmitter ModeStatus Code(TWSR)Status of the Two-wire Serial Bus and Two-wire

Strany 30

1253706C–MICRO–2/11AT89LP3240/644018.6.5 Miscellaneous StatesThere are two status codes that do not correspond to a defined TWI state, see Table 18-10

Strany 31

1263706C–MICRO–2/11AT89LP3240/6440Figure 18-15. Combining Several TWI Modes to Access a S erial EEPROM19. Dual Analog ComparatorsThe AT89LP3240/6440

Strany 32

1273706C–MICRO–2/11AT89LP3240/6440als o set the CONA (ACSRA.5) or CONB (ACSRB.5) bits to connect the compara tor inputsbefore using a comparator. When

Strany 33

1283706C–MICRO–2/11AT89LP3240/6440Figure 19-2. Equivalent Analog Input Model19.2 Internal Reference VoltageThe negative input terminal of each compara

Strany 34

1293706C–MICRO–2/11AT89LP3240/6440Figure 19-4. Dual Comparator Configuration Examplesa. dual independent comparators with external references+-ACMPAAI

Strany 35

133706C–MICRO–2/11AT89LP3240/64403.2.2 IDATAThe full 256 byte internal RAM can be indirectly addressed using the 8-bit pointers R0 and R1.The first 12

Strany 36

1303706C–MICRO–2/11AT89LP3240/6440Notes:1.CONA must be cleared to 0 before changing CSA[1-0].2. Debouncing modes require the use of Timer 1 to generat

Strany 37

1313706C–MICRO–2/11AT89LP3240/6440Notes:1.CONB must be cleared to 0 before changing CSB[1-0].2. Debouncing modes require the use of Timer 1 to generat

Strany 38

1323706C–MICRO–2/11AT89LP3240/6440Notes:1.CONB (ACSRB.5) must be cleared to 0 before changing RFB[1-0].2. CONA (ACSRA.5) must be cleared to 0 before c

Strany 39

1333706C–MICRO–2/11AT89LP3240/644020. Digital-to-Analog/Analog-to-Digital ConverterThe AT89LP3240/6440 includes a 10-bit Data Converter (DADC) with th

Strany 40

1343706C–MICRO–2/11AT89LP3240/6440Figure 20-1. DADC Block DiagramTable 20-1. Example ADC Conversion CodesRight Adjust Left Adjust Single-Ended Mode (V

Strany 41

1353706C–MICRO–2/11AT89LP3240/644020.1 ADC OperationThe ADC converts an analog input voltage to a 10-bit signed digital value through successiveapprox

Strany 42

1363706C–MICRO–2/11AT89LP3240/6440Figure 20-3. Equivalent Analog Input Model20.2 DAC OperationThe DAC converts a 10-bit signed digital value to an ana

Strany 43

1373706C–MICRO–2/11AT89LP3240/6440Figure 20-5. Equivalent Analog Output Model20.3 Clock SelectionThe DADC requires a clock of 2 MHz or less to achieve

Strany 44

1383706C–MICRO–2/11AT89LP3240/6440be set by hardware while the conversion is in progress. Note that the timer overflow rate must beslower than the con

Strany 45

1393706C–MICRO–2/11AT89LP3240/6440Table 20-2. DADC – DADC Control RegisterDADC = D9H Reset Value = 0000 0000BNot Bit AddressableADIF GO/BSYDAC ADCE LA

Strany 46

143706C–MICRO–2/11AT89LP3240/6440Some internal data memory s paces are mapped into portions of the XDATA address space. Inthis case the lower address

Strany 47

1403706C–MICRO–2/11AT89LP3240/6440Table 20-5. DADI – DADC Input Control RegisterDADI = DAH Reset Value = 0000 0000BNot Bit AddressableACON IREFTRG1 TR

Strany 48

1413706C–MICRO–2/11AT89LP3240/644021. Programmable Watchdog TimerThe programmable Watchdog Timer (WDT) protects the system from incorrect execution by

Strany 49

1423706C–MICRO–2/11AT89LP3240/644021.1 Software ResetA Software Reset of the AT89LP3240/6440 is accomplished by writing the software resetsequence 5AH

Strany 50

1433706C–MICRO–2/11AT89LP3240/644022. Instruction Set SummaryThe AT89LP3240/6440 is fully binary compatible with the 8051 instruction set. The differe

Strany 51

1443706C–MICRO–2/11AT89LP3240/6440INC /DPTR(1)2– 3A5 A3MUL AB 1 48 2A4DIV AB 1 48 4 84DA A 1 12 1 D4MAC AB(1)2– 9A5 A4CLR M(1)2– 2A5 E4ASR M(1)2– 2A5

Strany 52

1453706C–MICRO–2/11AT89LP3240/6440XRL A, direct 2 12 2 65XRL A, @Ri 1 12 2 66-67XRL A, #data 212 2 64XRL direct, A 2 12 2 62XRL direct, #data 324 3 63

Strany 53

1463706C–MICRO–2/11AT89LP3240/6440Notes:1.This escaped instruction is an extension to the instruction set. See Section 22.1 on page 147.2. MOVX @DPTR

Strany 54

1473706C–MICRO–2/11AT89LP3240/644022.1 Instruction Set ExtensionsThe following instructions are extensions to the standard 8051 instruction set that p

Strany 55

1483706C–MICRO–2/11AT89LP3240/644022.1.3 CJNE A, @Ri, relFunction: Compare and Jump if Not EqualDescription: CJNE compares the magnitudes of the Accum

Strany 56

1493706C–MICRO–2/11AT89LP3240/644022.1.5 INC /DPTRFunction: Increment Alternate Data PointerDescription: INC /DPTR increments the unselected 16-bit da

Strany 57

153706C–MICRO–2/11AT89LP3240/6440To enable write access to the nonvolatile data memory, the MWEN bit (MEMCON.4) must be setto one. When MWEN = 1 and D

Strany 58 - 3706C–MICRO–2/11

1503706C–MICRO–2/11AT89LP3240/644022.1.7 LSL MFunction: Shift MAC Accumulator Left LogicallyDescription: The forty bits in the M register are shifted

Strany 59

1513706C–MICRO–2/11AT89LP3240/644022.1.9 MAC ABFunction: Multiply and AccumulateDescription: MAC AB multiplies the signed 16-bit integers in the regis

Strany 60

1523706C–MICRO–2/11AT89LP3240/644022.1.11 MOVX A, @/DPTRFunction: Move External using Alternate Data PointerDescription: The MOVX instruction transfes

Strany 61

1533706C–MICRO–2/11AT89LP3240/644023. Register IndexTable 23-1. Special Function Register Cross ReferenceName Address Description IndexACC E0HACSRA 97

Strany 62

1543706C–MICRO–2/11AT89LP3240/6440P1 90H Table 10-3 on page 45P1M0 C2H Table 10-2 and Table 10-3 on page 45P1M1 C3H Table 10-2 and Table 10-3 on page

Strany 63 - 12.3 Auto-Reload Mode

1553706C–MICRO–2/11AT89LP3240/644024. On-Chip Debug SystemThe AT89LP3240/6440 On-Chip Debug (OCD) System uses a two-wire serial interface to con-trol

Strany 64

1563706C–MICRO–2/11AT89LP3240/6440• P4.2/RST ca nnot be connected directly to VDD and any external capacitors connected to RST must be removed.• All e

Strany 65

1573706C–MICRO–2/11AT89LP3240/6440• When using the Internal RC Oscillator during debug, DDA is located on the XTAL1/P4.0 pin. The P4.0 I/O function ca

Strany 66

1583706C–MICRO–2/11AT89LP3240/6440Figure 25-1. In-System Programming Device ConnectionsThe Parallel interface is a special mode of the serial interfac

Strany 67

1593706C–MICRO–2/11AT89LP3240/6440•The ISP interface uses the SPI clock mode 0 (CPOL = 0, CPHA = 0) exclusively with a maximum frequency of 5 MHz.•The

Strany 68

163706C–MICRO–2/11AT89LP3240/6440Figure 3-5. FDATA Byte WriteFigure 3-6. FDATA Page WriteFrequently just a few bytes within a page must be updated whi

Strany 69 - 13. Compare/Capture Array

1603706C–MICRO–2/11AT89LP3240/6440Figure 25-3. AT89LP6440 Memory Organization25.3 Command FormatProgramming commands consist of an opcode byte, two ad

Strany 70 - 13.1 CCA Registers

1613706C–MICRO–2/11AT89LP3240/6440For a summary of available commands, see Table 25-2 on page 162.Figure 25-4. Command Sequence Flow ChartFigure 25-5.

Strany 71

1623706C–MICRO–2/11AT89LP3240/6440Notes:1.Program Enable must be the first command issued after entering into programming mode.2. Parallel Enable swit

Strany 72 - 13.2 Input Capture Mode

1633706C–MICRO–2/11AT89LP3240/644025.4 Status RegisterThe current state of the memory may be accessed by reading the status register. The status reg-i

Strany 73

1643706C–MICRO–2/11AT89LP3240/644025.7 User Configuration FusesThe AT89LP3240/6440 includes 11 user fuses for configuration of the device. Each fuse i

Strany 74

1653706C–MICRO–2/11AT89LP3240/644025.8 User Signature and Analog ConfigurationThe User Signature Array contains 256 bytes of non-volatile memory in tw

Strany 75 - 13.3 Output Compare Mode

1663706C–MICRO–2/11AT89LP3240/6440Figure 25-7. Serial Programming Power-up Sequence25.9.2 Power-down Sequence Execute this sequence to power-down the

Strany 76

1673706C–MICRO–2/11AT89LP3240/6440Figure 25-9. In-System Programming (ISP) Start Sequence25.9.4 ISP Exit Sequence Execute this sequence to exit ISP mo

Strany 77

1683706C–MICRO–2/11AT89LP3240/6440CPHA = 0) where bits are sampled on the rising edge of SCK and output on the falling edge ofSCK. For more detailed t

Strany 78

1693706C–MICRO–2/11AT89LP3240/644025.9.6 Timing ParametersThe timing parameters for Figure 25-7, Figure 25-8, Figure 25-9, Figure 25-10, Figure 25-12

Strany 79

173706C–MICRO–2/11AT89LP3240/64403.3.4 External Memory InterfaceThe AT89LP3240/6440 uses the standard 8051 external memory interface with the upperadd

Strany 80

1703706C–MICRO–2/11AT89LP3240/644026. Electrical CharacteristicsNotes: 1. Under steady state (non-transient) conditions, IOL must be externally limite

Strany 81

1713706C–MICRO–2/11AT89LP3240/644026.3 Safe Operating Conditions26.3.1 SpeedFigure 26-1 shows the safe operating frequencies for the AT89LP3240/6440 v

Strany 82

1723706C–MICRO–2/11AT89LP3240/644026.4.1 Supply Current (Internal Oscillator)Figure 26-3. Active Supply Current vs. VDD (8MHz Internal Oscillator)Figu

Strany 83

1733706C–MICRO–2/11AT89LP3240/644026.4.2 Supply Current (External Clock)Figure 26-5. Active Supply Current vs. FrequencyFigure 26-6. Idle Supply Curre

Strany 84

1743706C–MICRO–2/11AT89LP3240/644026.4.3 Quasi-Bidirectional InputFigure 26-7. Quasi-bidirectional Input Transition Current at 3.3V26.4.4 Quasi-Bidire

Strany 85

1753706C–MICRO–2/11AT89LP3240/644026.4.5 Push-Pull OutputFigure 26-9. Push-Pull Output I-V Source Characteristic at 3VFigure 26-10. Push-Pull Output I

Strany 86

1763706C–MICRO–2/11AT89LP3240/6440The values shown in these tables are valid for TA = -40°C to 85°C and VDD = 2.4 to 3.6V, unless otherwise noted.Note

Strany 87

1773706C–MICRO–2/11AT89LP3240/6440Figure 26-13. Typical Crystal Oscillator Swing with Quartz Crystal and C1=C2, TA = 25°CNote: 1. Replacing capacitor

Strany 88

1783706C–MICRO–2/11AT89LP3240/644026.6 Reset CharacteristicsThe values shown in this table are valid for TA = -40°C to 85°C and VDD = 2.4 to 3.6V, unl

Strany 89

1793706C–MICRO–2/11AT89LP3240/64403. Parameter tLHLL applies only when ALES =1.4. The strobe pulse width may be lengthened by 1, 2 or 3 additional tCL

Strany 90

183706C–MICRO–2/11AT89LP3240/6440Figure 3-8 shows a hardware configuration for accessing 256-byte blocks of external RAM usingan 8-bit paged address.

Strany 91

1803706C–MICRO–2/11AT89LP3240/6440Figure 26-17. SPI Master Timing (CPHA = 0)tSISSerial Input Setup Time 10 nstSIHSerial Input Hold Time 10 nstSOHSeria

Strany 92

1813706C–MICRO–2/11AT89LP3240/6440Figure 26-18. SPI Slave Timing (CPHA = 0)Figure 26-19. SPI Master Timing (CPHA = 1)Figure 26-20. SPI Slave Timing (C

Strany 93

1823706C–MICRO–2/11AT89LP3240/644026.9 Two-wire Serial Interface CharacteristicsTable 26-7 describes the requirements for devices connected to the Two

Strany 94

1833706C–MICRO–2/11AT89LP3240/64403. Cb = capacitance of one bus line in pF.4. fCK = CPU clock frequencyFigure 26-21. Two-wire Serial Bus Timing Figur

Strany 95

1843706C–MICRO–2/11AT89LP3240/644026.11 Dual Analog Comparator CharacteristicsThe values shown in this table are valid for TA = -40°C to 85°C and VDD

Strany 96

1853706C–MICRO–2/11AT89LP3240/644026.12 DADC CharacteristicsThe values shown in these tables are valid for TA = -40°C to 85°C and VDD = 2.4 to 3.6V, u

Strany 97

1863706C–MICRO–2/11AT89LP3240/644026.13 Test Conditions26.13.1 AC Testing Input/Output WaveformFigure 26-24. AC Testing Input/Output Waveform(1) Note:

Strany 98

1873706C–MICRO–2/11AT89LP3240/644026.13.4 ICC Test Condition: Idle ModeFigure 26-27. Connection Diagram for ICC Idle Measurement. All Other Pins are D

Strany 99

1883706C–MICRO–2/11AT89LP3240/644027. Ordering Information 27.1 Green Package Option (Pb/Halide-free)Code FlashSpeed (MHz)PowerSupply Ordering Code Pa

Strany 100

1893706C–MICRO–2/11AT89LP3240/644028. Packaging Information28.1 44A – TQFP 2325 Orchard Parkway San Jose, CA 95131TITLEDRAWING NO.RREV. 44A, 44-le

Strany 101

193706C–MICRO–2/11AT89LP3240/6440automatically tristated when inputting data regardless of the Port 0 configuration. The Port 0configuration will dete

Strany 102

1903706C–MICRO–2/11AT89LP3240/644028.2 40P6 – PDIP 2325 Orchard Parkway San Jose, CA 95131TITLEDRAWING NO.RREV. 40P6, 40-lead (0.600"/15.24 m

Strany 103

1913706C–MICRO–2/11AT89LP3240/644028.3 44J – PLCCNotes: 1. This package conforms to JEDEC reference MS-018, Variation AC. 2. Dimensions D1 and E1 do n

Strany 104

1923706C–MICRO–2/11AT89LP3240/644028.4 44M1 – VQFN/MLFTITLEDRAWING NO.GPCREV. Package Drawing Contact: [email protected] H44M1, 44-p

Strany 105

1933706C–MICRO–2/11AT89LP3240/644029. Revision History Revision No. HistoryRevision A – September 2009 • Initial ReleaseRevision B– September 2010• Re

Strany 106

1943706C–MICRO–2/11AT89LP3240/6440

Strany 107

i3706C–MICRO–2/11AT89LP3240/6440Table of ContentsFeatures ...

Strany 108

ii3706C–MICRO–2/11AT89LP3240/6440Table of Contents (Continued)7.4 Watchdog Reset ...

Strany 109

iii3706C–MICRO–2/11AT89LP3240/6440Table of Contents (Continued)16 Serial Interface (UART) ...

Strany 110

iv3706C–MICRO–2/11AT89LP3240/6440Table of Contents (Continued)22 Instruction Set Summary ...

Strany 111

v3706C–MICRO–2/11AT89LP3240/6440Table of Contents (Continued)28 Packaging Information ...

Strany 112

23706C–MICRO–2/11AT89LP3240/64401. Pin Configurations1.1 40P6: 40-lead PDIP1.2 44A: 44-lead TQFP (Top View)1234567891011121314151617181920403938373635

Strany 113

203706C–MICRO–2/11AT89LP3240/6440Figure 3-11. MOVX with One Wait State (WS =01B)Figure 3-12. MOVX with Two Wait States (WS =10B)Figure 3-13. MOVX with

Strany 114

3706C–MICRO–2/11Atmel Corporation2325 Orchard ParkwaySan Jose, CA 95131USATel: (+1) (408) 441-0311Fax: (+1) (408) [email protected]

Strany 115

213706C–MICRO–2/11AT89LP3240/6440tain separate copies of SP for use with each stack space. Interrupts should be disabled whileswapping copies of SP in

Strany 116

223706C–MICRO–2/11AT89LP3240/64404. Special Function RegistersA map of the on-chip memory area called the Special Function Register (SFR) space is sho

Strany 117

233706C–MICRO–2/11AT89LP3240/64405. Enhanced CPUThe AT89LP3240/6440 uses an enhanced 8051 CPU that runs at 6 to 12 times the speed ofstandard 8051 dev

Strany 118

243706C–MICRO–2/11AT89LP3240/6440Figure 5-3. Two-cycle ALU Operation (Example: ADD A, #data)5.1 Multiply–Accumulate Unit (MAC)The AT89LP3240/6440 incl

Strany 119

253706C–MICRO–2/11AT89LP3240/6440The MAC operation is performed by executing the MAC AB (A5 A4H) extended instruction. Thistwo-byte instruction requir

Strany 120

263706C–MICRO–2/11AT89LP3240/6440•In some cases, both data pointers must be used simultaneously. To prevent frequent toggling of DPS, the AT89LP3240/6

Strany 121

273706C–MICRO–2/11AT89LP3240/6440A summary of data pointer instructions with fast context switching is listed inTable 5-2.5.2.1 Data Pointer UpdateThe

Strany 122

283706C–MICRO–2/11AT89LP3240/64405.2.2 Data Pointer Operating ModesThe Dual Data Pointers on the AT89LP3240/6440 include three additional operating mo

Strany 123

293706C–MICRO–2/11AT89LP3240/64405.2.2.2 Index DisableThe MOVC Index Disable bit, MVCD (DSPR.1), disables the indexed addressing mode of theMOVC A, @A

Strany 124

33706C–MICRO–2/11AT89LP3240/64401.3 44J: 44-lead PLCC1.4 44M1: 44-pad VQFN/MLF7 8 9 10 11 12 13 14 15 16 17 39 38 37 36 35 34 33 32 31 30 29 MOSI/P1.5

Strany 125

303706C–MICRO–2/11AT89LP3240/64405.3 Instruction Set ExtensionsTable 5-8 lists the additions to the 8051 instruction set that are supported by theAT89

Strany 126

313706C–MICRO–2/11AT89LP3240/64406. System ClockThe system clock is generated directly from one of three selectable clock sources. The threesources ar

Strany 127

323706C–MICRO–2/11AT89LP3240/64406.2 External Clock SourceThe external clock option disables the oscillator amplifier and allows XTAL1 to be driven di

Strany 128

333706C–MICRO–2/11AT89LP3240/6440pass through intermediate frequencies. When CDV is updated, the new frequency will takeaffect within a maximum period

Strany 129

343706C–MICRO–2/11AT89LP3240/6440generated reset can be extended beyond the power-on period by holding the RST pin low longerthan the time-out.Figure

Strany 130

353706C–MICRO–2/11AT89LP3240/6440meet the minimum system requirements before the device exits reset and starts normal opera-tion. The RST pin may be h

Strany 131

363706C–MICRO–2/11AT89LP3240/6440Note: During a power-up sequence, the fuse selection is always overridden and therefore the pin will always function

Strany 132

373706C–MICRO–2/11AT89LP3240/6440.8.2 Power-down ModeSetting the Power-down (PD) bit in PCON enters Power-down mode. Power-down mode stopsthe oscillat

Strany 133

383706C–MICRO–2/11AT89LP3240/6440Figure 8-1. Interrupt Recovery from Power-down (PWDEX = 0)When PWDEX = “1”, the wake-up period is controlled external

Strany 134

393706C–MICRO–2/11AT89LP3240/6440Figure 8-3. Reset Recovery from Power-down8.3.2 Analog ComparatorsThe comparators will operate during Idle mode if e

Strany 135

43706C–MICRO–2/11AT89LP3240/64401.5 Pin DescriptionTable 1-1. AT89LP3240/6440 Pin DescriptionPin NumberSymbol Type DescriptionTQFP PLCC PDIP VQFN1761P

Strany 136

403706C–MICRO–2/11AT89LP3240/6440The IPxD bits located at the seventh bit of IP, IPH, IP2 and IP2H can be used to disable all inter-rupts of a given p

Strany 137

413706C–MICRO–2/11AT89LP3240/64409.1 Interrupt Response TimeThe interrupt flags may be set by their hardware in any clock cycle. The interrupt control

Strany 138

423706C–MICRO–2/11AT89LP3240/6440rupt system, the response time is always more than 5 clock cycles and less than 21 clock cycles.See Figure 9-1 a nd F

Strany 139

433706C–MICRO–2/11AT89LP3240/6440Table 9-3. IE2 – Interrupt Enable 2 RegisterIE = B4H Reset Value = xxxx x000BNot Bit Addressable– – – ETWI EADC ESPI

Strany 140

443706C–MICRO–2/11AT89LP3240/6440PSP Serial Peripheral Interface Interrupt Priority LowPCC Compare/Capture Array Interrupt Priority LowPGP General-pur

Strany 141

453706C–MICRO–2/11AT89LP3240/644010. I/O PortsThe AT89LP3240/6440 can be configured for between 35 and 38 I/O pins. The exact number ofI/O pins availa

Strany 142

463706C–MICRO–2/11AT89LP3240/644010.1.1 Quasi-bidirectional OutputPort pins in quasi-bidirectional output mode function similar to standard 8051 port

Strany 143

473706C–MICRO–2/11AT89LP3240/6440Figure 10-3. Input Circuit for P3.2, P3.3, P4.0, P4.1 and P4.210.1.3 Open-drain OutputThe open-drain output configura

Strany 144

483706C–MICRO–2/11AT89LP3240/644010.2 Port Analog FunctionsThe AT89LP3240/6440 incorporates two analog comparators and an 8-channel analog-to-digitalc

Strany 145

493706C–MICRO–2/11AT89LP3240/644010.4 Port Alternate FunctionsMost general-purpose digital I/O pins of the AT89LP3240/6440 share functionality with th

Strany 146

53706C–MICRO–2/11AT89LP3240/644017 23 20 17 GND I Ground18 24 21 18 P2.0I/OI/OOP2.0: User-configurable I/O Port 2 bit 0.CCA: Timer 2 Channel A Compare

Strany 147

503706C–MICRO–2/11AT89LP3240/6440P1.2 P1M0.2 P1M1.2SDA open-drainGPI2P1.3 P1M0.3 P1M1.3SCL open-drainGPI3P1.4 P1M0.4 P1M1.4SSGPI4P1.5 P1M0.5 P1M1.5MOS

Strany 148

513706C–MICRO–2/11AT89LP3240/644011. Enhanced Timer 0 and Timer 1 with PWMThe AT89LP3240/6440 has two 16-bit Timer/Counters, Timer 0 and Timer 1, with

Strany 149

523706C–MICRO–2/11AT89LP3240/644011.1 Mode 0 – Variable Width Timer/CounterBoth Timers in Mode 0 are 8-bit Counters with a variable prescaler. The pre

Strany 150

533706C–MICRO–2/11AT89LP3240/6440Figure 11-2. Timer/Counter 1 Mode 1: 16-bit Auto-Reload11.3 Mode 2 – 8-bit Auto-Reload Timer/CounterMode 2 configures

Strany 151

543706C–MICRO–2/11AT89LP3240/6440Mode 3 is for applications requiring an extra 8-bit timer or counter. With Timer 0 in Mode 3, theAT89LP3240/6440 can

Strany 152

553706C–MICRO–2/11AT89LP3240/6440Table 11-3. TMOD – Timer/Counter Mode Control RegisterTMOD Address = 089H Reset Value = 0000 0000BNot Bit Addressable

Strany 153

563706C–MICRO–2/11AT89LP3240/644011.5 Pulse Width ModulationOn the AT8 9LP3240/6440, Timer 0 and Timer 1 may be independently configured as 8-bitasymm

Strany 154

573706C–MICRO–2/11AT89LP3240/644011.5.1 Mode 0 – 8-bit PWM with 8-bit Logarithmic PrescalerIn Mode 0, TLx acts as a logarithmic prescaler driving 8-bi

Strany 155

583706C–MICRO–2/11AT89LP3240/6440Figure 11-7. Timer/Counter 1 PWM Mode 1Figure 11-8. Timer/Counter 1 PWM Mode 2Note: {RH0 & RL0}/{RH1 & RL1} a

Strany 156

593706C–MICRO–2/11AT89LP3240/644011.5.4 Mode 3 – Split 8-bit PWMTimer 1 in PWM Mode 3 simply holds its count. The effect is the same as setting TR1 =

Strany 157

63706C–MICRO–2/11AT89LP3240/64402. OverviewThe AT89LP3240/6440 is a low-power, high-performance CMOS 8-bit microcontroller with32K/64K b ytes of In-Sy

Strany 158

603706C–MICRO–2/11AT89LP3240/644012. Enhanced Timer 2The AT89LP3240/6440 includes a 16-bit Timer/Counter 2 with the following features:•16-bit timer/c

Strany 159

613706C–MICRO–2/11AT89LP3240/644012.1 Timer 2 RegistersControl and status bits for Timer 2 are contained in registers T2CON (see Table 12-3) andT2MOD

Strany 160

623706C–MICRO–2/11AT89LP3240/644012.2 Capture ModeIn the Capture mode, Timer 2 is a fixed 16-bit timer or counter that counts up from MIN to MAX.An ov

Strany 161

633706C–MICRO–2/11AT89LP3240/6440Figure 12-1. Timer 2 Diagram: Capture Mode 12.3 Auto-Reload ModeTimer 2 can be programmed to count up or down when co

Strany 162

643706C–MICRO–2/11AT89LP3240/6440RCAP2L and then overflows. The overflow sets TF2 and causes the timer registers to bereloaded with MIN. If EXEN2 = 1,

Strany 163

653706C–MICRO–2/11AT89LP3240/6440registers, TH2 and TL2, respectively. A logic 0 at T2EX makes Timer 2 count down. The timerunderflows when TH2 and TL

Strany 164

663706C–MICRO–2/11AT89LP3240/6440Figure 12-6. Timer 2 Waveform: Auto-Reload Mode (DCEN = 1)12.3.3 Dual Slope CounterWhen Timer 2 Auto-Reload Mode uses

Strany 165

673706C–MICRO–2/11AT89LP3240/6440Figure 12-7. Timer 2 Waveform: Dual Slope Modes12.4 Baud Rate GeneratorTimer 2 is selected as the baud rate generator

Strany 166

683706C–MICRO–2/11AT89LP3240/6440erator, T2EX can be used as an extra external interrupt. Also note that the Baud Rate andFrequency Generator modes ma

Strany 167

693706C–MICRO–2/11AT89LP3240/6440Figure 12-9. Timer 2 in Clock-out Mode13. Compare/Capture ArrayThe AT89LP3240/6440 includes a four channel Compa re/C

Strany 168

73706C–MICRO–2/11AT89LP3240/6440Timer 0 and Timer 1 in the AT89LP3240/6440 are enhanced with two new modes. Mode 0 canbe configured as a variable 9- t

Strany 169

703706C–MICRO–2/11AT89LP3240/6440Figure 13-1. Compare/Capture Array Block Diagram13.1 CCA RegistersThe Compare/Capture Array has five Special Function

Strany 170

713706C–MICRO–2/11AT89LP3240/6440Note: All writes/reads to/from T2CCH will access channel X as currently selected by T2CCA.The data registers for the

Strany 171

723706C–MICRO–2/11AT89LP3240/644013.2 Input Capture ModeThe Compare/Capture Array provides a variety of capture modes suitable for time-stampingevents

Strany 172

733706C–MICRO–2/11AT89LP3240/6440to occur at a negative edge, positive edge, or both (toggle). Capture inputs are sampled everyclock cycle and a new v

Strany 173

743706C–MICRO–2/11AT89LP3240/6440Notes: 1. All writes/reads to/from T2CCC will access channel X as currently selected by T2CCA.The control registers f

Strany 174

753706C–MICRO–2/11AT89LP3240/644013.3 Output Compare ModeThe Compare/Capture Array provides a variety of compare modes suitable for event timing orwav

Strany 175

763706C–MICRO–2/11AT89LP3240/644013.3.1.1 Normal ModeThe simplest waveform mode is when CP/RL2=0 and T2CM1-0 = 01B. In this mode the fre-quency of the

Strany 176

773706C–MICRO–2/11AT89LP3240/6440Figure 13-6. Dual-Slope Waveform Example13.3.2 Timer 2 Operation for Compare ModeCompare channels will work with any

Strany 177

783706C–MICRO–2/11AT89LP3240/644013.4.1 Asymmetrical PWMFor Asymmetrical PWM, Timer 2 should be configured for Auto-Reload mode and Count Mode 1(CP/RL

Strany 178

793706C–MICRO–2/11AT89LP3240/6440center-aligned around the timer equal to TOP point. Symmetrical PWM may be used to generatenon-overlapping waveforms.

Strany 179

83706C–MICRO–2/11AT89LP3240/64402.2 System ConfigurationThe AT89LP3240/6440 supports several system configuration options. Nonvolatile options areset

Strany 180

803706C–MICRO–2/11AT89LP3240/6440Figure 13-10. Phase and Frequency Correct Symmetrical (Center-Aligned) PWMFigure 13-11. Phase Correct Symmetrical (Ce

Strany 181

813706C–MICRO–2/11AT89LP3240/6440Figure 13-12. Multi-Phasic PWM Outpu t StageFigure 13-13. Three-Phase Mode with Channel B DisabledTable 13-6. Summary

Strany 182

823706C–MICRO–2/11AT89LP3240/6440Figure 13-14. Multi-Phasic PWM Modes14. External InterruptsThe INT0 (P3.2) and INT1 (P3.3) pins of the AT89LP3240/644

Strany 183

833706C–MICRO–2/11AT89LP3240/6440another interrupt will be generated. Both INT0 and INT1 may wake up the device from thePower-down state.15. General-p

Strany 184

843706C–MICRO–2/11AT89LP3240/6440...Table 15-1. GPMOD – General-purpose Interrupt Mode RegisterGPMOD = 9AH Reset Value = 0000 0000BNot Bit Addressable

Strany 185

853706C–MICRO–2/11AT89LP3240/644016. Serial Interface (UART)The serial interface on the AT89LP3240/6440 implements a Universal AsynchronousReceiver/Tr

Strany 186

863706C–MICRO–2/11AT89LP3240/6440bit and prepares to receive the data bytes that follows. The slaves that are not addressed settheir SM2 bits and ign

Strany 187

873706C–MICRO–2/11AT89LP3240/644016.2 Baud RatesThe baud rate in Mode 0 depends on the value of the SMOD1 bit in Specia l Function RegisterPCON.7. If

Strany 188

883706C–MICRO–2/11AT89LP3240/644016.2.2 Using Timer 2 to Generate Baud RatesTimer 2 is selected as the baud rate generator by setting TCLK and/or RCLK

Strany 189 - PIN 1 IDENTIFIER

893706C–MICRO–2/11AT89LP3240/644016.3 More About Mode 0In Mode 0, the UART is configured as a two wire half-duplex synchronous serial interface. Seria

Strany 190

93706C–MICRO–2/11AT89LP3240/64402.3 Comparison to Standard 8051The AT89LP3240/6440 is part of a family of devices with enhanced features that are full

Strany 191

903706C–MICRO–2/11AT89LP3240/6440Figure 16-1. Serial Port Mode 0INTERNAL BUSfoscINTERNAL BUSTXD (SHIFT CLOCK)RXD (DATA OUT)TXD (SHIFT CLOCK)RXD (DATA

Strany 192 - BOTTOM VIEW

913706C–MICRO–2/11AT89LP3240/6440Figure 16-2. Mode 0 WaveformsMode 0 may be used as a hardware accelerator for software emulation of serial interfaces

Strany 193

923706C–MICRO–2/11AT89LP3240/644016.4 More About Mode 1Ten bits are transmitted (through TXD), or received (through RXD): a start bit (0), 8 data bits

Strany 194

933706C–MICRO–2/11AT89LP3240/6440Figure 16-4. Serial Port Mode 1 TXCLOCKWRITE TO SBUFINTERNAL BUSREADSBUFLOADSBUFSBUFSHIFTINPUT SHIFT REG.(9 BITS)BITD

Strany 195

943706C–MICRO–2/11AT89LP3240/644016.5 More About Modes 2 and 3Eleven bits are transmitted (through TXD), or received (through RXD): a start bit (0), 8

Strany 196

953706C–MICRO–2/11AT89LP3240/6440Figure 16-5. Serial Port Mode 2SMOD1 1SMOD1 0INTERNAL BUSINTERNAL BUSCPU CLOCK

Strany 197

963706C–MICRO–2/11AT89LP3240/6440Figure 16-6. Serial Port Mode 3 TXCLOCKWRITE TO SBUFSENDDATASHIFTTXDSTOP BIT GENTID0 D1 D2 D3 D4 D5 D6 D7 TB8STOP BIT

Strany 198

973706C–MICRO–2/11AT89LP3240/644016.6 Framing Error DetectionIn addition to all of its usual modes, the UART can perform framing error detection by lo

Strany 199

983706C–MICRO–2/11AT89LP3240/6440In a more complex system, the following could be used to select slaves 1 and 2 while excludingslave 0: Slave 0 SADDR

Strany 200

993706C–MICRO–2/11AT89LP3240/6440Figure 17-1. SPI Block DiagramThe interconnection between master and slave CPUs with SPI is shown in Figure 17-2. The

Komentáře k této Příručce

Žádné komentáře