DISPLAYING unsigned long integer on GLCD

General discussion on mikroC PRO for PIC.
Post Reply
Author
Message
pumper
Posts: 289
Joined: 10 Jan 2011 17:37

DISPLAYING unsigned long integer on GLCD

#1 Post by pumper » 05 May 2024 19:43

Using a PIC18F47K42 or PIC18F46K22.
When it displays on the 128 x 64 GLCD it only shows the first two bytes, DF04 NOT 0DDF04.

I suspect it is something simple but I can't find it. Your help, please.

Code: Select all

//unsigned long MILES & char txt[11] //ASSIGNED before MAIN
     MILES = 909060;  //0DDF04, DISPLAYS 57092   DF04
     WordToStr(MILES, txt);  
     Glcd_Write_Text(Ltrim(txt), 16, 5, 1);

hexreader
Posts: 1786
Joined: 27 Jun 2010 12:07
Location: England

Re: DISPLAYING unsigned long integer on GLCD

#2 Post by hexreader » 05 May 2024 19:49

LongWordToStr ?
Start every day with a smile...... (get it over with) :)

pumper
Posts: 289
Joined: 10 Jan 2011 17:37

Re: DISPLAYING unsigned long integer on GLCD

#3 Post by pumper » 05 May 2024 20:24

Thanks hexreader.
I thought I had tried that before but apparently I hadn't because that was it.
The old memory isn't what it was.

Post Reply

Return to “mikroC PRO for PIC General”