Mikroelektronika MIKROE-442 데이터 시트
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
425
Expander_Set_PullUpsPortB
Expander_Set_PullUpsPortAB
Prototype
sub procedure Expander_Set_PullUpsPortB(dim ModuleAddress, Data as byte)
Description The function sets Port Expander’s PortB pull up/down resistors.
Parameters -
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.
Prototype
sub procedure Expander_Set_PullUpsPortAB(dim ModuleAddress as byte, dim
PullUps as word)
Description The function sets Port Expander’s PortA and PortB pull up/down resistors.
Parameters -
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.