Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/30/06 18:38
Read: times


 
#128779 - Not Rocket Science!
Responding to: ???'s previous message
Ralph Sack said:
I still need to know which ports in p1...

You mean which pins in the Port P1...

sending the bcd to the 7 segment display.


Who said BCD is sent to the 7-segment display?


After an hour and half I still don't see how it's being done.

It shouldn't be that difficult:

  • You know that a 7-segment display has 8 LEDs in it (one for each segment, plus the DP);
  • You know that an 8051 Port has 8 pins;
  • The code uses meaningful labels like display_0, display_8, etc
  • You know that displaying an '8' must light all the segments;
  • You know that displaying a '0' must light all the segments except one.

    So let's apply that knowledge to the code:
    display_0:
    	mov	P1, #00001001b
    	ret
    

    display_8:
    	mov	P1, #00000001b
    	ret
    

    From just those two, I think it should be easy to guess that:
  • b0 (the LSB) is the DP;
  • writing a 0 to a pin turns the LED ON;
  • the middle segment (g) is connected to b3

    You should be able to take it from there...

  • List of 22 messages in thread
    TopicAuthorDate
    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      

    Back to Subject List