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
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.
8051 programming refers to the Intel 8051 micro-controller. This is a small computer on a single chip having electronic input output that is used to control simple machinery.The 8051 uses an instruction set consisting of binary codes and data that may be used to describe the algorithms that the microprocessor runs. These instructions are published by Intel with a set of mnemonic words that are designed to enable the programmer to remember the instructions. These mnemonics are not part of a formal programming language because they have no syntax apart from the instruction and data values for each command that the processor might execute.The instructions could be placed in any order such that no particular algorithm is expressed.A formal programming language however requires structure and syntax that describes the algorithm as an abstract concept apart from the system that might run the program. A programming language, such as C, C# or Java will be portable across machines but 8051 assembly code will only run on that processor.In short then, the 8051 assembly code is not a programming language as such.
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
8051 is old MCU technology there is other MCUs on the market with build in ADCs, the PIC MCU from Micro Chip is the most popular and is very easy to program, more about PIC at this link http://www.patenttrade.net