I'm currently using a DS1307 I2C real time clock and i can display the time/date on PC. I'd like to be able to display this on my I2C/Serial LCD that i purchased.
I can display normal text on LCD fine but don't know how i'd display the time/date as the data is converted from bcd into bytes by the CCS example. I realise that you tell the printf function what you want to display it in and it converts it but how would i do this for the LCD?
Any ideas?
Thanks DVC
Matro Guest
Posted: Wed Apr 23, 2008 5:42 am
If you use the serail feature of your LCD, the same way as you do with the PC. But you probably have to add some extra commands to set up the LCD.
We can't say more because we don't know neither the LCD part number nor the used protocol.
Matro
dvc Guest
Posted: Wed Apr 23, 2008 5:48 am
Hi Tthanks for your reply,
Sorry, i'd like to use in I2C mode. I can drive the LCD fine to display text messages but don't know how to diplay time.
I thought i'd need to convert the byte data from the rtc to decimal before sending to LCD?
Matro Guest
Posted: Wed Apr 23, 2008 6:14 am
You have to convert each digit (decimal value) in the corresponding ASCII character.
But that's simply done by adding 0x30 to the decimal value (this works only for numerical digits).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum