AT90CAN128-16AE ATMEL Corporation, AT90CAN128-16AE Datasheet - Page 220

no-image

AT90CAN128-16AE

Manufacturer Part Number
AT90CAN128-16AE
Description
8-bit Avr Microcontroller With 128K Bytes of Isp Flash And CAN Controller.flash (Kbytes) 128 Vcc (V) 2.7-5.5 EEPROM (Kbytes) 4 SRAM (bytes) 4K CAN (mess. Obj.) 15
Manufacturer
ATMEL Corporation
Datasheet
Table 91. Status Codes for Master Receiver Mode
Slave Receiver Mode
220
Status Code
(TWSR)
Prescaler Bits
are 0
0x08
0x10
0x38
0x40
0x48
0x50
0x58
AT90CAN128
Status of the Two-wire Serial
Bus and Two-wire Serial Inter-
face Hardware
A START condition has been
transmitted
A repeated START condition
has been transmitted
Arbitration lost in SLA+R or NOT
ACK bit
SLA+R has been transmitted;
ACK has been received
SLA+R has been transmitted;
NOT ACK has been received
Data byte has been received;
ACK has been returned
Data byte has been received;
NOT ACK has been returned
In the Slave Receiver mode, a number of data bytes are received from a master trans-
mitter (see Figure 101). All the status codes mentioned in this section assume that the
prescaler bits are zero or are masked to zero.
Figure 101. Data Transfer in Slave Receiver Mode
To initiate the Slave Receiver mode, TWAR and TWCR must be initialized as follows:
TWAR
value
SDA
SCL
Application Software Response
To/from TWDR
Load SLA+R
Load SLA+R or
Load SLA+W
No TWDR action or
No TWDR action
No TWDR action or
No TWDR action
No TWDR action or
No TWDR action or
No TWDR action
Read data byte or
Read data byte
Read data byte or
Read data byte or
Read data byte
Device 1
RECEIVER
SLAVE
TWA6
To TWCR
STA
X
X
0
1
0
0
1
0
1
0
0
1
0
1
X
TWA5
TRANSMITTER
0
Device 2
STO
MASTER
0
0
0
0
0
0
0
0
1
1
0
0
1
1
1
TWINT
TWA4
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Device’s Own Slave Address
0
TWEA
Device 3
X
X
X
X
X
X
X
X
X
X
X
0
1
1
TWA3
Next Action Taken by TWI Hardware
SLA+R will be transmitted
ACK or NOT ACK will be received
SLA+R will be transmitted
ACK or NOT ACK will be received
SLA+W will be transmitted
Logic will switch to master transmitter mode
Two-wire Serial Bus will be released and not addressed
slave mode will be entered
A START condition will be transmitted when the bus
becomes free
Data byte will be received and NOT ACK will be
returned
Data byte will be received and ACK will be returned
Repeated START will be transmitted
STOP condition will be transmitted and TWSTO flag will
be reset
STOP condition followed by a START condition will be
transmitted and TWSTO flag will be reset
Data byte will be received and NOT ACK will be
returned
Data byte will be received and ACK will be returned
Repeated START will be transmitted
STOP condition will be transmitted and TWSTO flag will
be reset
STOP condition followed by a START condition will be
transmitted and TWSTO flag will be reset
........
TWA2
Device n
TWA1
TWA0
R1
4250C–CAN–03/04
V
CC
TWGCE
R2

Related parts for AT90CAN128-16AE