• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

8051 output prob...

Status
Not open for further replies.

tariq7868

New Member
hello.. i am new to microcontroller. i programmed the 8051 to blink led at port 0. Led is blinking alright but at the output port pin (i.e at all of the pins of port 0) i am getting only about 1.7-1.8 volts making the led to light much less bright. i also tried to get output from port 1 but the same results. my 5v (regulated) power supply is ok..
is ic damaged?
 

Nigel Goodwin

Super Moderator
Most Helpful Member
hello.. i am new to microcontroller. i programmed the 8051 to blink led at port 0. Led is blinking alright but at the output port pin (i.e at all of the pins of port 0) i am getting only about 1.7-1.8 volts making the led to light much less bright. i also tried to get output from port 1 but the same results. my 5v (regulated) power supply is ok..
is ic damaged?
The antique 8051 isn't able to provide much power from the I/O's, and I presume you are using resistors in series with the LED's?.
 

ronsimpson

Well-Known Member
Most Helpful Member
Is your LED on when you write 0 or when you write 1?
I think these parts pull down well but do not pull up good.
 

alphacat

New Member
What should the voltage read when the pin it set to HIGH?
It could happen because the LED or any other components draw too much current than the MCU or the PSU can provide.
To my knowledge, ICs have a mechanism where their votlage drops when too much current is drawn from them.
I suggest that you first disconnect the LED from the GPIO pin and measure the voltage then.
If the voltage is still lower than how it should be, then there's probably something else thats overloading your system.
 
Last edited:

Papabravo

Well-Known Member
They are open drain ports. In order to go high they need an external pullup resistor. A schematic of your hookup might be helpful.
 
Last edited:

johankrava

New Member
hello.. i am new to microcontroller
As already explained, use 8051 to sink current - LED anode to Vcc via resistor, LED cathode to 8051 pin. Put pin to 0V to turn led ON (instruction CLR Px.n)

And if you are new to microcontrollers I would suggest you to try learning with Pascal programming language. There is a nice Pascal compiler for 8051 microcontrolelrs. Later you will probably stick to C, but to learn programming and become familiar with 8051 I would suggest to try with Pascal. Some might disagree. My proposal is to try many things and then decide for yourselves :)
 

rushi53

Member
hello.. i am new to microcontroller. i programmed the 8051 to blink led at port 0. Led is blinking alright but at the output port pin (i.e at all of the pins of port 0) i am getting only about 1.7-1.8 volts making the led to light much less bright. i also tried to get output from port 1 but the same results. my 5v (regulated) power supply is ok..
is ic damaged?

Port 0 requires external pullup registers....
but I am not sure about the problem with Port 1...
can you post your schematic here? so that it could help finding answers
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top