0
\$\begingroup\$

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

asked May 25, 2014 at 1:01
\$\endgroup\$
2
  • 1
    \$\begingroup\$ "LCD" is not specific enough to answer this. \$\endgroup\$ Commented 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\$ Commented May 25, 2014 at 11:23

1 Answer 1

1
\$\begingroup\$

ASCII "0" is hex 0x30, or decimal 48 - just OR your encoder output with 0x30 to get the ASCII digit.

answered May 25, 2014 at 1:10
\$\endgroup\$
2
  • \$\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

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.