Preliminary - Information Subject to Change - 9/24/98
EZ-USB Development Board
5 - 21
Philips
PCF8574 IO
Expander
The EZ-USB Development Board uses two Philips PCF8574 IO
Expander chips (U11 and U12) to provide debugging IO without
interfering with the EZ-USB IO ports A, B and C. The PCF8574 is
described in the Philips I
2
C Peripherals Handbook (Philips
Publication “IC12”). This section summarizes the basic device
characteristics for programmers who wish to write 8051 code that
utilizes the onboard devices connected to U11 and U12.
The PCF8574 is a slave-only device.
•
The Slave Address is 0100.
•
The eight IO pins are “quasi-bidirectional”. Setting a pin HI
makes it an input with a weak pull-up that can be driven low
by an external signal. Setting a pin LO drives LOW and thus
makes it an output. IO pins are HI (inputs) at power-on.
•
The Development Board switches and push-buttons connect
to U2, which is strapped to address 0010000d (“d” is the I
2
C
direction bit). To read the eight bits, send an I
2
C command
byte of 01000001 to address the 8574 and set the ‘read’
direction, then read the I
2
C data byte.
•
The 7-segment display is at address 01000000 (the last bit is
0 since the display pins are outputs). To set the segments,
send an I
2
C command byte of 01000000 to address the 8574
and set the ‘write’ direction, then write the I
2
C data byte. A
“0” turns on a segment. The segments are mapped as
follows:
Figure 5-4: Seven-Segment Bit Assignments
b it 0
b it 6
b it 3
bi
t 1
bi
t 2
bi
t 4
bi
t 5
b it 7