Datasheet
Expander_Set_PullUpsPortB
Expander_Set_PullUpsPortAB
299
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub procedure Expander_Set_PullUpsPortB(dim ModuleAddress as
byte, dim Data_ as byte)
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
sub procedure Expander_Set_PullUpsPortAB(dim ModuleAddress as
byte, dim PullUps as word)
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 bot-
tom 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)