??? 11/30/06 18:41 Modified: 11/30/06 19:11 Read: times |
#128781 - Looking at program Responding to: ???'s previous message |
If we look at the program, maybe we can figure out the hardware. The first thing I noticed about the segment data is that the LSB (bit 0) is always a 1, so I assume it is not connected or not used. He is outputting the data on P1, using P3.0 for his pushbutton, P3.3, P3.4, and P3.5 are used to turn on and off each of the three digits in a multiplexed fashion. So now we know that the common segments of the three digits are tied together. Now we need to determine which port lines are connected to which segments.
_ _ _ |_| |_| |_| |_| |_| |_| 3 2 1 ^ ^ ^ | | | -----------P3.3 | |----------------P3.4 |--------------------P3.5 A F B G E C D DP Looking at the number 0 we see one segment is off that's G _ | | |_| 00001001b, (XXXXGXXP) 1 Then looking at the number 6 one segment is off that's B _ |_ |_| 00010001b, (XXXBXXXP) 2 XXXBGXXXP Next look at the number 5, there are two possibilities, but we've already determined where B is so now we've found E _ |_ _| 00110001b, XXBEXXXP or (XXEBXXXP) 3 XXEBGXXP Next look at the number 3, also two possiblities, but we already know where E is so now we've found F _ _| _| 01100001b, XEFXXXXP or (XFEXXXXP) 4 XFEBGXXP Next the number 2 -- we found C _ _| |_ 01000101b, XCXXXFXP or (XFXXXCXP) 5 XFEBGCXP Then the number 9 _ |_| | 00100011b (XXEXXXDP) 6 or XXDXXXEP XFEBGCDP so AFEBGCDP P1.0 = P or decimal point P1.1 = Segment D P1.2 = Segment C P1.3 = Segment G P1.4 = Segment B P1.5 = Segment E P1.6 = Segment F P1.7 = Segment A Hope that helps. Jon |
Topic | Author | Date |
Pseudo Random Number Generator Questions | 01/01/70 00:00 | |
Ok figured it out | 01/01/70 00:00 | |
i dunno are they all ignoring you? | 01/01/70 00:00 | |
8 Segments | 01/01/70 00:00 | |
Spelling error | 01/01/70 00:00 | |
1 bit per segment! | 01/01/70 00:00 | |
Here's one I prepared earlier... | 01/01/70 00:00 | |
I light 7 segment led | 01/01/70 00:00 | |
Unethical! | 01/01/70 00:00 | |
That not what I am saying | 01/01/70 00:00 | |
this is ridiculoss | 01/01/70 00:00 | |
I spent hour no answers | 01/01/70 00:00 | |
seven segment | 01/01/70 00:00 | |
It is... | 01/01/70 00:00 | |
Now do the rest | 01/01/70 00:00 | |
Not Rocket Science! | 01/01/70 00:00 | |
Misleading comments | 01/01/70 00:00 | |
Looking at program | 01/01/70 00:00 | |
Your right Jon | 01/01/70 00:00 | |
Now that is tempting... | 01/01/70 00:00 | |
A link to the thread | 01/01/70 00:00 | |
Do it in the forum! | 01/01/70 00:00 |