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.

how to use pic to make calculator?

Status
Not open for further replies.

asic1984

Full Member level 5
Full Member level 5
Joined
Nov 15, 2003
Messages
257
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Activity points
2,340
pic16f84 calculator

hi all

i need just your suggestions about making a calculator using a pic 16f84

and if there is any links related to that project

also if any one know a better methode to be used instead of using pic

thanks for help
 

simple calculator using 16f84

What kind of calculator, simple or scientific ??..

I would select a CPU with a lot of program memory if you want to make it scientific otherwise a simple one you can make in a PIC16C54....

You should also look at how many buttons you need since that is important since you only have a limited number of pins... and I think I would go for a PIC with internal RC osc, 4K memory 64 bytes of ram and for a LF type since it makes it possible to use 2 AAA batt... giving 3 volts and the cpu can be used without any regulator in this case....

Next would be to implement all the functions.. some are very easy other you need some maths but people here can help you in this...

regards,

Paul.
 
  • Like
Reactions: inad

    inad

    Points: 2
    Helpful Answer Positive Rating
โค้ด calculator 18f2550

As PaulHolland said, it depends on whether you want a simple or scientific calculator. If you want a scientific, handling all the precision floating point and storage thereof is going to be a bit tricky in the 16f84 as well as code space issues; I would really rethink the choice of MCU. Besides, the 18f parts are not that expensive now, and have *much* more capability...

For some coding of maths functions, take a look at:

http://www.piclist.com/techref/microchip/math/index.htm

It's a link farm from there, but all the links I've checked are good.

Also here, for 16f84 specific code:

**broken link removed**

Of course, you could code in C if you have a big code space (18f again) which would greatly simplify your function coding.

Also, take a look at Circuit Cellar issues 157 and 158, they have articles on making a calculator with a PIC (18f452 I think).

Cheers,
FoxyRick.
 
where could i find website or document in which they explain in more detail how division is accomplished? most sites I've searched just give me drag and drop code for the 16f84. and others explain addition , subtracttion , multiplication ... but they tend to avoid going into much detail when it comes to division? :(
 

If you want a really good calculator, use some higher-end PIC (16F877 of 18Fxxx) or ATMega128 and convert some HP-41C emulator for it.

There are free emulator sources on the Internet.

If you will have the emulator, you can use the original images of HP-41 ROMs (also available on the Internet) and you will have excellent programmable/scientific calculator.
 

What you need is a CISC micro, RISC has so many limitations in terms of mathematical calculations is concerned.
 

Hi,

Also proteus has a sample calculator files in its sample directory,
Cheers,

Analyzer.
 

Hi ALL


Also proteus has a sample calculator files in its sample directory, but using pic16F876

Thanks
 

In microchip website there is a nice set of application notes with libraries for fixed point and floating point routines for PICs. Obviously they're targetted on different devices (16F for the first, 18F for the latter).
This can give you an idea of what you can acheive with your pic. Remember also that a simple tiny pic has no enough harware to support a display, a keyboard and to implement a 16-32 bit fixed point algebra.
 

hi all

at first thanks all for your effort in helping me...........

but i have some problems using assembly as i am still a beginner and i wanna use c language because of the short time

so can any one know links where can i found a compiler with c language

and also the documents explainning programming pic16f84 with c

and for the lcd

thanks for the help ........
 

Honestly, I think you will really find it difficult to fit the code in the 1K program memory of a 16F84. C can produce much larger code than (well-written) assembler and probably won't fit.

You would be very well advised to learn assembler for smaller MCU's like the 16F84. It really isn't that hard once you start, use other people's code as examples. There are plenty of tutorials and advice on the net, and plently of people to help you when you get stuck. You will gain a much better understanding of how these things actually work, making you able to use them and program them better.

I assume that you only want a simple +-/x calculator, a scientific is completely out of reach in a 16F84. I'm not sure you can even fit a simple one a 16F84, given that you must:

Scan and decypher keyboard
Store the keypreses
Perform floating-point arithmatic up to (8? 9?) digit accuracy
Store the interim and final results
Store the displayed result
Talk to an LCD

Just my opinions... Best of luck whatever you decide to do.

Cheers,
FoxyRick.
 

hi all

first thanks for your help .........and for your advice

i am trying to make a simple calculator .because i am a begineer to the world of microcontroller ...........may be i know some assemply before but for very simple processors which have no compare with pic16f84

i take your advice into consideration but i cannot determine what will be the size of pic16f84 calculator program ..........

my idea is to use port a for inputs and port b output to the lcd

but when i tried to make the code i found my self not able to determine what to do but i will try using the points u said

thanks for your help too much

yours,
asic1984
 

I have seen project like this in an example in PROTEUS software. it ready have source code, schemetic and simulate event.
 

hi all

thanks for your interest .........please if u know a link to PROTEUS tell me

i didnot hear about this program except after i ask about this project

thanks all for your help ..................
 

hi all

can u please upload the source code of the project for calculator

thanks...................
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top