Page 1 of 1
DS18B20 does not work with one-wire
Posted: Thu Jul 12, 2012 2:16 am
by krimles
I have scoured this forum and the web to see if there is a successful example using this one-wire device with Flowcode - but none work. I am using a PIC16F884 with the device connected to RA0. I see activity on the DS18B20 data line, but all I get out is the number 4096 on my LCD display. Warming or cooling the device makes no change. Has anybody been able to get this to work?
Thanks
Re: DS18B20 does not work with one-wire
Posted: Thu Jul 12, 2012 6:41 am
by kersing
Have you seen this
message from Ben? It suggests RA0 might not be a good pin to use. Also, have you added a pull up resistor? And are you sure the code is designed to work with the ds18b20 or has it been written for the ds1820/ds18s20? The ds18b20 is not code compatible with the other two.
Re: DS18B20 does not work with one-wire
Posted: Thu Jul 12, 2012 2:36 pm
by krimles
Thanks for the help. Yes, I have a 4K7 resistor pulled up to Vcc. I will add the PortA switch to digital and see how that goes. I am not sure of the programming differences between the DS1820 and DS18B20. Does anyone have code that works with the DS18B20? If none of this works then it might have to be done in assembler.