Hi I am doing a home project to make a simple calculator. I plan on using a encoder for the number and arithmetic inputs and I want to display it on an LCD. I plan on having a 16:4 encoder where 0 to 9 would be my numbers and 10 to 14 would be +, -, *, /, and =, respectively, The problem is I am unsure of how to get the LCD to take this binary numbers and display the corresponding character. I have been trying to google binary to ASCii converter/decoder and search it on texas instruments but to no avail. Is there a specific why to do this? Thanks
\$\begingroup\$
\$\endgroup\$
2
-
1\$\begingroup\$ "LCD" is not specific enough to answer this. \$\endgroup\$– Ignacio Vazquez-AbramsCommented May 25, 2014 at 1:06
-
2\$\begingroup\$ What LCD display are you using exactly and what MCU will you use to program your calculator? \$\endgroup\$– HandokoCommented May 25, 2014 at 11:23
Add a comment
|
1 Answer
\$\begingroup\$
\$\endgroup\$
2
ASCII "0" is hex 0x30, or decimal 48 - just OR your encoder output with 0x30 to get the ASCII digit.
-
\$\begingroup\$ Ok so from what I looked up 0x is just for notation purposes for hex. So you want me to OR my encoder outputs with the hex equivalent, but I am unsure of how to do this could you elaborate more? \$\endgroup\$ Commented May 25, 2014 at 1:29
-
\$\begingroup\$ The top four bits of the character you send to the LCD will be 3 (0011), and the lower four bits will be the four bits from your encoder. I'm assuming that your LCD display wants ASCII. If not, we need more info on your display. \$\endgroup\$ Commented May 25, 2014 at 1:54