|
|
View previous topic :: View next topic |
Author |
Message |
jimcbride
Joined: 05 Apr 2006 Posts: 23
|
One Wire, DS2480 to ds2408 not working as expected |
Posted: Wed Jun 13, 2007 9:06 am |
|
|
I am trying to talk between these two devices with a pic. I have the communication working between all three chips. The problem is that I can't seem to read any of the registers in the ds2408 chip. Example:
Tx (Hex values)
C1 (reset pulse) Rx -> CD (presence pulse OK)
E1 (switch ds2480 to data mode)
CC (Issue Skip Rom commcand) Rx -> CC (as sent)
CC (Issue Write conditional search Register Command) Rx -> CC (as sent)
8D (register address, TA1) Rx -> 8D (as sent)
00 (register address, TA2) Rx -> 00 (as sent)
04 (write byte to control/status register) Rx -> 04 (as sent)
E3 (switch out of data mode)
C1 (reset pulse) Rx -> CD
<above seems to work ok but when I go to read back what I wrote in to the register, I get no feedback>
E1 (switch ds2480 to data mode)
CC (Issue Skip Rom commcand) Rx -> CC (as sent)
F0 (Issue Read POI Registers Command) Rx -> F0 (as sent)
8D (register address, TA1) Rx -> 8D (as sent)
00 (register address, TA2) Rx -> 00 (as sent)
<Here is where I expect to read back a 0x04. I get no response.>
E3 (switch out of data mode)
C1 (reset pulse) Rx -> CD
Am I missing something? |
|
|
jimcbride
Joined: 05 Apr 2006 Posts: 23
|
|
Posted: Wed Jun 13, 2007 2:09 pm |
|
|
For anyone else who read this and was as stumped as I was. I read in APP192 page 11, about reading ROM. Over and Over I read that everthing is basically a write, then read results. I was getting the results I expecting as a response to what I wrote. The problem was that I was expecting an imediate reply after I gave my address bytes. In order to get feedback on my read command I still have to conform to the Write/read convention. After I put in the address bytes and get the responce from the TA2 byte, I need to do another write to get anything out. APP192 says to write FF for feedback on register locations. I now get the expected 0x84 after writting 0xFF. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|