I'm reading in 10 bit value from an Xbee a/d, I've scaled the number and am outputing to a serial LCD. Is there any easy way of inserting a decimal piont with serout command?
Thanks for your help.
Current code is -
serout 6,T2400,(254,192,"Value=",#w0)
where w0 has a value between 0 & 1006
Looking fof this to be dislpayed as 100.6
Unsure how your code would work in my case.
While we are on the LCD subject, how do I insert a variable into an LCD display?
Example display " Current Draw ** amps"
if b2 is the 12 and I want it inserted to read " Current Draw 12 amps".
This will allow me to read a current draw ant any time . Any ideas??
I'm using the david lincoln circuit for my LCD, not serial input into the LCD
Although D n T did say he wasn't using a serial input to the LCD ;-)
I'm not seen David Lincoln's circuit or example code, but presume it's a typical parallel LCD connected directly to the PICAXE.
In that case it is necessary to split the number into individual digits and then send these one a time to the display, usually by calling whatever routine displays a single character ...
Im using option 3 on page 35 of the interface manual. I would like to know how to display a variable within a displayed message.
I will post the code tommorrow if it is easier to understand.
Dnt
This may help to give an idea ???, I have put the code Hippy posted above into a program that was published in the Silicon chip magazine for a parallel LCD (the code in the magazine was taken from Hippy's site by the way).
<code><pre><font size=2 face='Courier'>
#picaxe 18x
symbol RS = 2
symbol EN = 3
symbol bvalue = b10
symbol MEM = b11
symbol LCD_ch = b12
symbol RS_bit = b13
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.