Hello,
I have made a downcounter with a PIC 16f88 and a 16X2 display.
However it works fine i have one problem left.
When counting from 10 to 0 the display leaves a 0 on the display
10-90-80-70-60-50-40-30-20-10-00.
How can i get rid of this zero.
Greets F. Tummers
Downcounter with LCD
Moderator: Benj
- 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: Downcounter with LCD
Hello,
After you have printed out your number you simply need a decision to detect if the number is less then 10.
var < 10
If it is then simply use the print ascii function to print out a space character to hide the remaining 0.
Print_ASCII(" ")
After you have printed out your number you simply need a decision to detect if the number is less then 10.
var < 10
If it is then simply use the print ascii function to print out a space character to hide the remaining 0.
Print_ASCII(" ")
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
F.H.M. Tummers
- Posts: 4
- Joined: Fri Jan 29, 2010 6:57 pm