PCF8574 interfacing
Posted: 08 Jun 2011, 09:56
I want to add some tactile switches using a PCF8574 to provide input to the NXT.
In the Extreme NXT book, the switches are shown as simply shorting the pins to ground, whereas Sivan Toledo shows a circuit in which the pins are connected to the supply line through resistors which are then shorted out - http://www.tau.ac.il/~stoledo/lego/i2c-8574/
As a complete newbie I am stumped as to the advantages/ disadvantages of each circuit. Does connecting the pins to the power supply mean that you do not have to use a write command to set each pin before reading it, which simplifies the program?
Advice appreciated.
In the Extreme NXT book, the switches are shown as simply shorting the pins to ground, whereas Sivan Toledo shows a circuit in which the pins are connected to the supply line through resistors which are then shorted out - http://www.tau.ac.il/~stoledo/lego/i2c-8574/
As a complete newbie I am stumped as to the advantages/ disadvantages of each circuit. Does connecting the pins to the power supply mean that you do not have to use a write command to set each pin before reading it, which simplifies the program?
Advice appreciated.