12/10/2012
Two Wire Arduino Knight Rider PCF8574
This tutorial shows how to interface eight LEDs to an Arduino using only two Arduino pins. This is made possible by using a PCF8574 I/O expander IC. A “Knight Rider” display is shown on the LEDs.
The suggested sequence of building the circuit is:
Insert the PCF8574 IC
Make power and ground connections to the IC
Connect pin 1, 2 and 3 of the IC (U1) to ground
Insert capacitor C1 (100n) and wire it between power (5V) and ground (GND)
Insert the eight LEDs with anodes (longer pin) on the left
Connect resistors R1 to R8 between the LED anodes and the top breadboard rail (5V)
Wire the cathode of each LED to the correct pins on the IC
Connect R9 and R10
Connect the two wires from Arduino pins A4 and A5 to the IC
Connect the Arduino 5V to the top breadboard rail and GND to the bottom breadboard rail
You may have noticed that the breadboard circuit swaps the position of the LEDs and resistors from the circuit diagram – e.g. R1 and D1 swap positions. This will make no difference to how the circuit operates. It has only been done to simplify the breadboard circuit.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment