OneWire library provides routines for communication via OneWire bus, for exam-
ple with DS1820 digital thermometer. This is a Master/Slave protocol, and all the
cabling required is a single wire. Because of the hardware configuration it uses
(single pullup and open collector drivers), it allows for the slaves even to get their
power supply from that line.
Some basic characteristics of this protocol are:
- single master system,
- low cost,
- low transfer rates (up to 16 kbps),
- fairly long distances (up to 300 meters),
- small data transfer packages.
Each OneWire device also has a unique 64-bit registration number (8-bit device
type, 48-bit serial number and 8-bit CRC), so multiple slaves can co-exist on the
same bus.
Note that oscillator frequency Fosc needs to be at least 4MHz in order to use the
routines with Dallas digital thermometers.
Ow_Reset
Ow_Read
Ow_Write
MikroElektronika:
Development
tools
-
Books
-
Compilers
23 3
page
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
OneWire Library
Library Routines