User Manual

68
Lesson 13 PCF8591
Introduction
The PCF8591 is a single-chip, single-supply low-power 8-bit CMOS data acquisition device
with four analog inputs, one analog output and a serial I2C-bus interface. Three address pins
A0, A1 and A2 are used for programming the hardware address, allowing the use of up to
eight devices connected to the I2C-bus without additional hardware. Address, control and
data to and from the device are transferred serially via the two-line bidirectional I2C-bus.
The functions of the device include analog input multiplexing, on-chip track and hold
function, 8-bit analog-to-digital conversion and an 8-bit digital-to-analog conversion. The
maximum conversion rate is given by the maximum speed of the I2C-bus.
Components
- 1 * Raspberry Pi
- 1 * Breadboard
- 4 * Jumper wires (Male to Male)
- 1 * Network cable (or USB wireless network adapter)
- 1 * PCF8591 module
- 1 * Dual-Color LED module
- 1 * 3-Pin anti-reverse cable
- Several Jumper wires (Male to Female)
Experimental Principle
Addressing:
Each PCF8591 device in an I2C-bus system is activated by sending a valid address to the
device. The address consists of a fixed part and a programmable part. The programmable
part must be set according to the address pins A0, A1 and A2. The address always has to be
sent as the first byte after the start condition in the I2C-bus protocol. The last bit of the address
byte is the read/write-bit which sets the direction of the following data transfer (see as below).