Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
Expander_Set_PullUpsPortA
Expander_Set_PullUpsPortB
310
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
procedure Expander_Set_PullUpsPortA(ModuleAddress: byte; Data_:
byte);
Returns
Nothing.
Description
The function sets Port Expander's PortA pull up/down resistors.
Parameters : 
ModuleAddress
: Port Expander hardware address, see schematic at the bot
tom of this page 
Data_
: data for choosing pull up/down resistors configuration. Each bit corre
sponds to the appropriate pin of the PortA register. Set bit enables pull-up for 
corresponding pin. 
Requires
Port Expander must be initialized. See Expander_Init.
Example
// Set Port Expander's PORTA pull-up resistors
Expander_Set_PullUpsPortA(0, 0xFF);
Prototype
procedure Expander_Set_PullUpsPortB(ModuleAddress: byte; Data_:
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 bot
tom of this page 
Data_
: data for choosing pull up/down resistors configuration. Each bit corre 
sponds 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);