Download mikroPascal PRO - MikroElektronika

Transcript
mikroPascal PRO for dsPIC30/33 and PIC24
Expander_Set_PullUpsPortB
Prototype
procedure Expander_Set_PullUpsPortB(ModuleAddress, Data : byte);
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.
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.
Expander_Set_PullUpsPortAB
Prototype
procedure
word);
Expander_Set_PullUpsPortAB(ModuleAddress
:
byte;
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 configuration. PortA pull up/down resistors
configuration is passed in PullUps’ higher byte. PortB pull up/down resistors configuration is passed
in PullUps’ 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, $FFFF);
Notes
None.
424
MikroElektronika