Datasheet
#$
#$
#$$
SBAS317E − APRIL 2004 − REVISED MAY 2006
www.ti.com
51
Port 1 (P1)
7 6 5 4 3 2 1 0 Reset Value
SFR 90h
P1.7
INT5
P1.6
INT4
P1.5
INT3
P1.4
INT2/SS
P1.3
DIN
P1.2
DOUT
P1.1 P1.0
PROG
FFh
P1.7−0 General-Purpose I/O Port 1. This register functions as a general-purpose I/O port. In addition, all the pins have an
bits 7−0 alternative function listed below. Each of the functions is controlled by several other SFRs. The associated Port 1
latch bit must contain a logic ‘1’ before the pin can be used in its alternate function capacity. To use the alternate
function, set the appropriate mode in P1DDRL (SFR AEh), P1DDRH (SFR AFh).
INT5
External Interrupt 5. A falling edge on this pin will cause an external interrupt 5 if enabled.
bit 7
INT4 External Interrupt 4. A rising edge on this pin will cause an external interrupt 4 if enabled.
bit 6
INT3 External Interrupt 3. A falling edge on this pin will cause an external interrupt 3 if enabled.
bit 5
INT2/SS External Interrupt 2. A rising edge on this pin will cause an external interrupt 2 if enabled. This pin can be used as
bit 4 slave select (SS
) in SPI slave mode.
DIN Serial Data In. This pin receives serial data in SPI and I
2
C modes (in I
2
C mode, this pin should be configured as an
bit 3 input) or standard 8051.
DOUT Serial Data Out. This pin transmits serial data in SPI and I
2
C modes (in I
2
C mode, this pin should be configured as
bit 2 an open drain) or standard 8051.
PROG Program Mode. When this pin is pulled low at power-up, the device enters Serial Programming mode (refer to
bit 0 Figure 2).
External Interrupt Flag (EXIF)
7 6 5 4 3 2 1 0 Reset Value
SFR 91h IE5 IE4 IE3 IE2 1 0 0 0 08h
IE5 External Interrupt 5 Flag. This bit will be set when a falling edge is detected on INT5. This bit must be cleared
bit 7 manually by software. Setting this bit in software will cause an interrupt if enabled.
IE4 External Interrupt 4 Flag. This bit will be set when a rising edge is detected on INT4. This bit must be cleared
bit 6 manually by software. Setting this bit in software will cause an interrupt if enabled.
IE3 External Interrupt 3 Flag. This bit will be set when a falling edge is detected on INT3. This bit must be cleared
bit 5 manually by software. Setting this bit in software will cause an interrupt if enabled.
IE2 External Interrupt 2 Flag. This bit will be set when a rising edge is detected on INT2. This bit must be cleared
bit 4 manually by software. Setting this bit in software will cause an interrupt if enabled.