Converting Numbers!

Steven222

New Member
Hello,
I'm getting myself very confused converting numbers to output digits to an LCD using i2c.

I've managed to sus out how to break up a number into seperate digits and convert to hex and display on the lcd module. I've also managed to display time on the LCD module which is slightly differant to just a normal number.

My problem is sending a digit to an external memory chip (24LC16B to be precise) then reading it back then converting it to display on the LCD again. Im 95% positive that I am writing and reading the data properly its just the converting to get the correct digits back on the display.

Any ideas, anyone that understands any of this?

Thanks in advance!
Steve
 

BeanieBots

Moderator
If you want to display numbers on an LCD screen, you need to convert each digit into its ASCII value. This can be done by adding the (ASCII) value of "0".

To display a single digit held in b0, on the LCD add this line
b0=b0+"0"
Then send b0 to the display.
 
Top