home-built calculator

Hi

My son (13 years old) would like to build a calculator, basic four function, for a science fair project for next year. He wanted to build it out of discrete components, however he has now, (thankfully?) decided maybe some VLS chips would be better and alot easier. So does anyone know of a set of plans, suggestions or other information that might help with this project? I am trained as a tech, but have not worked in the field in a decade.

Thanks

Reply to
john
Loading thread data ...

Alas, I can't fetch the magazine out of deep storage right now, but Popular Electronics had exactly such a project, fall of '68, if memory serves.

--
John Miller, N4VU
email domain: n4vu.com; username: jsm(@)
Surplus (For sale or trade):
Tektronix 465B oscilloscope
New Fellowes leather brief/notebook case
Reply to
John Miller

You could do this with a PIC or HC11 (I recommend the Adapt11C24DX) and some 7-segment LED displays, but its harder than you might think. Scanning a keypad and decoding input requires writing a fast interrupt service routine...Also, most multi-digit 7-seg displays can only display one digit at a time, so to display multiple digits you have to employ persistence of vision: displaying each digit in rapid succession.

--
|\/|  /|  |2  |<
mehaase(at)sas(dot)upenn(dot)edu
Reply to
Mark Haase

Some hints:-

Use BCD arithmetic - gives you 'arbitary precision' and is actually easier to handle for larger numbers. The algorithms used would be very much like those you use when working things out 'long hand'.

A microprocessor would make things pretty simple, and is really cheating. 'Which one' is probably a religious issue, but don't try and squeeze things into a very small one. PICs are widely available, cheap, heavily documented and can be (re)programmed in situ - a very useful characteristic. There are other processors which share these properties and are arguably better designed - I prefer Atmel AVR's, for instance. Whichever route you go, remember that you need supporting tools - assemblers/compilers, debugging aids and so on.

It would be a lot more fun (and challenging) to use an FPGA, and in many ways this would be closest to the idea of building something out of discrete logic - you can draw up a schematic which will be automagically converted into configuration data for the fpga.

In the end it depends on your sons interests and skills !

Dave

Posted Via Nuthinbutnews.Com Premium Usenet Newsgroup Services

---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **

----------------------------------------------------------

formatting link

Reply to
Dave Garnett

Easier doesn't demonstrate the understanding of how the machines actually work; which may be a big ask for a 13-yo anyway! A microcontroller such as an AVR could be used but it would be much more of a software project than a hardware one.

To get a feel for the complexity required of an ALU, see

formatting link

He should probably use BCD and "dedicated" ALU. BCD allows each digit to have separate store and display... you need at least 2 "registers"; one for each value on which you're working. One of the values can be common with the display register.

Division will be the hardest to handle. It's *very* ambitious to do it at this level of integration.

Addition and subtraction are not out of the realm of possibility.

There used to be a bunch of MSI chips available for that sort of thing 10 years ago. See

formatting link
for an overview of some TTL. Not a comprehensive list by any means.

--
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ /  ASCII ribbon campaign | I'm a .signature virus!
 X   against HTML mail     | Copy me into your ~/.signature
/ \  and postings          | to help me spread!
Reply to
Bernd Felsche

Pop 'Tronics had a construction article on desktop 4-function electronic calculator in late '71 or early '72. ISTR reading it when I was fresh out of the Air Force, so it would have been then.

Reply to
Michael

If ...HE... is really going to build it, rather than this being an ummmm... parent augmented project, perhaps a binary calculator with bit serial operations and strings of leds to show the state of the bits, perhaps handling + and - and entering a number, might be a more feasible task to begin with.

But maybe 13 year olds are just getting a lot better than I remember being.

Reply to
Don Taylor

You lost an attribution in there!

--
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ /  ASCII ribbon campaign | I'm a .signature virus!
 X   against HTML mail     | Copy me into your ~/.signature
/ \  and postings          | to help me spread!
Reply to
Bernd Felsche

For a 'simple' project I'd go for a naive implementation of an adding only machine - which has the advantage of being nicely modular.

First make the keypad and the input registers with associated decoding and displays.

Then add a bank of adders and more registers.

Use either 3 state buffers and connect everything to a 'display bus' (enable keypad drivers when in 'key press' mode, or the adder output after the 'add' key was pressed).

I can see this in a modular build as well. First start with the keypad (diode encoder?) and a single input register and display, and add a second one.

Then start working on the 'adding' register - with 3 digits width one already had a nice demo.

Thomas

Reply to
Zak

--snip--

Division is done by repeated subtraction - see 'restoring division' for the algorithm. Yes, it will be slow, but once add and subtract work, division is not such a big step !

In the days of mechanical calculators you could watch as the machine actually did division by this process.

The place to start the project is by writing down the algorithm/flow chart of operations done manually when adding etc - remembering to deal with negative numbers (and fractions if you want to be complete). If your son cannot manage this step, then he should seek another project.

I can remember using (at age 13 !) one of the very first 'electronic' calculators, built entirely from transistors - no ic's. It was said to be 'portable' because it only took two people to carry it ...

Dave

Posted Via Nuthinbutnews.Com Premium Usenet Newsgroup Services

---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **

----------------------------------------------------------

formatting link

Reply to
Dave Garnett

Erm yes... counting the number of subtractions before the remainder is less than the divisor. "Fractional" parts can be done by repeated shifting of the decimal point until you run out of digits after the decimal point. But it adds significant complexity in the form of a counter and a comparison circuit.

You could on early electronic calculators as well!

--
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ /  ASCII ribbon campaign | I'm a .signature virus!
 X   against HTML mail     | Copy me into your ~/.signature
/ \  and postings          | to help me spread!
Reply to
Bernd Felsche

John,

Your son might enjoy _Code_ by Charles Petzold. It starts with using telegraph relays, batteries, and light bulbs to allow two boys to communicate between their homes and goes through (theoretically) building your own computer. I suppose you could (theoretically) build one from relays. His book can give your son an understanding of how computers (and calculators) know that 1 + 1 = 2.

Bob

john wrote:

Reply to
Bob

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.