Any number greater than 32767 does not show correct number on LCD display
Even if Uint (0 to 65535) or Ulong (0 to 4294967295) variables are used.
Here are two flowcharts.
One counts from 0 to 99999
the other counts from 99999 to 0
Using this method with some modifications,the maximum number can go way beyond 99999 if required.
Martin
Counting Beyond 32767
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Counting Beyond 32767
- Attachments
-
- Count down from 99999 to 0.fcf
- Created with Flowcode 5
- (10 KiB) Downloaded 532 times
-
- Count up from 0 to 99999.fcf
- Created with Flowcode 5
- (10 KiB) Downloaded 549 times
Martin
Re: Counting Beyond 32767
Hi Martin,
Thank you very much sir Martin for his precious help.
All the best!
Thank you very much sir Martin for his precious help.





All the best!
Re: Counting Beyond 32767
Hi Martin,
It is interesting to memorize as if power is interrupted, it to return to counting from where it remained and not from the beginning.
Thank you in advance!
It is interesting to memorize as if power is interrupted, it to return to counting from where it remained and not from the beginning.
Thank you in advance!
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Counting Beyond 32767
Try this Flowchart.
It will write to EEPROM every time seconds are updated.
Therefore seconds from 99999 to 1 are stored in EEPROM
You don't want to keep updating EEPROM with 0 since EEPROM has a writing time of 1,000,000 operations.
Martin
It will write to EEPROM every time seconds are updated.
Therefore seconds from 99999 to 1 are stored in EEPROM
You don't want to keep updating EEPROM with 0 since EEPROM has a writing time of 1,000,000 operations.
Martin
- Attachments
-
- Count down from 99999 to 0 + EEPROM.fcf
- (13.48 KiB) Downloaded 550 times
Martin
Re: Counting Beyond 32767
Hi Martin,
Is super what you have created and thank you very much, esteem and respect.

Is super what you have created and thank you very much, esteem and respect.





-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
-
- Flowcode V4 User
- Posts: 55
- Joined: Mon Jan 19, 2009 11:43 am
- Has thanked: 41 times
- Been thanked: 9 times
Re: Counting Beyond 32767
Hi Martin,
I'm quite interested to see the coding of how to store bigger numbers in EEPROM. Do you have this in a version that I can view with Flowcode 4?
Thanks.
Leo
I'm quite interested to see the coding of how to store bigger numbers in EEPROM. Do you have this in a version that I can view with Flowcode 4?
Thanks.
Leo
- 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: Counting Beyond 32767
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
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
Re: Counting Beyond 32767
Hi
Here is Martin's code in Figure format...you can make that in FCv4.
Here is Martin's code in Figure format...you can make that in FCv4.
- Attachments
-
- EEPROM_LARGE_NO.zip
- (512.63 KiB) Downloaded 457 times