Datasheet

Expander_Write_PortA
358
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void Expander_Write_PortA(char ModuleAddress, char Data);
Returns Nothing.
Description
The function writes byte to Port Expander's PortA.
Parameters :
-
ModuleAddress: Port Expander hardware address, see schematic at
the bottom of this page
- Data: data to be written
Requires
Port Expander must be initialized. See Expander_Init.
Port Expander's PortA should be configured as output. See
Expander_Set_DirectionPortA and Expander_Set_DirectionPortAB routines.
Example
// Write a byte to Port Expander's PORTA
...
Expander_Set_DirectionPortA(0,0x00); // set expander's
porta to be output
...
Expander_Write_PortA(0, 0xAA);