Hi all, I'm new to the forum(wish i found this awhile back).
My name's Billy.
I need help with one of my projects and hopefully you can help.
I'm using a HCS12 microcontroller to build a simple calculator.
I'm using a 4x4 matrix keypad(0-9,A-F) and also a Seiko 2x16 LCD Display.
This will be compiled with assembly using Freescale CodeWarrior.
I've built the circuit properly already(assume touchpad+LCD works fine).
This calculator is supposed to support 4 digit operations,
ie.. 9999 (+,-,x,/) 9999.
How would I retrieve the numbers and store it into 1 variable?
Lets say the number 9821, aka $265D. I would store it as a 2 byte variable called DIGIT1. The user should first input 9 then 8, 2 ,1. I will implement this so that if the user presses a +-*/ then it would load the operation, and then ask for the 2nd number.
Is there a way to make a string out of this number?
Also is there a easier way to print out to the LCD? Currently I have to have a table of ascii values or I have to print out a table of strings..
Thanks for the help.
My name's Billy.
I need help with one of my projects and hopefully you can help.
I'm using a HCS12 microcontroller to build a simple calculator.
I'm using a 4x4 matrix keypad(0-9,A-F) and also a Seiko 2x16 LCD Display.
This will be compiled with assembly using Freescale CodeWarrior.
I've built the circuit properly already(assume touchpad+LCD works fine).
This calculator is supposed to support 4 digit operations,
ie.. 9999 (+,-,x,/) 9999.
How would I retrieve the numbers and store it into 1 variable?
Lets say the number 9821, aka $265D. I would store it as a 2 byte variable called DIGIT1. The user should first input 9 then 8, 2 ,1. I will implement this so that if the user presses a +-*/ then it would load the operation, and then ask for the 2nd number.
Is there a way to make a string out of this number?
Also is there a easier way to print out to the LCD? Currently I have to have a table of ascii values or I have to print out a table of strings..
Thanks for the help.