P89C660 Philips Semiconductors, P89C660 Datasheet - Page 29

no-image

P89C660

Manufacturer Part Number
P89C660
Description
80C51 8-bit Flash microcontroller family
Manufacturer
Philips Semiconductors
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
P89C660HBA
Manufacturer:
PHI
Quantity:
5 030
Part Number:
P89C660HBA
Manufacturer:
PHILIPS/飞利浦
Quantity:
20 000
Part Number:
P89C660HBA/00,512
Manufacturer:
NXP Semiconductors
Quantity:
10 000
Part Number:
P89C660HBBD
Manufacturer:
PHILIPS
Quantity:
586
Part Number:
P89C660HFA
Manufacturer:
NXP
Quantity:
1 832
Part Number:
P89C660HFA/00,512
Manufacturer:
NXP Semiconductors
Quantity:
10 000
Philips Semiconductors
Table 8.
Slave Transmitter mode
In the Slave Transmitter mode, a number of data bytes are
transmitted to a master receiver (see Figure 11). Data transfer is
initialized as in the Slave Receiver mode. When S1ADR and
S1CON have been initialized, SIO1 waits until it is addressed by its
own slave address followed by the data direction bit which must be
“1” (R) for SIO1 to operate in the Slave Transmitter mode. After its
own slave address and the R bit have been received, the serial
interrupt flag (SI) is set and a valid status code can be read from
S1STA. This status code is used to vector to an interrupt service
routine, and the appropriate action to be taken for each of these
status codes is detailed in Table 7. The Slave Transmitter mode may
also be entered if arbitration is lost while SIO1 is in the Master mode
(see state B0H).
If the AA bit is reset during a transfer, SIO1 will transmit the last byte
of the transfer and enter state C0H or C8H. SIO1 is switched to the
“not addressed” Slave mode and will ignore the master receiver if it
continues the transfer. Thus the master receiver receives all 1s as
serial data. While AA is reset, SIO1 does not respond to its own
slave address or a general call address. However, the I
monitored, and address recognition may be resumed at any time by
setting AA. This means that the AA bit may be used to temporarily
isolate SIO1 from the I
Miscellaneous States
There are two S1STA codes that do not correspond to a defined
SIO1 hardware state (see Table 8). These are discussed below.
S1STA = F8H
This status code indicates that no relevant information is available
because the serial interrupt flag, SI, is not yet set. This occurs
between other states and when SIO1 is not involved in a serial
transfer.
S1STA = 00H
This status code indicates that a bus error has occurred during an
SIO1 serial transfer. A bus error is caused when a START or STOP
condition occurs at an illegal position in the format frame. Examples
of such illegal positions are during the serial transfer of an address
byte, a data byte, or an acknowledge bit. A bus error may also be
caused when external interference disturbs the internal SIO1
signals. When a bus error occurs, SI is set. To recover from a bus
error, the STO flag must be set and SI must be cleared. This causes
SIO1 to enter the “not addressed” Slave mode (a defined state) and
to clear the STO flag (no other bits in S1CON are affected). The
2002 Oct 28
STATUS
STATUS
(S1STA)
(S1STA)
F8H
00H
CODE
80C51 8-bit Flash microcontroller family
16KB/32KB/64KB ISP/IAP Flash with 512B/1KB/2KB/8KB RAM
No relevant state
information available;
SI = 0
Bus error during MST
or selected Slave
modes, due to an
illegal START or
STOP condition. State
00H can also occur
when interference
causes SIO1 to enter
an undefined state.
SIO1 HARDWARE
SIO1 HARDWARE
STATUS OF THE
STATUS OF THE
Miscellaneous States
I
2
C BUS AND
2
C bus.
No S1DAT action
No S1DAT action
TO/FROM S1DAT
TO/FROM S1DAT
APPLICATION SOFTWARE RESPONSE
2
C bus is still
STA
0
No S1CON action
TO S1CON
STO
1
29
If the SIO1 hardware detects a repeated START condition on the I
SDA and SCL lines are released (a STOP condition is not
transmitted).
Some Special Cases
The SIO1 hardware has facilities to handle the following special
cases that may occur during a serial transfer.
Simultaneous Repeated START Conditions from Two Masters
A repeated START condition may be generated in the Master
Transmitter or Master Receiver modes. A special case occurs if
another master simultaneously generates a repeated START
condition (see Figure 12). Until this occurs, arbitration is not lost by
either master since they were both transmitting the same data.
bus before generating a repeated START condition itself, it will
release the bus, and no interrupt request is generated. If another
master frees the bus by generating a STOP condition, SIO1 will
transmit a normal START condition (state 08H), and a retry of the
total serial data transfer can commence.
Data Transfer After Loss of Arbitration
Arbitration may be lost in the Master Transmitter and Master
Receiver modes (see Figure 4). Loss of arbitration is indicated by
the following states in S1STA: 38H, 68H, 78H, and B0H (see
Figures 8 and 9).
If the STA flag in S1CON is set by the routines which service these
states, then, if the bus is free again, a START condition (state 08H)
is transmitted without intervention by the CPU, and a retry of the
total serial transfer can commence.
Forced Access to the I
In some applications, it may be possible for an uncontrolled source
to cause a bus hang-up. In such situations, the problem may be
caused by interference, temporary interruption of the bus or a
temporary short-circuit between SDA and SCL.
If an uncontrolled source generates a superfluous START or masks
a STOP condition, then the I
STA flag is set and bus access is not obtained within a reasonable
amount of time, then a forced access to the I
is achieved by setting the STO flag while the STA flag is still set. No
STOP condition is transmitted. The SIO1 hardware behaves as if a
STOP condition was received and is able to transmit a START
condition. The ST0 flag is cleared by hardware (see Figure 13).
SI
0
AA
X
P89C660/P89C662/P89C664/
Wait or proceed current transfer
Only the internal hardware is affected in the MST or
addressed SLV modes. In all cases, the bus is
released and SIO1 is switched to the not addressed
SLV mode. STO is reset.
NEXT ACTION TAKEN BY SIO1 HARDWARE
2
C Bus
2
C bus stays busy indefinitely. If the
2
C bus is possible. This
P89C668
Product data
2
C

Related parts for P89C660