Decimal point display on LCD
Archiver
Posts: 46,084
I need to display a decimal point on an LCD display. The project requires the
user to enter a frequency 1 to 99999. It has a divide by 10 and divide by 100
circuit which effectively gives a range of 1 to 9999.9 or 1 to 999.99. When
the user presses the DIVIDE by 10 key, I need to display the previously
entered 5 digit number as 4 MSdigits + Decimal Point + LSdigit. Similar
requirement for DIVIDE by 100 key press. Please help pointing me in the right
direction to accomplish this task. Thanks!
user to enter a frequency 1 to 99999. It has a divide by 10 and divide by 100
circuit which effectively gives a range of 1 to 9999.9 or 1 to 999.99. When
the user presses the DIVIDE by 10 key, I need to display the previously
entered 5 digit number as 4 MSdigits + Decimal Point + LSdigit. Similar
requirement for DIVIDE by 100 key press. Please help pointing me in the right
direction to accomplish this task. Thanks!
Comments
How will you store the five digit number ranging up to 99999? It
could be as ascii codes (5 bytes), as packed BCD (5 nibbles), or as
straight binary (one word 0-65535 + one bit) or as split binary (e.g.
one word 0-9999 and one nibble 0-9). How to display it depends on
how it is stored.
I have a little tutorial on displaying decimal points at
http://www.emesystems.com/BS2math4.htm#Displaydecimal
but that is based on the serout modifiers and may not be relevant,
unless you have a serial LCD, or unless you have a BS2p (which allows
modifiers to be used with the new LCDout commands).
-- Tracy
>I need to display a decimal point on an LCD display. The project requires the
>user to enter a frequency 1 to 99999. It has a divide by 10 and divide by 100
>circuit which effectively gives a range of 1 to 9999.9 or 1 to 999.99. When
>the user presses the DIVIDE by 10 key, I need to display the previously
>entered 5 digit number as 4 MSdigits + Decimal Point + LSdigit. Similar
>requirement for DIVIDE by 100 key press. Please help pointing me in the right
>direction to accomplish this task. Thanks!
like to change that for more efficient use of the memory. I am presently
using the modifiers (DEC) to display correctly on the LCD. Can you suggest a
more efficient way to do this? Also any more help on the decimal point
question with this additional information would be greatly appreciated. I
have downloaded all of the tutorials on you web site and they are fantastic.
Over the past few months they have saved countless hours of reinventing the
wheel! Thanks again!
George