Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

CALUCLATOR - INPUT FROM A KEYBOARD USING HYPER TERMINAL

Status
Not open for further replies.

oister

Member level 2
Joined
Nov 2, 2008
Messages
50
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Activity points
1,580
CALUCLATOR!!!!!!

hi;
i am new to microcontroller.i have been assigned a project to make a caluclator that do 4 airtmetic operations and take INPUT FROM A KEYBOARD USING HYPER TERMINAL CAN anyone have any idea how to start it.
 

Re: CALUCLATOR!!!!!!

You will need a serial port on your micro, to be able to connect to a PC using Hyperterminal. That is the first thing.
Second, Hyperterminal uses ASCII characters. So you will need to take ASCII characters the user enters and store them in memory. Normally, the entry should end with = , just like in a calculator.

To provide the user feedback, you will need to echo each character as it is received. So once you receive a character, store it in memory, and then send it right back on the serial port. That will make it appear on the screen, giving the user feedback, so he knows things are operating. Nobody likes to type blindly.

Once you detect the = character, you know the user has finished the entry so you can now look at the characters he has entered. Check they are all valid characters, that is, numbers. If the user mistakenly entered another symbol ,such as a letter, send an error message and abort everything.

If all characters are OK, determine the type of operation you need to perform, by looking at the characters and identifying the +, -, etc. If none is fond, send an error.
If the operation is correct, check the size of the operators, to make sure you can handle those numbers. There are always limitations on how large or small the numbers can be, so check them and if they are not OK, send an error mesage.

If all checks OK, then do the operation you are required and then send the results.
Note that since everything is ASCII when it comes to Hyperterminal, you will need conversion routines to translate the numbers to their ASCII codes and the other way around.

Hope this helps.
 

Re: CALUCLATOR!!!!!!

u can use proteus software for hardware simulation. they also have a calculator program in samples that can help you to understand your scenario.
 

CALUCLATOR!!!!!!

thanks u for ur help.i have to buid the code in keil software.do u have any code written in keil software format.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top