??? 08/05/06 09:02 Read: times |
#121687 - Does logic "low" represent 0V? |
I am trying to connect a buzzer to P1.0 of my AT80C51ED2 MCU. I am trying to switch on/off the buzzer but with no success. Here is my connection :
+5V ----- +|------| |Buzzer| +-- -|------| | | P1.0 of MCU Here is my understanding and i might be wrong. When i set P1.0 = 0, does that means that would turn on the buzzer since there is a potential difference between the the Vcc(+5V) and the P1.0(0V)? And if i bring the P1.0 high a.k.a "1", it would cause the Buzzer to turn off. Of course i did place a resistor between the buzzer to P1.0 of the MCU as a current limiter. Also, to my surprise when i try to use a voltmeter to measure between the P1.0 and GND pin of the MCU, i still get approximately +5V even though i pulled the P1.0 to low by setting P1.0 = 0. Can someone please explain why does this happens and tell me where is my mistake. Thank you in advance! |