Hello.
I'm making a LCD clock which uses 1602 LCD. I want to display day of the week according to RTC reading.
However, since there are no string variables, I have to make an array, in which I put ASCII codes of letters to be written, and read them accordingly:
Here it works, because I've trimmed all weekday names to same length. But say if I want to have different length texts, I have to add another array, which will hold the length of the words. This is very weird, is there any means to avoid this?Code:DNAME[1]=77:DNAME[2]=111: DNAME[3]=110 'Mon DNAME[4]=84:DNAME[5]=117: DNAME[6]=101 'Tue DNAME[7]=87:DNAME[8]=101: DNAME[9]=100 'Wed DNAME[10]=84:DNAME[11]=104: DNAME[12]=117 'Thu DNAME[13]=70:DNAME[14]=114: DNAME[15]=105 'Fri DNAME[16]=83:DNAME[17]=97: DNAME[18]=116 'Sat DNAME[19]=83:DNAME[20]=117: DNAME[21]=110 'Sun TAVAKI: FOR CNT=1 to 21 STEP 3 lcdout $fe, $01, DNAME[CNT], DNAME[CNT+1],DNAME[CNT+2] PAUSE 1000 NEXT CNT GOTO TAVAKI




Bookmarks