Page 1 of 1

Counting Beyond 32767

Posted: Wed Oct 03, 2012 8:29 pm
by medelec35
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

Re: Counting Beyond 32767

Posted: Thu Oct 04, 2012 3:39 am
by donald
Hi Martin,
Thank you very much sir Martin for his precious help. :D :D :D :D :D
All the best!

Re: Counting Beyond 32767

Posted: Thu Oct 04, 2012 2:44 pm
by donald
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!

Re: Counting Beyond 32767

Posted: Thu Oct 04, 2012 6:40 pm
by medelec35
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

Re: Counting Beyond 32767

Posted: Thu Oct 04, 2012 7:31 pm
by donald
Hi Martin,
Is super what you have created and thank you very much, esteem and respect. :D :D :D :D :D

Re: Counting Beyond 32767

Posted: Thu Oct 04, 2012 10:52 pm
by medelec35
No problem donald,
Hope it help you out.

Martin

Re: Counting Beyond 32767

Posted: Wed Mar 06, 2013 12:43 pm
by leoo
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

Re: Counting Beyond 32767

Posted: Wed Mar 06, 2013 1:25 pm
by Benj
Hi Leo,

This article should help.

http://www.matrixmultimedia.com/article.php?a=366

Re: Counting Beyond 32767

Posted: Wed Mar 06, 2013 1:58 pm
by Enamul
Hi

Here is Martin's code in Figure format...you can make that in FCv4.