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
DS18B20 does not work with one-wire
Moderator: Benj
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: DS18B20 does not work with one-wire
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.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
Re: DS18B20 does not work with one-wire
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.