How should i wire (and how do i control) a pcf8574ap to a Arduino Mega?
still waiting on an awnser...
Still waiting for you to post a link to the device you want to connect to the Mega, and an explanation of what you want it to do when it is connected.
ohh... i'm really sorry... had no idea that i had forgoten that part.
(datasheet) or [u]http://www.futurlec.com/Philips/PCF8574AP.shtml[/u]
I'm trying to add more outputs to my "Arduino MEGA (1280)."
Setup is hopfully going to be kinda like this:
For every 2 Original ports on the Arduino that are used to control the PCF8574AP i hope to add 6 Extra ports...
( "6Ext." + "2Ori." = 8Total )
That chip is an I2C device. The SDA and SCL pins connect to the I2C pins on the Mega (20=SDA, 21=SCL). The Vdd pin connects to the Vcc pin on the Mega, and the grounds need to be connected, too.
The Pn pins are connected to your external I/O devices.
Not sure what you do with the An pins.
The Wire library then talks to the chip.
PaulS:
The Wire library then talks to the chip.
how do i use the wire library?
could u possibly post a example or a link to an example?
There are examples in the playground. Try using the search there for 'pcf8574a' or 'pcf8574'.
(hint: playground is made precisely for example codes. cool huh?)