Commits

F Malpartida committed 1c0b5f6

Edited online

Comments (0)

Files changed (1)

+== I2CIO Arduino Library ==
+
+The PCF8574 is an IO expander for two-line I2C bus. The PCF8574A provides general-purpose remote I/O expansion for most microcontroller families via the I2C interface [serial clock (SCL), serial data (SDA)].
+
+Two main versions are available: the PCF8574 and the PCF8574A.
+
+The only difference between the two is the I2C base address. The base address for the PCF8574 is //0x20// and the base address for the PCF8574A is //0x38//. The library doesn't make any assumption as to the device being used, and it is up to the user to configure it during initialization of the application.
+
+=== Example Code ===
+The examples included with the library assumes the use of an PCF8574A set for address 0x38. It also assumes that the PCF8584A is mounted on an LCDI2CextraIO board with base address configured to 0x0 (i.e. configuration address jumpers set to (0, 0, 0)).
+
+{{{
+#!c++
+
+I2CIO myPort;
+
+void setup()
+{
+  
+  myPort.begin ( 0x38 );
+  
+  myPort.portMode ( OUTPUT ); // Define all pins as output on the port
+  myPort.write ( 0x0 );       // Set all pins of the board to low
+
+}
+}}}
+
+
+