Hi, im trying to make a Digital Clock using 8051 & 16x2 LCD...I know that a lot these projects would be find once googled...but was trying to make it by my own as a beginner...What i do is to generate a 1 sec delay using interrupts....& in waiting time between these interrupts i print the seconds minutes & hours on LCD...which are stored in 3 different variables...How can i print them on LCD at once like this "03:46:23" using a function such as printf("%d:%d:%d",x,y,z)...Is it possible to print this way:?:...Thanx
concider a routine that doesnt send the whole string
just what changes this free's processor time and lcd refresh is then easier
even moving messages alarm etc
and also the use of an rtc on a couple of i/o pins
Thanx guyz....i got it working @VSMVDD do you mean to say that the string printing method would be more time consuming, than printing data one by one...
either way would work. sprintf()/printf() is easy, flexible and robust.
your own version (likely based on routines like itoa()) will have saller footprint, lack of portability but it is likely to be smaller / faster than the sprintf()/printf() approach.