User manual

Table Of Contents
mikroC PRO for PIC32
MikroElektronika
393
Expander_Set_PullUpsPortB
Expander_Set_PullUpsPortAB
Prototype
void Expander_Set_PullUpsPortB(char ModuleAddress, char Data_);
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 conguration. Each bit corresponds to the appropriate
pin of the PortB register. Set bit enables pull-up for corresponding pin.
Returns Nothing.
Requires Port Expander must be initialized. See Expander_Init.
Example
// Set Port Expander’s PORTB pull-up resistors
Expander_Set_PullUpsPortB(0, 0xFF);
Notes None.
Prototype
void Expander_Set_PullUpsPortAB(char ModuleAddress, unsigned int PullUps);
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 conguration. PortA pull up/down resistors
conguration is passed in PullUps’s higher byte. PortB pull up/down resistors conguration 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.
Returns Nothing.
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);
Notes None.