Well-known member
Welcome to the forum, crazy!

You need to provide much more information than that. Remember that we are "flying blind" and know nothing about you or what you are having trouble with.

What's the purpose of your project? What is your experience level? What lcd? What project board? Did you draw a schematic? Do you have a photo of your setup?

Are you really ... crazy? ;)
Haha no I'm not crazy... I'm using a parallax lcd. I got it to read 0-255 but how do I get it to read 5.00 volts. What formula would I use to do so. Thanks


Technical Support
Staff member
If your 0 reading represents 0V and 255 represents 5V then to convert would mathematically be -

volts = reading * 5 / 255

But PICAXE only deals with whole numbers and maths is limited to a maximum value of 65535. You can determine how many 10mV's there are using -

volts = reading * 100 / 51 ; Equivalent to volts = reading * 500 / 255

Giving a 0 to 500 result. Split that number into hundred, tens and unit digits and then output those digits with a decimal point in the appropriate place.
so this will give me 2.55 and i try to make it 5.00 i cant seem to get it ....i got this down any help to get 5.00 thanks

readadc c.1,w1
serout c.2,t2400,("votage=",#b1,".",#b2,#b3,cr,lf,17)
goto main


Technical Support
Staff member
This should work -

#Picaxe 08M2
#Terminal 4800
  readadc c.1,b0
  b0 = b0 * 100 / 51  ; Calculate voltage 000 to 500
  b1 = b0 / 100 // 10 ; Hundreds
  b2 = b0 / 10  // 10 ; Tens
  b3 = b0 / 1   // 10 ; Units
  pause 500
  goto main
That will display the voltage in the serial terminal window. Once happy with the results you can replace the SERTXD with your desired SEROUT command.


Well-known member
That's a good result.

Now don't be a crazy stranger ... uh, I mean don't be a strange crazy ... no, don't be a stranger, crazy! ;)