Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
Expander_Write_PortB
307
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
procedure Expander_Write_PortB(ModuleAddress: byte; Data_: byte);
Returns
Nothing.
Description
The function writes byte to Port Expander's PortB.
Parameters : 
ModuleAddress
: Port Expander hardware address, see schematic at the bot
tom of this page 
Data_
: data to be written 
Requires
Port Expander must be initialized. See Expander_Init.
Port Expander's PortB should be configured as output. See
Expander_Set_DirectionPortB and Expander_Set_DirectionPortAB routines.
Example
// Write a byte to Port Expander's PORTB
...
Expander_Set_DirectionPortB(0,0x00);        // set expander's
portb to be output
...
Expander_Write_PortB(0, 0x55);