gLCD ST7565R1

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
Boomer
Posts: 9
Joined: Wed Nov 15, 2017 2:08 pm
Been thanked: 1 time
Contact:

gLCD ST7565R1

Post by Boomer »

Hi Guys

I have created a small program with the above LCD Display.
Capture.PNG
(13.49 KiB) Downloaded 988 times

As can be seen there is two readings 001 and 0.

If the number value goes above 100 the digits don't align on the decreasing value.

ie the number 1 stays in the hundred's column.

any ideas how I can change this without clearing the screen completely

Best Regards

Ian

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: gLCD ST7565R1

Post by Benj »

Hi Ian,

Before printing your number you need to make a decision if the number is less than 10 and less than 100. If it is then print out some padding 0's.

Here is some pseudo code.

if (number < 100)
PrintString ("0")
if (number < 10)
PrintString ("0")

PrintNumber (number)

Hope this helps.

Boomer
Posts: 9
Joined: Wed Nov 15, 2017 2:08 pm
Been thanked: 1 time
Contact:

Re: gLCD ST7565R1

Post by Boomer »

Thanks a bunch Benj, got it now

Appreciate your help

Ian

Post Reply