Try changing the mode to 2 before reading the data (no reset pulse).
Code:OWIN GB1net,2,[STR DSbuffer\9] ' Read 9 bytes
Try changing the mode to 2 before reading the data (no reset pulse).
Code:OWIN GB1net,2,[STR DSbuffer\9] ' Read 9 bytes
OK, so you shouldn’t always jump to conclusions even if you have reason to do so. As stated in my previous post the scratchpad/config file is reading back $OF after being set to $00. I assumed the Vad was not working. I was wrong. It is working. It now appears the configuration bit Page $00 byte $00 bit.3 is clearing to allow Vad to function however ReadScratchpad config register always reads default values (?) The Vad is working fine. My only gripe is that I have to set the Vad bit on every loop before a convert. All other registers are changing as they should and read values as expected. I’ve ask Maxim if this is normal, no reply as yet. It acts as if the config register changes to default when read, weird.
Darrel, thanks for the reply, your right about the mode. I am still going to play around with the ReadScratchpad command to see if I can find some trick to make the DS2438 function as I think it should. Grain Moisture Content project is underway.
I have the feeling that there is some problem with his sensor. Most probably it is damaged to a considerable extent and that is the reason why he is unable to gather data. I would request him to replace it with a new one. I am pretty sure that it will solve the issue.![]()
Hi mosajii,
The problem was that the scratchpad would not keep the control bits, which had been set, once the conversions were been made. On the DS2438 you must clear bit.3 of the scratchpad to enable the Vad. This bit should stay clear until the user sets it to enable Vss as A/D. Instead the scratchpad would reset to $0F after all conversions and read back of the scratchpad. This means I must set the control bit on each loop rather than only once as it should be. The devise is collecting data as it should. It is just irritating to have to reset the scratchpad on each loop. Maxim never responded to my inquire about this behavior.
Bookmarks