AT89LP3240 Atmel Corporation, AT89LP3240 Datasheet - Page 114
AT89LP3240
Manufacturer Part Number
AT89LP3240
Description
Manufacturer
Atmel Corporation
Datasheet
1.AT89LP3240.pdf
(200 pages)
Specifications of AT89LP3240
Flash (kbytes)
32 Kbytes
Max. Operating Frequency
20 MHz
Cpu
8051-1C
Max I/o Pins
38
Spi
1
Twi (i2c)
1
Uart
1
Adc Channels
8
Adc Resolution (bits)
10
Adc Speed (ksps)
153.8
Sram (kbytes)
4.25
Eeprom (bytes)
8192
Self Program Memory
IAP
Operating Voltage (vcc)
2.4 to 3.6
Timers
3
Isp
SPI/OCD
Watchdog
Yes
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
- Current page: 114 of 200
- Download datasheet (7Mb)
Figure 18-10. Interfacing the Application to the TWI in a Typical Transmission
114
TWI bus
1. Application writes
to TWCR to initiate
transmission of
AT89LP3240/6440
START
START condition sent
Status code indicates
2. TWIF set.
START
3. Check TWSR to see if START was
TWDR, and loads appropriate control
signals into TWCR, making sure that
sent. Application loads SLA+W into
1. The first step in a TWI transmission is to transmit a START condition. This is done by
2. When the START condition has been transmitted, the TWIF flag in TWCR is set, and
3. The application software should now examine the value of TWSR, to make sure that the
4. When the address packet has been transmitted, the TWIF flag in TWCR is set, and
5. The application software should now examine the value of TWSR, to make sure that the
TWIF is written to zero and
STA is written to zero.
writing a specific value into TWCR, instructing the TWI hardware to transmit a START
condition. Which value to write is described later on. However, it is important that the
TWIF bit is cleared in the value written. The TWI will not start any operation as long as
the TWIF bit in TWCR is set. Immediately after the application has cleared TWIF, the
TWI will initiate transmission of the START condition.
TWSR is updated with a status code indicating that the START condition has success-
fully been sent.
START condition was successfully transmitted. If TWSR indicates otherwise, the appli-
cation software might take some special action, like calling an error routine. Assuming
that the status code is as expected, the application must load SLA+W into TWDR.
Remember that TWDR is used both for address and data. After TWDR has been
loaded with the desired SLA+W, a specific value must be written to TWCR, instructing
the TWI hardware to transmit the SLA+W present in TWDR. Which value to write is
described later on. However, it is important that the TWIF bit is cleared in the value writ-
ten. The TWI will not start any operation as long as the TWIF bit in TWCR is set.
Immediately after the application has cleared TWIF, the TWI will initiate transmission of
the address packet.
TWSR is updated with a status code indicating that the address packet has success-
fully been sent. The status code will also reflect whether a slave acknowledged the
packet or not.
address packet was successfully transmitted, and that the value of the ACK bit was as
expected. If TWSR indicates otherwise, the application software might take some spe-
cial action, like calling an error routine. Assuming that the status code is as expected,
the application must load a data packet into TWDR. Subsequently, a specific value
must be written to TWCR, instructing the TWI hardware to transmit the data packet
present in TWDR. Which value to write is described later on. However, it is important
that the TWIF bit is cleared in the value written. The TWI will not start any operation as
SLA+W
Status code indicates
SLA+W sent, ACK
4. TWIF set.
received
A
5. Check TWSR to see if SLA+W was
and loads appropriate control signals
Application loads data into TWDR,
into TWCR, making sure that
sent and ACK received.
TWIF is written to zero.
Data
data sent, ACK received
Status code indicates
6. TWIF set.
A
7. Check TWSR to see if data was sent
and ACK received. Application loads
STOP into TWCR, making sure that
appropriate control signals to send
TWIF is written to zero.
STOP
3706C–MICRO–2/11
TWIF set
Indicates
Related parts for AT89LP3240
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
8-Bit Microcontroller with 4K Bytes Flash
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
INTERVAL AND WIPE/WASH WIPER CONTROL IC WITH DELAY
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Low-Voltage Voice-Switched IC for Hands-Free Operation
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
MONOLITHIC INTEGRATED FEATUREPHONE CIRCUIT
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
AM-FM Receiver IC U4255BM-M
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Monolithic Integrated Feature Phone Circuit
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Multistandard Video-IF and Quasi Parallel Sound Processing
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
High-performance EE PLD
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
8-bit Flash Microcontroller
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
2-Wire Serial EEPROM
Manufacturer:
ATMEL Corporation
Datasheet: