Aaron's Homepage Forum
Aaron's Homepage Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Electronics
 Basic Electronics
 Engineering the most basic 7-Seg LED with keypad
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Cory Duchesne
New Member

Canada
2 Posts

Posted - Sep 13 2010 :  11:31:32 AM  Show Profile  Reply with Quote
Hello Aaron and anyone else who offers assistance in these parts.

Lately I've been trying to gain an understanding of processors/cpu's and I thought that the best place to start would be to get a grasp of the very simplest "input-output" system one could possibly engineer.

I would like to distill the computer down to the most basic level I can conceive, and have decided that such a computer would be a single 7 segment LED. This seemed sufficiently simple, yet still relatively perplexing to me.

Here's an example of what I mean:



Imagine this LED hooked up to a keypad with numbers 0-9, each key sending a different signal which is somehow interpreted to produce a specific display on the LED.

With that being said, how are we to define a processor? Does the line between non-processor and processor become blurry when we reduce an input-output system down to something this simple?
ul.

I want to go into more specific details but I'm not sure how. When you press a key on a small 0-9 numbered keypad, what exactly are the interactions occurring to produce a particular character on a simple 7 bulb display? It's so simple, yet it's still not easy to see.

I put together another GIF of the next step in complexity, primitive animation:




^ not ready to tackle that yet, but would eventually like to understand that as well.

Edited by - Cory Duchesne on Sep 13 2010 11:41:04 AM

codingplanet
Mad Scientist

United Kingdom
195 Posts

Posted - Sep 13 2010 :  12:44:59 PM  Show Profile  Visit codingplanet's Homepage  Reply with Quote
I'm not sure what your question is. If you are talking about the internal working of a processor then you need to look into logic gates.
Go to Top of Page

Cory Duchesne
New Member

Canada
2 Posts

Posted - Sep 13 2010 :  6:59:55 PM  Show Profile  Reply with Quote
Whenever I look into logic gates, the material always excludes the logic gates relationship with keypad and display. I realize the logic gates are the intermediary between the input and the output, I just need a tutorial or something that explains it all as a whole. I think I got a good enough handle on logic gates, I just need to connect everything into a whole unit.
Go to Top of Page

codingplanet
Mad Scientist

United Kingdom
195 Posts

Posted - Sep 14 2010 :  11:38:00 AM  Show Profile  Visit codingplanet's Homepage  Reply with Quote
I'm still not sure exactly what you want.
http://www.shiresoft.com/downloads/docs/6502.pdf
Go to Top of Page

pebe
Nobel Prize Winner

United Kingdom
1078 Posts

Posted - Sep 14 2010 :  2:39:25 PM  Show Profile  Reply with Quote
Your first posting indicated you were looking to enter the realms of microcontrollers. That being so, then the intermediate part of the puzzle you are looking for is known as the 'program', and you have to write it. Probably one of the most commonly used controllers are those of the PIC series, and there are many sites offering tutorials for them. Just Google for 'pic tutorial'.

In your case there are only two parts to your program - 1. Check for a keypress, and 2. Light the appropriate segments for that number.

1. In your specific case, the keyboard keys would be connected together in a matrix, ie, 3 wires would be spaced out vertically crossed by 4 wires spaced down horizontally, and a key would be connected to one horizontal and one vertical wire at each of the 12 intersections, in the manner of a telephone keyboard ('1' at top left to '#' at bottom right. So if you pressed any key it would connect one horizontal wire to one vertical one. So you only need 7 wires to check 12 keys. The 7 wires would be taken to one of the controller's ports, and used just for the keypad.

Now your program would take the first vertical wire 'high' and check to see af any of the 4 horizontal wires was high. If the second horizontal was high, your program would know that the '4' key had been pressed. If there was no response, it would take the 2nd then the 3rd vertical wire high and check for responses on all horizontals. This operation is known as 'scanning the keys' and goes on continuously.

2. A second port would be used to light the 7segment display, so (with a common cathode display) taking any of the port pins high would light up one segment.

Now that you know the '4' key had been pressed, your program would arrange to 'set', ie. take high, the approriate bits of the port to turn on the segments. In this case '4' would cause segments b, c, f, and g to light up.

Now scan again and see if another key has been pressed. If so reset the outputs to the 7segs to turn off the '4', and light up the segments for the new number.

And that's it. I hope that has helped you.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Aaron's Homepage Forum © 1995-2020 AARONCAKE.NET Go To Top Of Page
This page was generated in 0.08 seconds. Snitz Forums 2000