Why are you angry ??? DS 1820 is not responsible for any thing here ...
You use a serial LCD and parallel devices command ... of course it can't work properly.
Have a little look to serial commands like SEROUT ...
Alain
Why are you angry ??? DS 1820 is not responsible for any thing here ...
You use a serial LCD and parallel devices command ... of course it can't work properly.
Have a little look to serial commands like SEROUT ...
Alain
Thanks for you reply but now I realize my post is not clear. The last line of the program I posted is not for the remote display. I do use serout but I'm not able to send temperature, that is a word, divided in multiple one byte. Before each one of these bytes I have also to send the row and location byte.
For example if the temperature is 15.78 I have to send: row, location, 1 after that row, location, 5 and so on.
Assuming temperature is a word size variable and holds a value of 1578 (for 15.78 deg C)
Use SEROUT2 with the DEC modifier. (See Manual Section 5.71)
(SEROUT doesn't support modifiers)
Also have a look at Manual Section 4.17.7
DIG will solve your problem
You will have to add the control-codes for your LCD to the code-exampleCode:SEROUT2,Pin,Mode,[DEC1 temperature DIG 3,DEC1 temperature DIG 2,".",DEC1 temperature DIG 1,DEC1 temperature DIG 0," °C"]
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Thank you very much Ralph for your solution. Despite all manuals, just now I can see a way to access the innard of temperature variable.
Bert
Bookmarks