Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need help with storing some data onto Register.

Status
Not open for further replies.

Mike0rr

New Member
Once again, I'm stuck on a (likely) not so complex issue but I lack the proper vocabulary to find the answer quickly on Google.
Long story short, I've made a calculator using two, 4-Bit BCD Full adders. The part that this post concerns is in between the Input (0-9 Keypad and Decoder) and the BCD Full Adders.
My inefficient idea of storing the 4 bits for each digit was having each leg of the Full Adders tied to a small Shift Register. That's a lot of registers for a small calculator and while it's still doable, I am doing this project to simply learn about Logic and IC's and whatnot, so I would like to learn how to do it the correct, and/or efficient way. I also understand I could do Serial In type of data but for a 4 bit number but to do so, I would need to clock each input number 4 times and I don't understand how I would clock something exactly 4 times. (If I simple need to be directed towards using a timer chip and learning more about them, please inform me. I am a noob after all : P)

So, the question is: How would I go about taking 4 bits of data off a Decoder, and logging it into Full Adders, sometimes shifting said data over from one set of Adders to the next? The input is 0-99 + 0-99, so it's not a lot of storage needed.

Other miscellaneous information you may want to know:
-I used Shift Registers for my original design so the first number input (1's place) shifts over to the 10's place when a second number was typed in. (Example: 2 pressed = 02. Then press 4 and you now get 24. Shifting the Zeros out each time.)
-I am not using a micro controller for this project as it pretty much defeats the purpose of this project. I seemed to get asked this over and over last time as everyone suggested running parts off of one . But again, this is for educational purposes and I would skip learning some of the fundamentals here.
-If using Shift Registers is completely the wrong direction to take, correct me. Please! I'm hear to learn and I understand I may have gone about this completely wrong. I take criticism well and appreciate all the help : )
-If visuals would help here I could draw up a quick diagram no problem. What ever helps get my question answered.

I understand wording this technical stuff is hard enough as it is, let alone wording it with a limited, outsider vocabulary so if anything is to convoluted or simply, outright confusing, I completely understand the need for me to rephrase or restate something.
 
To store 0-99 BCD, you need eight bits. You can use an octal flip-flop, e.g. 74HC273, to store the number, and to provide the 'shifting' from 02 --> 24 that you mentioned by tying the lower four outputs to the upper four inputs. The clock to the flipflop IC would the shift and store to occur, and would be derived from the decoded keypad 'key pressed' signal. Because you want to have two numbers entered (to add together), pressing the '+' key could cause the clock to be routed to a different flipflop IC so that it could be loaded. The outputs of the flipflops go to the adder ICs.
 
It's late so my brain is running a bit slow, but I think this is exactly what I was looking for. I had pretty much given up hope of finding a chip to fit this task. Thank you Dougy.
 
since the 1-9 keyboard would result in 1 pulse for every keystroke..
my idea is to matrix them to 3x3 and wire the outputs as needed to your next input stage...
 
Last edited:
I did a project for my daughter using basic logics and counter to multiply two numbers maximum 12x12. select two numbers to be multiplied using two keypads one on left and one on right, then press the check button, the result will be displayed. Your task is to add two numbers and can be done easily. select 1st number and 2nd number, use a clock to count the total and hold.
 
Our task? Or is it your task, in which case this looks a lot like homework and not like a project for your daughter.
 
multiplication.jpg
Our task? Or is it your task, in which case this looks a lot like homework and not like a project for your daughter.
Home work? I spent nearly 5 days soldering around 40 ICs.
 
Sorry looks like I completely misunderstood what your post was about.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top