CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

One Wire, DS2480 to ds2408 not working as expected

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jimcbride



Joined: 05 Apr 2006
Posts: 23

View user's profile Send private message

One Wire, DS2480 to ds2408 not working as expected
PostPosted: Wed Jun 13, 2007 9:06 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Jun 13, 2007 2:09 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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