Datasheet

Expander_Read_Byte
Expander_Write_Byte
355
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
char Expander_Read_Byte(char ModuleAddress, char RegAddress);
Returns Byte read.
Description
The function reads byte from Port Expander.
Parameters :
-
ModuleAddress: Port Expander hardware address, see schematic at
the bottom of this page
- RegAddress: Port Expander's internal register address
Requires Port Expander must be initialized. See Expander_Init.
Example
// Read a byte from Port Expander's register
char read_data;
...
read_data = Expander_Read_Byte(0,1);
Prototype
void Expander_Write_Byte(char ModuleAddress,char RegAddress, char
Data);
Returns Nothing.
Description
Routine writes a byte to Port Expander.
Parameters :
- ModuleAddress: Port Expander hardware address, see schematic at
the bottom of this page
- RegAddress: Port Expander's internal register address
- Data: data to be written
Requires Port Expander must be initialized. See Expander_Init.
Example
// Write a byte to the Port Expander's register
Expander_Write_Byte(0,1,$FF);