Generally the output pin of the MCU will be, between 4.3V and 5V when high and will allow a maximum current of 15mA, an LED will have a volt drop of about 2 volt in forward bias conditions at 10mA which is about the minimum current to make it glow normally.
Place a resistor in series with the MCU pin and the LED, connect the cathode pin of the LED to the ground. As an on state is created on the MCU, the current will flow through the resistor to the LED, through the anode, flow through the LED to the ground
The minimum current for LED at the minimum voltage is must be used to obtain the Rs
Rs=(Vmcumin-Vled)/Imin
Rs=(4.3V-2V)/0.01A
= 230R using a higer value 330R should be fine
Imcu = (5V- 2V) / 330R = 9.1mA it should be safe for your MCU and it should produce a visible indication.
I will not recommend making it to bright, LEDs can easily go to about 20mA but for most applications around 10mA is enough
If one would need to use 15mA or more, then the help of an external transistor is recommended. Then you have VCC going through resistor Rs through LED Anode to Cathode to the collector of a NPN BJT transistor. Then from the Emitter to the ground. From the MCU let the voltage go though resistor Ri to the Base of the transistor. Generally it is bad to switch loads this way, since the loads are never properly grounded and said to be floating, but for LED it is ideal.
Then
Rs = (VCC-Vled-Vce) / Iled = (5V-2V-0.2V)/0.01A = 280R NAV = 330R
Ic = (Vcc-Vled-Vce)/Rs = (5V-2V-0.2V)/330R = 8.47mA
then
ib = Ic/Beta = 8.47/100 = 84.8uA
to allow some tolerance let Ibnew = Ib x 10 = 848uA
Ri = (Vmcumin - Vbe)/Ibnew = (4.3V-0.7V)/848uA = 4.245K NAV = 4k7
The transistor:
Ie= (Vmcumax-Vbe)/Ri = (5V-0.7V)/4.7k = 915uA
Power dissipation for transistor is
Pd= Vce x Ie = 0.2V x (Ib + Ic) =0.2 x 0.009395 = 1.88mW
one can see, a very small transistor is required.
1
In the 8051 microcontroller, error messages and their descriptions are typically found in the documentation provided by the manufacturer, such as the datasheet or user manual. Additionally, programming environments or Integrated Development Environments (IDEs) used for 8051 development may have a specific file or section, often referred to as a "log file" or "error log," that lists error messages encountered during compilation or execution. These resources are essential for troubleshooting and debugging applications on the 8051 platform.
The simplest way would be via an ADC
Well, honey, a PIC controller typically has a faster execution speed and lower power consumption compared to an 8051. Plus, PIC controllers often have a larger variety of peripherals and are more cost-effective for certain applications. But hey, at the end of the day, it all depends on what you need for your project, so pick your poison wisely.
Answer It is both 8 bit processors in a 40 pin package but it is not pin compatible, it have almost the same functions but it is very difficult to compare the two because it is not the same family.
how temperature is measured using 8051 micro-controler?
The 8051 is a micro-controller series, basically a computer on a chip. A system based on the 8051 series micro-controller is simply that, a device or series of devices that operate under control of one or more 8051 micro-controllers.
constructed on a single chip is called micro processor constructed on a single board is called micro controller
A: Because it can only control 8 bits of data.
1
the internal RAM is for data storage and for many applications is all that is needed.
In general, personal preference and experience is what it comes down to. There are some PIC's that have built in RF systems; I don't believe there are any 8051's with this capability.
In general, personal preference and experience is what it comes down to. There are some PIC's that have built in RF systems; I don't believe there are any 8051's with this capability.
They are mainly four ports in 8051MC. port 0 port 1 port 2 port 3
Like many early microprocessors it has a 1mhz internal clock for its' operation. 12mhz is divided internally by 12 to derive this frequency.
EA - External Access PSEN - Program store Enable ALE - Address Latch Enable RST - Reset WR - RD
First let me make you correct it's not 11.059 Hz it's 11.0592 MHz and we select? this crystal because it makes 8051 Microcontroller to be compatible with IBM standard PC(baud rate 9600) to transfer data.