User Tools

Site Tools


arduino_lib_dpi2ciopcf8574

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
arduino_lib_dpi2ciopcf8574 [2012/03/06 04:24]
admin created
arduino_lib_dpi2ciopcf8574 [2016/09/01 14:17] (current)
Line 1: Line 1:
 Documentation **[[arduino_code|Arduino base program code]]** Documentation **[[arduino_code|Arduino base program code]]**
-====== ​DpLEDError ​library ======+====== ​DpI2CIOPCF8574 ​library ======
 ===== Description ===== ===== Description =====
-DpLEDError ​Arduino library provide function for signalling errors  +DpI2CIOPCF8574 ​Arduino library provide function for using 
-to predefine digital line using duality of state.+I/O pins on PCF8574(A) I2C port extender. 
 + 
 +daince.net I/O Expansion board with PCF8574A.
  
 Source code is provided as is, without any warranty. Source code is provided as is, without any warranty.
Line 10: Line 12:
 ==== Functions ==== ==== Functions ====
 <​code>​ <​code>​
-// on initialization define number of error LEDs in use +// inicialization 
-// nopins ​number of pins max 8 +DpI2CIOPCF8574();​ 
-DpLEDError(byte nopins);+     
 +// set chip address, and read initial state on pins 
 +// Addr - chip addres 0x20 - 0x27 for PCF8574 or  0x38 - 0x3F for PCF8574A 
 +void begin(int Addr); 
 +  
 +// set virtual pin for output or input 
 +// use only for library prpouses 
 +// pin 0-7 
 +// mode - from predefined value 
 +//        PIN_MODE_INPUT ​ 0x01 
 +//        PIN_MODE_OUTPUT 0x00 
 +void pinMode(byte pin, byte mode); 
 +     
 +// read pin status from chip using internal buffer 
 +// on same time chack for associate action to pin 
 +void getInputStatus();​ 
 +     
 +// write pin status to chip using internal buffer 
 +void setOutputStatus();
  
-// Set digital pins by value depends on statepins +// get value of virtual input pin (0 low, 1 high) 
-// statepins ​byte value  +// pin 0-7 (check if pin is set for input) 
-void setAll(byte statepins);+byte getInputPin(byte pin);
     ​     ​
-// Set Error led for pin +// set value of virtual output pin (0 low, 1 high) 
-// pin - pin position in predefine ​pins array +// pin - 0-7 (check if pin is set for output) 
-void setError(byte pin);+// value - 0 low, 1 high (default) 
 +void setOutputPin(byte pin, byte value = 1); 
 + 
 +// toggle value of virtual output ​pin 
 +// pin - 0-7 (check if pin is set for output) 
 +void toggleOutputPin(byte pin); 
 +     
 +// toggle value of all virtual output ​pins 
 +void toggleOutput();​ 
 +     
 +// set high (0) value to all virtual output pins 
 +void setOutputHigh();​ 
 +     
 +// set low (1) value to all virtual output pins 
 +void setOutputLow();​ 
 +     
 +// set Action function to be executed when virtual pin change status 
 +// pin - 0-7 
 +// userFunc - function name without attributes 
 +// mode - type of change 
 +//        ACTION_LOW ​    ​0x01 
 +//        ACTION_HIGH ​   0x02 
 +//        ACTION_CHANGE ​ 0x03 
 +//        ACTION_RISING ​ 0x04 
 +//        ACTION_FALLING 0x05  
 +void setActionFunction(byte pin, void (*userFunc)(void),​byte mode); 
 +  
 +// clear Action function from virtual pin ACTION_CLEAR ​  ​0x00 
 +// pin - 0-7 
 +void clearActionFunction(byte pin);
  
-// Set OK led for pin +// clear Action function from all virtual ​pin ACTION_CLEAR ​  0x00 
-// pin - pin position in predefine pins array +void clearActionAll();  
-void setOK(byte pin);+
 </​code>​ </​code>​
  
Line 34: Line 82:
 ===== Version ===== ===== Version =====
 ==== Actual ==== ==== Actual ====
-  * **{{:​source_code:​arduino:​library:​dplederror:dplederror-1.0.0.tar.gz|dplederror-1.0.0.tar.gz}}** +  * **{{:​source_code:​arduino:​library:​dpi2ciopcf8574:dpi2ciopcf8574-1.0.0.tar.gz|dpi2ciopcf8574-1.0.0.tar.gz}}** 
-  * **{{:​source_code:​arduino:​library:​dplederror:dplederror-1.0.0.zip|dplederror-1.0.0.zip}}**+  * **{{:​source_code:​arduino:​library:​dpi2ciopcf8574:dpi2ciopcf8574-1.0.0.zip|dpi2ciopcf8574-1.0.0.zip}}**
 ==== History ==== ==== History ====
-=== V 1.0.0 , 10.01.2012 === +=== V 1.0.0 , 06.03.2012 === 
-  * **{{:​source_code:​arduino:​library:​dplederror:dplederror-1.0.0.tar.gz|dplederror-1.0.0.tar.gz}}** +  * **{{:​source_code:​arduino:​library:​dpi2ciopcf8574:dpi2ciopcf8574-1.0.0.tar.gz|dpi2ciopcf8574-1.0.0.tar.gz}}** 
-  * **{{:​source_code:​arduino:​library:​dplederror:dplederror-1.0.0.zip|dplederror-1.0.0.zip}}**+  * **{{:​source_code:​arduino:​library:​dpi2ciopcf8574:dpi2ciopcf8574-1.0.0.zip|dpi2ciopcf8574-1.0.0.zip}}**
arduino_lib_dpi2ciopcf8574.txt · Last modified: 2016/09/01 14:17 (external edit)