Datasheet

Ow_Read
Ow_Write
349
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
unsigned short Ow_Read();
Returns Data read from an external device over the OneWire bus.
Description Reads one byte of data via the OneWire bus.
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
// Read a byte from the One-Wire Bus
unsigned short read_data;
...
read_data = Ow_Read();
Prototype
void Ow_Write(char data_);
Returns Nothing.
Description
Writes one byte of data via the OneWire bus.
Parameters :
-
data_: 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
// Send a byte to the One-Wire Bus
Ow_Write(0xCC);