Datasheet

Expander_Set_PullUpsPortB
Expander_Set_PullUpsPortAB
363
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void Expander_Set_PullUpsPortB(char ModuleAddress, char Data);
Returns Nothing.
Description
The function sets Port Expander's PortB pull up/down resistors.
Parameters :
-
ModuleAddress: Port Expander hardware address, see schematic at
the bottom of this page
- Data: data for choosing pull up/down resistors configuration. Each bit
corresponds to the appropriate pin of the PortB register. Set bit
enables pull-up for corresponding pin.
Requires Port Expander must be initialized. See Expander_Init.
Example
// Set Port Expander's PORTB pull-up resistors
Expander_Set_PullUpsPortB(0, 0xFF);
Prototype
void Expander_Set_PullUpsPortAB(char ModuleAddress, unsigned int
PullUps);
Returns Nothing.
Description
The function sets Port Expander's PortA and PortB pull up/down resistors.
Parameters :
- ModuleAddress: Port Expander hardware address, see schematic at
the bottom of this page
-
PullUps: data for choosing pull up/down resistors configuration. PortA
pull up/down resistors configuration is passed in
PullUps's higher
byte. PortB pull up/down resistors configuration is passed in PullUps's
lower byte. Each bit corresponds to the appropriate pin of the
PortA/PortB register. Set bit enables pull-up for corresponding pin.
Requires Port Expander must be initialized. See Expander_Init.
Example
// Set Port Expander's PORTA and PORTB pull-up resistors
Expander_Set_PullUpsPortAB(0, 0xFFFF);