AT89LP51ED2-20JU Atmel, AT89LP51ED2-20JU Datasheet - Page 119

no-image

AT89LP51ED2-20JU

Manufacturer Part Number
AT89LP51ED2-20JU
Description
8-bit Microcontrollers - MCU 64KB 20MHz 2.4V-5.5V
Manufacturer
Atmel
Datasheet

Specifications of AT89LP51ED2-20JU

Rohs
yes
Core
8051
Processor Series
AT89x
Data Bus Width
8 bit
Maximum Clock Frequency
20 MHz
Program Memory Size
64 KB
Data Ram Size
256 B
On-chip Adc
Yes
Operating Supply Voltage
2.4 V to 5.5 V
Operating Temperature Range
- 40 C to + 85 C
Package / Case
PLCC-44
Mounting Style
SMD/SMT
Data Rom Size
4 KB
Interface Type
2-Wire, SPI, UART
Number Of Programmable I/os
36
Number Of Timers
3
Program Memory Type
Flash
Factory Pack Quantity
27

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT89LP51ED2-20JU
Manufacturer:
Atmel
Quantity:
10 000
17.5.1
3714A–MICRO–7/11
Two-Wire (Half-Duplex) Mode
Transmission is initiated by any instruction that uses SBUF as a destination register. The “write
to SBUF” signal also loads a “1” into the 9th position of the transmit shift register and tells the TX
Control Block to begin a transmission. The internal timing is such that one full bit slot may elapse
between “write to SBUF” and activation of SEND.
SEND transfers the output of the shift register to the alternate output function line of P3.0, and
also transfers Shift Clock to the alternate output function line of P3.1. As data bits shift out to the
right, “0”s come in from the left. When the MSB of the data byte is at the output position of the
shift register, the “1” that was initially loaded into the 9th position is just to the left of the MSB,
and all positions to the left of that contain “0”s. This condition flags the TX Control block to do
one last shift, then deactivate SEND and set TI.
Reception is initiated by the condition REN = 1 and RI = 0. At the next clock cycle, the RX Con-
trol unit writes the bits 11111110B to the receive shift register and activates RECEIVE in the
next clock phase. RECEIVE enables Shift Clock to the alternate output function line of P3.1. As
data bits come in from the right, “1”s shift out to the left. When the “0” that was initially loaded
into the right-most position arrives at the left-most position in the shift register, it flags the RX
Control block to do one last shift and load SBUF. Then RECEIVE is cleared and RI is set.
The relationship between the shift clock and data is determined by the combination of the SM2
and SMOD1 bits as listed in
state of the clock when not currently transmitting/receiving. The SMOD1 bit determines if the
output data is stable for both edges of the clock, or just one.
Table 17-11. Mode 0 Clock and Data Modes
In Two-Wire configuration Mode 0 may be used as a hardware accelerator for software emula-
tion of serial interfaces such as a half-duplex Serial Peripheral Interface (SPI) master in mode
(0,0) or (1,1) or a Two-Wire Interface (TWI) in master mode. An example of Mode 0 emulating a
TWI master device is shown in
are handled in software while the byte transmission is done in hardware. Falling/rising edges on
TXD are created by setting/clearing SM2. Rising/falling edges on RXD are forced by set-
ting/clearing the P3.0 register bit. SM2 and P3.0 must be 1 while the byte is being transferred.
Mode 0 transfers data LSB first whereas SPI or TWI are generally MSB first. Emulation of these
interfaces may require bit reversal of the transferred data bytes. The following code example
reverses the bits in the accumulator:
SM2
EX:
REVRS: RLC
0
0
1
1
SMOD1
MOV
XCH
RRC
XCH
DJNZ R7, REVRS
0
1
0
1
R7, #8
A
A, R6
A
A, R6
Clock Idle
High
High
Low
Low
AT89LP51RD2/ED2/ID2 Preliminary
Table 17-11
Figure
; C << msb (ACC)
; msb (ACC) >> B
17-3. In this example, the start, stop, and acknowledge
and shown in
Negative edge of clock
Negative edge of clock
While clock is high
While clock is low
Data Changes
Figure
. The SM2 bit determines the idle
Negative edge of clock
Positive edge of clock
Positive edge of clock
Positive edge of clock
Data Sampled
119

Related parts for AT89LP51ED2-20JU