OneWire Library
History
The OneWire protocol which in fact needs two wires (data and ground) is fantastic for many reasons: you can have a very long cable (250 feets), you can have multiples of devices on this cable and with a simple code you can poll those devices to get temperature, voltage, switch position, wind speed, etc.
This protocol was developed by Dallas Semiconductor (now Maxim-IC). Many flavors of devices can be connected to an OneWire port. You can see them at Maxim (http://www.maxim-ic.com/1-Wire.cfm) web site!
OneWire Features
- Cable can be long
- Devices take their power from the data line
- Multiples devices can be used on the same cable
- Each device has is own ID (48 bits serial number)
Download
4 Comments to “OneWire Library”
Post comment
Please note
Categories
- All projects
- Audio
- Clock
- Electric Train
- Gadjet
- General Posting
- Laser
- Lastes News
- LED
- Library
- Sensor
- Software
- Work Bench Tools
Blogroll
Electronic Links
Tags
AGC
Anemometer
AVR
AVR Bootloader
Bootloader
Capacitence
Capacitor
Clock
Color
Control
DCC
Debugger
Devices
Digital
driver
Function Generator
High Gain Microphone
Humidity
Inductance
Inductor
Laser
LCD
LED 3W
Library
Lightning Detector
MegaLoad
Meter
Moodlight
Mood Light
MS5534
Nixie
OscilloScope
projector
Rain Fall Sensor
rgb
RGB LED
Scop
Sensor
SHT75
Temperature
Terminal
Tipping Bucket
Train Modeling
Vintage
Water Detector

admin

All my source codes were taken from my personal projects.
I don't understand "the mask", the argument to the functions, could you give me an example??, it's the port?
Input: mask : Where the device are on the port?
also what's the function of this code?
//**************************************
// D E F I N E
//**************************************
// User dependent BEGIN
#define ONEWIRE 0×01 // BIT
#define ONEPIN (*(volatile unsigned char *)0×36) // PIN register
#define ONEDDR (*(volatile unsigned char *)0×37) // Data Direction Register
#define ONEPORT (*(volatile unsigned char *)0×38) // PORT
// User dependent END
it's the configuration of the pins/port/ddr??, if it's case i don't understand how to setup, thanks for the web site, it's cool!!
It’s make so many time I wrote this code, I don’t really remember about the mask, it could me the bit port pin for the define you could make #define ONEPN PIND (if you use port D)
Sylvain
Maybe you have an example of use (project), can you send me in a e-mail??, felipe.paredes@gmail.com, that will be useful for me. thanks for the answer
Hi Sylvain,
I'm also interested in a simple example code in C using this lib, I also want to read the temperature from a DS18B20.
Thanks
jc.dasilva@free.fr