DS18B20-Resolution change. How?
How can we change the resolution of the DS18B20?
I tried this in vein:
Code:
OWOut DQ, 0, [$CC,$4E, $00,$00,$3F]' set to 10bits
owout DQ,0,[$BE]
OWIN DQ, 0, [STR ID\9]
It returns only $FF, like there is no device connected.
The DS18B20 is confirmed to work OK.
Ioannis
Re: DS18B20-Resolution change. How?
The command to set the resolution is OK, as long as you're not using the alarms.
But you need to do a SkipROM before the Read_Scratchpad.
And the reset modes should be different.
Code:
OWOut DQ, 1, [$CC, $4E, $00,$00,$3F]' set to 10bits
; Convert and wait here
owout DQ, 1, [$CC, $BE]
OWIN DQ, 2, [STR ID\9]
Re: DS18B20-Resolution change. How?
I mis-understood the reset pulse. Thought that if the device was set, say for 10 bits, and then a reset pulse was sent, it would set it again at the default 12 bit state.
Thanks Darrel, is OK now.
Ioannis