MrDEB
Well-Known Member
been hacking at this but to no avail.
The LCD works as I first got the HELLO WORLD code to work.
I must be missing something?
I have only one DS18B20 connected but going to connect three sensors to three different pins but going one step at a time. All I am getting to display are a bunch of boxes (I had contrast adjust for the hello world test but tried readjusting to no avail.
The LCD works as I first got the HELLO WORLD code to work.
I must be missing something?
I have only one DS18B20 connected but going to connect three sensors to three different pins but going one step at a time. All I am getting to display are a bunch of boxes (I had contrast adjust for the hello world test but tried readjusting to no avail.
Code:
Device = 18F4520
Clock = 8
Config OSC = INTIO67
// import modules...
Include "DS18B20.bas"
Include "convert.bas"
Include "lcd.bas"
// working variables...
Dim
TempA As ShortInt,
TempB As Word
osccon = %01111111
// Start Of Program...
SetPin(PORTB.2)
find()
// Find() will search the bus for a single DS1820 device
// and load its ROM ID into the DS1820 public variable RomID - you
// could do this manually. For example, RomID = MyRomID...
delayms(200)
lcd.cls
If DS18B20.Find Then
While true
Convert
GetTemp(TempA, TempB)
LCD.Write(1,1,DecToStr(TempB,4), " C")
DelayMS(1000)
Wend
Else
LCD.Write("No device found")
EndIf