Mikroc, Ow_reset, Ow_read – ABL electronic PIC Microcontrollers PIC16 User Manual
Page 242: Ow_write

mikroC - C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
234
MikroElektronika: Development tools - Books - Compilers
page
Prototype
char
Ow_Reset(char *port, char pin);
Returns
Returns 0 if DS1820 is present, 1 if not present.
Description
Issues OneWire reset signal for DS1820. Parameters
port
and
pin
specify the location
of DS1820.
Requires
Works with Dallas DS1820 temperature sensor only.
Example
Ow_Reset(&PORTA, 5);
// reset DS1820 connected to the RA5 pin
Ow_Reset
Prototype
char
Ow_Read(char *port, char pin);
Returns
Data read from an external device over the OneWire bus.
Description
Reads one byte of data via the OneWire bus.
Example
tmp = Ow_Read(&PORTA, 5);
Ow_Read
Prototype
void
Ow_Write(char *port, char pin, char par);
Description
Writes one byte of data (argument
par
) via OneWire bus.
Example
Ow_Write(&PORTA, 5, 0xCC);
Ow_Write