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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/17/04 16:05
Read: times


 
#77588 - Electrical knowledge - back to basics
Responding to: ???'s previous message
Bart Libert said:
With the electrical knowledge I have I always assumed that the output of a pin would have to be connected to the led and the other leg of the led to GND, but it seems to be the opposite for 8051.

You need to brush-up your electrical knowledge! ;-)

Conventionally, positive current flow is considered to be from the more-positive potential to the more-negative potential.

If you connect the output of a pin to the anode of a LED (with a series resistor, of course) and the other leg of the LED (cathode) to 0V, your output pin will need to go to a positive voltage to drive a current through the LED and make it light.

Alternatively, you can instead connect the LED's cathode to the port pin, and anode to a positive supply (with a series resistor, of course). You then need your port pin to go LOW to allow a current to flow through the LED and make it light.

Guess which one the 8051 does...?

You need to read the 8051 "bible" links that Erik provided - then you will see how it worls!
http://www.8052.com/forum/read.phtml?id=77565


List of 20 messages in thread
TopicAuthorDate
Interfacing a parallel port            01/01/70 00:00      
   RE: Interfacing a parallel port            01/01/70 00:00      
      RE: Interfacing a parallel port            01/01/70 00:00      
         RE: Interfacing a parallel port            01/01/70 00:00      
            RE: Interfacing a parallel port            01/01/70 00:00      
   RE: Interfacing a parallel port            01/01/70 00:00      
      RE: Interfacing a parallel port            01/01/70 00:00      
         RE: Interfacing a parallel port            01/01/70 00:00      
   RE: Interfacing a parallel port            01/01/70 00:00      
      RE: Interfacing a parallel port            01/01/70 00:00      
         RE: Interfacing a parallel port            01/01/70 00:00      
   RE: Interfacing a parallel port            01/01/70 00:00      
      RE: Interfacing a parallel port            01/01/70 00:00      
         RE: Interfacing a parallel port            01/01/70 00:00      
         Electrical knowledge - back to basics            01/01/70 00:00      
            RE: Electrical knowledge - back to basics            01/01/70 00:00      
   RE: Interfacing a parallel port            01/01/70 00:00      
      RE: Interfacing a parallel port            01/01/70 00:00      
         RE: Interfacing a parallel port            01/01/70 00:00      
            RE: Interfacing a parallel port            01/01/70 00:00      

Back to Subject List