View previous topic :: View next topic |
Author |
Message |
MikeW
Joined: 15 Sep 2003 Posts: 184 Location: Warrington UK
|
Dallas 1wire using the DS2482 I2C to 1-wire chip |
Posted: Tue Feb 03, 2009 7:05 am |
|
|
Has anyone got this device to work ?
I am tearing my hair out on this.
I know my I2C bus is working, since I have other devices on the bus.
I have had to go back to software I2C to use it ( the hardware I2C works fine with other devices).
I am using the Dallas AN3684 software routines, and cant get the OWSearch to find any 1wire devices.
my 1wire DS18B20's work fine using the 1 wire bit-banged routines.
maybe I am trying to be too clever in off-loading the DOW protocol
Mike |
|
![](templates/subSilver/images/spacer.gif) |
herselmann
Joined: 31 May 2008 Posts: 7
|
|
Posted: Tue Feb 03, 2009 7:44 am |
|
|
Which one? There are two different ones. I have sampled some just last week but don't know when i will have a chance to play with them and thus be able to give you advice.
I would start by testing the search code with a bit-bang interface. From what I have read from the datasheet, you should be able to replace the bottom 'layer' with the i2c bridge master chip at a latter stage leaving all the other functions the same.
That being said, from what I can remember from the command table in the datasheet, it seemed like the chip has some commands specific to the search function.
Did you remember your Pull-ups?
I recall something about two's compliment when writing to some registers, but might be confusing this with other datasheets...
If the manufacturer has to dedicate a whole app note to a device then it must mean that it is more difficult that expected...
Here is a link for AVR code:
http://www.koders.com/c/fid9F966AF5A29CD2065933ED960EF0CEDC16DE5A96.aspx
EDIT: This might also help: http://www.ccsinfo.com/forum/viewtopic.php?p=64807 _________________ There are only 10 kinds of people, those who understand binary and those who don't. |
|
![](templates/subSilver/images/spacer.gif) |
MikeW
Joined: 15 Sep 2003 Posts: 184 Location: Warrington UK
|
|
Posted: Tue Feb 03, 2009 9:00 am |
|
|
DS2482-100, the single channel device.
I can talk to the I2C part of the DS2482.
I have all necessary pullups.
I am having problems with the find devices routines,.... it cant find any.
re two's complement, I think you mean that the config register only uses the bottom 4 bits, but the top 4 bits must be written as the complement., ie 0x0F, or 0x1E
seems very strange.
my 1wire bit banging routines work a treat.
since I dont have a pic io pin connected to the 1wire bus, it is not simple to do a search rom using bit banging.
time for wire and a soldering iron methinks.
the AVR routines dont have a find rom function implemented
Mike |
|
![](templates/subSilver/images/spacer.gif) |
MikeW
Joined: 15 Sep 2003 Posts: 184 Location: Warrington UK
|
progress, and things to try |
Posted: Tue Feb 03, 2009 9:11 am |
|
|
the AVR routines look promising, I will keep you updated
Mike |
|
![](templates/subSilver/images/spacer.gif) |
MikeW
Joined: 15 Sep 2003 Posts: 184 Location: Warrington UK
|
|
![](templates/subSilver/images/spacer.gif) |
herselmann
Joined: 31 May 2008 Posts: 7
|
|
![](templates/subSilver/images/spacer.gif) |
MikeW
Joined: 15 Sep 2003 Posts: 184 Location: Warrington UK
|
Succes thanks to Kenny |
Posted: Wed Feb 04, 2009 6:12 am |
|
|
I sent a pm to Kenny, after searching the forum on DS2482.
He sent me complete code.
I just started a new project, loaded his code, and away it went, detected my DS18B20.
Wonderful !!!
Many thanks Kenny.
I wont post his code without his consent.
Mike |
|
![](templates/subSilver/images/spacer.gif) |
|