Datasheet

Ow_Write
284
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub procedure Ow_Write(dim par as byte)
Returns Nothing.
Description
Writes one byte of data via the OneWire bus.
Parameters :
-
par: data to be written
Requires
Devices compliant with the Dallas OneWire protocol.
Global variables :
-
OW_Bit_Read: OneWire read line
- OW_Bit_Write: OneWire write line.
- OW_Bit_Direction: Direction of the OneWire pin
must be defined before using this function.
Example
// OneWire pinout
dim OW_Bit_Read as sbit at PINB.B2
dim OW_Bit_Write as sbit at PORTB.B2
dim OW_Bit_Direction as sbit at DDRB.B2
// end of OneWire pinout
' Send a byte to the One-Wire Bus
Ow_Write(0xCC)