User`s guide

CY7C65113C
Document #: 38-08002 Rev. *G Page 20 of 48
start bits, as these cases always cause transmit mode for
the first byte.
Bit 4: ACK
This bit is set or cleared by firmware during receive oper-
ation to indicate if the hardware should generate an ACK
signal on the I
2
C-compatible bus. Writing a 1 to this bit
generates an ACK (SDA LOW) on the I2C-compatible bus
at the ACK bit time. During transmits (Xmit Mode = 1), this
bit should be cleared.
Bit 3: Addr
This bit is set by the I
2
C-compatible block during the first
byte of a slave receive transaction, after an I
2
C start or
restart. The Addr bit is cleared when the firmware sets the
Continue bit. This bit allows the firmware to recognize
when the master has lost arbitration, and in slave mode it
allows the firmware to recognize that a start or restart has
occurred.
Bit 2: ARB Lost/Restart
This bit is valid as a status bit (ARB Lost) after master
mode transactions. In master mode, set this bit (along with
the Continue and MSTR Mode bits) to perform an I
2
C re-
start sequence. The I
2
C target address for the restart must
be written to the data register before setting the Continue
bit. To prevent false ARB Lost signals, the Restart bit is
cleared by hardware during the restart sequence.
Bit 1: Receive Stop
This bit is set when the slave is in receive mode and de-
tects a stop bit on the bus. The Receive Stop bit is not set
if the firmware terminates the I
2
C transaction by not ac-
knowledging the previous byte transmitted on the
I
2
C-compatible bus, e.g., in receive mode if firmware sets
the Continue bit and clears the ACK bit.
Bit 0: I
2
C Enable
Set this bit to override GPIO definition with I
2
C-compatible
function on the two I
2
C-compatible pins. When this bit is
cleared, these pins are free to function as GPIOs. In
I
2
C-compatible mode, the two pins operate in open drain
mode, independent of the GPIO configuration setting.
Processor Status and Control Register
Figure 17. Processor Status and Control Register
Bit 0: Run
This bit is manipulated by the HALT instruction. When Halt
is executed, all the bits of the Processor Status and Control
Register are cleared to 0. Since the run bit is cleared, the
processor stops at the end of the current instruction. The
processor remains halted until an appropriate reset occurs
(power-on or Watchdog). This bit should normally be writ-
ten as a ‘1.’
Bit 1: Reserved
Bit 1 is reserved and must be written as a zero.
Bit 2: Interrupt Enable Sense
This bit indicates whether interrupts are enabled or dis-
abled. Firmware has no direct control over this bit as writ-
ing a zero or one to this bit position has no effect on inter-
rupts. A ‘0’ indicates that interrupts are masked off and a
‘1’ indicates that the interrupts are enabled. This bit is fur-
ther gated with the bit settings of the Global Interrupt En-
able Register (Figure 18) and USB End Point Interrupt En-
able Register (Figure 19). Instructions DI, EI, and RETI
manipulate the state of this bit.
Bit 3: Suspend
Writing a ‘1’ to the Suspend bit halts the processor and
cause the microcontroller to enter the suspend mode that
significantly reduces power consumption. A pending, en-
abled interrupt or USB bus activity causes the device to
come out of suspend. After coming out of suspend, the
device resumes firmware execution at the instruction fol-
lowing the IOWR which put the part into suspend. An
IOWR attempting to put the part into suspend is ignored if
USB bus activity is present. See Section for more details
on suspend mode operation.
Bit 4: Power-on Reset
The Power-on Reset is set to ‘1’ during a power-on reset.
The firmware can check bits 4 and 6 in the reset handler
to determine whether a reset was caused by a power-on
condition or a Watchdog timeout. A POR event may be
followed by a Watchdog reset before firmware begins ex-
ecuting, as explained below.
Bit 5: USB Bus Reset Interrupt
The USB Bus Reset Interrupt bit is set when the USB Bus
Reset is detected on receiving a USB Bus Reset signal on
the upstream port. The USB Bus Reset signal is a sin-
gle-ended zero (SE0) that lasts from 12 to 16 μs. An SE0
Processor Status and Control Address 0xFF
Bit # 76543210
Bit Name IRQ
Pending
Watchdog
Reset
USB Bus
Reset
Interrupt
Power-on
Reset
Suspend Interrupt
Enable
Sense
Reserved Run
Read/Write R R/W R/W R/W R/W R R/W R/W
Reset 00010001