Mikroelektronika MIKROE-350 データシート
![Mikroelektronika](https://files.manualsbrain.com/attachments/e0529b3b58069a916ad7bb89f7e9f5f0eda73421/common/fit/150/50/1b07b99aa3112e022a916b06db07f1f4f211e91d41878452d87c7638b1bf/brand_logo.gif)
Expander_Write_PortA
294
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub procedure Expander_Write_PortA(dim ModuleAddress as byte, dim
Data_
Data_
as byte)
Returns
Nothing.
Description
The function writes byte to Port Expander's PortA.
Parameters :
-
ModuleAddress:
Port Expander hardware address, see schematic at the
bottom of this page
-
Data_:
data to be written
Requires
Port Expander must be initialized. See Expander_Init.
Port Expander's PortA should be configured as output. See
Expander_Set_DirectionPortA and Expander_Set_DirectionPortAB routines.
Expander_Set_DirectionPortA and Expander_Set_DirectionPortAB routines.
Example
' Write a byte to Port Expander's PORTA
...
Expander_Set_DirectionPortA(0,0x00) ' set expander's porta
to be output
...
Expander_Write_PortA(0, 0xAA)
Expander_Set_DirectionPortA(0,0x00) ' set expander's porta
to be output
...
Expander_Write_PortA(0, 0xAA)