Microprocessor & Controlar VVI

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Q. Describe the different types of interrupts used in 8085 Microprocessor.

Interrupts are the signals generated by the external devices to request the microprocessor to
perform a task. There are 5 interrupt signals, I.E. TRAP, RST 7.5, RST 6.5, RST 5.5, and INTR.
Interrupt are classified into following groups based on their parameter −
• Vector interrupt − In this type of interrupt, the interrupt address is known to the processor. For
example: RST7.5, RST6.5, RST5.5, TRAP.
• Non-Vector interrupt − In this type of interrupt, the interrupt address is not known to the processor so,
the interrupt address needs to be sent externally by the device to perform interrupts. For example: INTR.
• Maskable interrupt − In this type of interrupt, we can disable the interrupt by writing some instructions
into the program. For example: RST7.5, RST6.5, RST5.5.
• Non-Maskable interrupt − In this type of interrupt, we cannot disable the interrupt by writing.
• Software interrupt − In this type of interrupt, the programmer has to add the instructions into the
program to execute the interrupt. There are 8 software interrupts in 8085, i.e. RST0, RST1, RST2, RST3,
RST4, RST5, RST6, and RST7.
• Hardware interrupt − There are 5 interrupt pins in 8085 used as hardware interrupts, i.e. TRAP, RST7.5,
RST6.5, RST5.5, INTA.
Types of interrupts: -
TRAP: - It is a non-maskable interrupt, having the highest priority among all interrupts.
Bydefault it is enabled until it gets acknowledged. In case of failure, it executes as ISR and sends
the data to backup memory. This interrupt transfers the control to the location 0024H.
RST7.5: - It is a maskable interrupt, having the second highest priority among all interrupts.
When this interrupt is executed, the processor saves the content of the PC register into the stack
and branches to 003CH address.
RST6.5: - It is a maskable interrupt, having the third highest priority among all interrupts.
When this interrupt is executed, the processor saves the content of the PC register into the stack
and branches to 0034H address.
RST5.5: - It is a maskable interrupt. When this interrupt is executed, the processor saves the
content of the PC register into the stack and branches to 002CH address.
INTR: - It is a maskable interrupt, having the lowest priority among all interrupts. It can be
disabled by resetting the microprocessor.
When INTR signal goes high, the following events can occur −
• The microprocessor checks the status of INTR signal during the execution of each instruction.
• When the INTR signal is high, then the microprocessor completes its current instruction and
sends active low interrupt acknowledge signal.
• When instructions are received, then the microprocessor saves the address of the next
instruction on stack and executes the received instruction.
Q. Describe the addressing modes of 8085 microprocessor with suitable instruction.

These are the instructions used to transfer the data from one register to another register, from
the memory to the register, and from the register to the memory without any alteration in the content.
Addressing modes in 8085 is classified into 5 groups –
Types of Addressing Modes: -
Immediate addressing mode: - In this mode, the 8/16-bit data is specified in the instruction itself
as one of its operands.
Register addressing mode: - In this mode, the data is copied from one register to another.
Direct addressing mode: -In this mode, the data is directly copied from the given address to the
register. For example: LDB 5000K: means the data at address 5000K is copied to register B.
Indirect addressing mode: -In this mode, the data is transferred from one register to another by
using the address pointed by the register.
Implied addressing mode: -This mode doesn’t require any operand; the data is specified by the
opcode itself. For example: CMP.
Q. Describe with suitable example the data transfer and loading, Arithmetic & logical instructions.
Data Transfer: -Data transfer instructions are the instructions that transfer data in the microprocessor.
They are also called copy instructions. Here is the following is the table showing the list of logical
instructions:
Logical Instructions: -Logical instructions are the instructions that perform basic logical operations such
as AND, OR, etc. In the 8085 microprocessor the destination operand is always the accumulator. Here logical
operation works on a bitwise level .

Logical Instructions: -

OPCODE OPERAND DESTINATION EXAMPLE


ANA R A = A AND R ANA B
ANA M A = A AND Mc ANA 2050
ANI 8-bit data A = A AND 8-bit data ANI 50
ORA R A = A OR R ORA B
ORA M A = A OR Mc ORA 2050
ORI 8-bit data A = A OR 8-bit data ORI 50
XRA R A = A XOR R XRA B
XRA M A = A XOR Mc XRA 2050
XRI 8-bit data A = A XOR 8-bit data XRI 50
CMA none A = 1’s complement of A CMA
CMP R Compares R with A and triggers the flag register CMP B
CMP M Compares Mc with A and triggers the flag register CMP 2050

Data Transfer: -
No. No.
OPCODE OPERAND EXPLANATION of Machine cycles of T- EXAMPLE
bytes states
1 opcode fetch
MVI Rd, 8-bit data Rd = 8-bit data 2 7 MVI A, 50
1 memory read

1 opcode fetch

MVI M, 8-bit data M = 8-bit data 2 1 memory read 10 MVI 2050,


50
1 memory write

1 opcode fetch

2 memory reads for 16-bit data


LDA 16-bit address A = contents at address 3 13 LDA 2050
1 memory read for reading content at
16-bit address

1 opcode fetch

STA 16-bit address contents at address = A 3 2 memory reads 13 STA 2050


1 memory write

1 opcode fetch

directly loads at H & L 2 memory reads for reading 16-bit data


LHLD 16-bit address registers 3 16 LHLD 2050
2 memory reads for loading H and L
registers

1 opcode fetch

directly stores from H & 2 memory reads for reading 16-bit data 16
SHLD 16-bit address L registers 3 SHLD 2050
2 memory write

1 opcode fetch
LXI R.P., 16-bit data loads the specified 3 10
register pair with data 2 memory reads LXI H, 3050
1 opcode fetch
LDAX R.P. indirectly loads at the 1 7 LDAX H
accumulator A 1 memory read

1 opcode fetch
STAX 16-bit address indirectly stores from 1 7 STAX 2050
the accumulator A 1 memory write

1 opcode fetch
PUSH R.P. pushes R.P. to the 1 12 PUSH H
stack 2 memory writes

1 opcode fetch
POP R.P. pops the stack to R.P. 1 10 POP H
2 memory reads
Q. What is Minimum and Maximum Mode operation in 8086.
The 8086 microprocessor can work in two modes of operations Minimum mode and Maximum mode. In the minimum
mode of operation the microprocessor do not associate with any co-processors and can’t be used for multiprocessor
systems. In the maximum mode the 8086 can work in multi-processor or co-processor configuration.

Minimum Mode: - Control signals provided by 8086 for memory operations and i/o interfacing :
They are used to identifying whether the bus is carrying a valid address or not , in which direction data
is needed to be transferred over the bus, when there is valid write data on the data bus and when to put
read data on the system bus. Therefore, their sequence pattern makes all the operations successful in a
particular machine cycle .

Operations: -
• The 8086 microprocessor operates in minimum mode when MN/MX’ = 1.
• In minimum mode,8086 is the only processor in the system which provides all the control signals
which are needed for memory operations and I/O interfacing.
• Here the circuit is simple but it does not support multiprocessing.
• The other components which are transceivers, latches, 8284 clock generator, 74138 decoder, memory
and i/o devices are also present in the system.
• The address bus of 8086 is 20 bits long. By this we can access 2 20 byte memory i.e. 1MB . Out of 20
bits, 16 bits A0 to A15(or 16 lines) are multiplexed with a data bus. By multiplexing, it means they will
act as address lines during the first T state of the machine cycle and in the rest, they act as data
lines. A16 to A19 are multiplexed S3 to S6 and BHE’ is multiplexed with S 7.
• 8284 clock generator is used to provide the clock.
• M/IO’= 1,then I/O transfer is performed over the bus. and when M/IO’ = 0, then I/O operation is
performed.
• The signals RD’ and write WR’ are used to identify whether a read bus cycle or a write bus cycle is
performing. When WR’ = 0 ,then it indicates that valid output data on the data bus.
• The bus request is made by other devices using the HOLD signal and the processor acknowledges
them using the HLDA output signal.
• For more details about the 8086 minimum mode pins please refer.
Control signals provided by 8086 for memory operations and i/o interfacing :
They are used to identifying whether the bus is carrying a valid address or not , in which direction data
is needed to be transferred over the bus, when there is valid write data on the data bus and when to put
read data on the system bus. Therefore, their sequence pattern makes all the operations successful in a
particular machine cycle.

Maximum Mode: - In this we can connect more processors to 8086 (8087/8089). 8086 max mode is
basically for implementation of allocation of global resources and passing bus control to other
coprocessor(i.e. second processor in the system), because two processors can’t access system bus at
same instant.

Operations: -
• In this we can connect more processors to 8086 (8087/8089).
• 8086 max mode is basically for implementation of allocation of global resources and passing bus
control to other coprocessor(i.e. second processor in the system), because two processors can not
access system bus at same instant.
• All processors execute their own program.
• The resources which are common to all processors are known as global resources.
• The resources which are allocated to a particular processor are known as local or private resources.
• When MN/ MX’ = 0 , 8086 works in max mode.
• Clock is provided by 8284 clock generator.
• 8288 bus controller- Address form the address bus is latched into 8282 8-bit latch. Three such
latches are required because address bus is 20 bit. The ALE(Address latch enable) is connected to
STB(Strobe) of the latch. The ALE for latch is given by 8288 bus controller.
• The data bus is operated through 8286 8-bit transceiver. Two such transceivers are required,
because data bus is 16-bit. The transceivers are enabled the DEN signal, while the direction of data
is controlled by the DT/R signal. DEN is connected to OE’ and DT/ R’ is connected to T. Both DEN
and DT/ R’ are given by 8288 bus controller.
• Microcomputer are built using 8086. For example : IBM PC, used the Intel 8088, a version of the
8086 with 8-bit data bus.
• It is used in calculators.
• It is used for control purposes like in traffic signals(uses micro controllers which are nothing but
contains one or more CPUs along with memory and programmable i/o peripherals).
Q. Discuss in detail about ADC & DAC.
Introduction: Electric voltage and current signals are often referred to as analog signals. Analog signals
must be converted to digital signals prior to input into computers. Analog to Digital Converters (ADCs) are
used to convert analog signals to digital signals. Inversely, the computer output that is in digital form must
sometimes be converted to an analog signal prior to input to an electronic or electrical device. Digital to
Analog Converters (DACs) are used to perform this operation. In this paper we will examine important
characteristics associated with ADC/ DAC converters. In addition, we will explain how to specify a converter
to meet the requirements of a specific system. We will also state and describe different types of ADC / DAC
converters. Binary-weighted, and R- 2R Ladder type DAC circuits will be displayed and analyzed. Parallel
Comparator or Flash, Dual Slope, and Successive Approximation type ADC circuits will be displayed and
analyzed. We will explain extensively the advantage / disadvantage criteria associated with each type of
ADC or DAC converters. Finally, two computer interfacing laboratory assignments will demonstrate the
constructions of the R-2R Ladder type DAC, and Successive Approximation type ADC converters.
Digital to Analog Converter (DAC) Characteristic: When we select a Digital to Analog Converter
(DAC) chip for an application, we must consider three characteristic associated with a DAC. First, resolution
or step size defines the smallest voltage or current change possible for the DAC output signal. For example,
an 8-bit DAC that generates a maximum output voltage of 5 volts has a step size or resolution of (5V / 2 ) =
19.5 8 mV. Sometimes, the resolution is stated in the percentage value. For the 8-bit DAC, the percent
resolution is (1 / 2 ) x 100 = 0.39%. Settling time is the time required for the DAC output to settle 8 to
99.5% of its new value. Typical settling time for a commercial DAC is 300 nanoseconds. Accuracy is used to
state the percentage of actual output of a DAC to expected output. Usually the accuracy is 50% of the step
size. For the 5 V, 8-bit DAC the accuracy is 0.975 mV. This implies that the maximum output is guaranteed
by the DAC manufacturer to be within 5.00975V and 4.99025V.
Digital to Analog Converter (DAC) types: There are two methods of constructing a DAC; Binary Weighted
type, and R-2R Ladder type. Figure 1 displays an 8-bit binary weighted type DAC circuit. The output voltage
for a binary weighted DAC is found using the following equation.
V = ( V ) * ( R OUT REF F / R ) * ( D7 / 2 + D6 / 2 + ................. + D1 / 2 + D0 / 2 )

Analog to Digital Converter (ADC): When selecting an Analog to Digital converter (ADC) chip for an
application, three characteristics must be considered. Similar to selecting a DAC, these characteristics are;
number of bits, accuracy, and speed. There are three different methods used for constructing Analog to
Digital converters. These ADC types are; Parallel Comparator or Flash type, Dual-Slope type, and Successive
Approximation type. Figure 6 displays a 3-bit, flash type ADC circuit. The voltage divider provides eight
reference voltages on the negative poles of the operational amplifiers. The unknown input voltage is
compared to each one of the reference voltages. If the input voltage is greater than any one of the reference
voltages, the associated Op-Amp will be saturated to its positive supply voltage level. The eight-to-three
encoder will generate an appropriate three bit binary word according to the inputs A0 through A7. For
example, assume A4 is the only input to the encoder that is set. That would mean that the input voltage is
2.5V, and the output binary number will be 100. The advantage of a Flash type ADC is its instantaneous
speed. The Flash type ADC is expensive due to the large numbers of OP-Amp devices contained therein. For
example, an 8-bit flash type ADC requires 2 -1 = 255 Op-Amps. Flash type ADCs are used in special
applications 8 such as systems used by the military or NASA.
Conclusion: This paper presents an in-depth discussion of the construction, and use of Analog to Digital
(DAC) and Digital to Analog (ADC) converters. These components are found in a majority of digital electronic
instruments. Students in digital and microprocessor hardware classes are acquiring methods of
constructing and utilizing ADCs and DACs. Hardware sections of the lab assignments are intended to
familiarize students with the wiring connection of these devices in a circuit. Students are assigned programs
to write. The purpose of these programs is to control the process of reading from / writing to the input /
output ports.
In the Dual Slope ADC type, a capacitor is connected to
input voltage and allowed to charge up for a fixed amount of time. Then, the capacitor is connected to the ground and
allowed to discharge. The time required for the capacitor to discharge is calibrated to reflect the value of the input
voltage. Figure 7 illustrates the operation of the Dual Slope type ADC. These type of ADCs are very slow, and are usually
found in electronic voltmeters.
Features of Microprocessor:- Microprocessor is the controlling unit or CPU of a micro-computer, fabricated
on a very small chip capable or performing ALU operations and communicating with the external word
connected to it. It forma a micro-computer when combined with memory and Input/output devices. In simple
words, it is a digital chip, which is able to receive information in digital form, process this information according
to the programmed stored in memory by the user and large quantities.
Cost-effective: the microprocessor chips are available at low prices and results in its low cost.
Size: it is a small size chip and hence portable.
Low power consumption: microprocessors are manufactured by using metaloxide semiconductor technology, which
has low power consumption.
Versatility: the microprocessors are versatile as we can use the same chip in several applications by.
Reliability: the failure rate of IC in microprocessors is very low; hence it is reliable.
Q. Write down the functions of SFR in respect of 8051 Microcontroller.
The 8051 Microcontroller Special Function Registers are used to program and control different hardware
peripherals like Timers, Serial Port, I/O Ports etc. In fact, by manipulating the 8051 Microcontroller Special
Function Registers (SFRs), you can assess or change the operating mode of the 8051 Microcontroller.
Special Function Registers (SFRs): -
The 8051 Microcontroller Special Function Registers act as a control table that monitor and control the operation of the
8051 Microcontroller. If you observe in Internal RAM Structure, the Address Space from 80H to FFH is allocated to
SFRs.
Out of these 128 Memory Locations (80H to FFH), there are only 21 locations that are actually assigned to SFRs. Each
SFR has one Byte Address and also a unique name which specifies its purpose.
Since the SFRs are a part of the Internal RAM Structure, you can access SFRs as if you access the Internal RAM. The
main difference is the address space: first 128 Bytes (00H to 7FH) is for regular Internal RAM and next 128 Bytes (80H to
FFH) is for SFRs.
TIP: As only 21 of the possible 128 SFR memory locations are assigned, it is recommended that the remaining registers
or memory locations are not accessed during programming.
Categories of 8051 Microcontroller Special Function Registers:- All the 21 8051 Microcontroller Special
Function Registers (SFR) along with their functions and Internal RAM Address is given in the following table.

Q. Addressing modes in 8086 Microprocessor.


Prerequisite – Addressing modes, Addressing modes in 8085 microprocessor.
Depending upon the data types used in the instruction and the memory addressing modes,
any instruction may belong to one or more addressing modes, or some instruction may not
belong to any of the addressing modes.
The way of specifying data to be operated by an instruction is known
as addressing modes. This specifies that the given data is an immediate data or an address. It also
specifies whether the given operand is register or register pair. The addressing modes provided by
the 8086 family include displacement-only, base, displacement plus base, base plus indexed,
and displacement plus base plus indexed.

Types of addressing modes: - 1. Register mode, 2.Immediate mode, 3.Displacement or


direct mode, 4.Register indirect mode, 5.Based indexed mode, 6.Indexed mode, Based mode,
7.Based indexed displacement mode, 8.String mode, 9.Input/Output mode, 10.Relative
mode.
Q. Write down the features of 8085 Microprocessor. Draw their pin diagram as well
Architecture diagram.

8085 – Microprocessor: - The main features of 8085 μP are: • It is an 8-bit microprocessor. It is


manufactured with N-MOS technology. It has 16-bit address bus and hence can address up to 216= 65536
bytes (64KB) memory locations through A0–A15.

Feature of 8085-Microprocessor: -

1. 8-bit microprocessor i.e. accepts 8-bit data simultaneously


2. Single-chip N-MOS device implemented with 6500 transistors
3. Require single +5V power supply
4. Clock frequency in the range of 3MHz-5MHz
5. 8-bit data bus and 16-bit address bus
6. 74 instructions with the following addressing modes: Register, direct, immediate, indirect, and
implied
7. Provides 16 address lines hence access 64K Bytes of memory, program as well as data memory
8. Provides 5 hardware interrupts TRAP, RST 7.5, RST 6.5, RST 5.5, and INTR.
9. Provides on-chip clock generator hence does not require external clock generator
10. Perform arithmetic and logical operations
11. Provides control signals to control the bus cycles
12. Provides two serials I/O lines viz SOD and SID hence serial peripherals can be interfaced with
8085 directly
13. Supports mechanism that allows 8085 to increase its interrupt handling capacity
14. Provides 8-bit accumulator , flag register , 6 general-purpose register(B,C,D,E,H,L) , 2 special
purpose 16-bit registers(SP,PC)
Q. Write down the features of 8086 Microprocessor. Draw their pin diagram as well
Architecture diagram.
Features of 8086- Microprocessor: - The 8086 is a 16-bit microprocessor. The term
“16-bit” means that its arithmetic logic unit, internal registers and most of its
instructions are designed to work with 16-bit binary words. 2) The 8086 has a 16-bit
data bus, so it can read data from or write data to memory and ports either 16 bits or 8
bits at a time. In 1976, Intel came up with the idea. As a result of its 16-bit microprocessor and
16-bit data bus it can process 16bit of data in a single cycle. There is a 20-bit address bus on it.
The maximum amount of accessible memory that it can hold is 1 MB, or 220 bytes. The
microprocessor 8086 is an improved model of the 8085.

Pin Diagram & Architecture of 8086: -

Stack :- The stack is a LIFO (last in, first out) data structure implemented in the RAM
area and is used to store addresses and data when the microprocessor branches to a
subroutine. Then the return address used to get pushed on this stack. Also to swap
values of two registers and register pairs we use the stack as well.
Bus :- Connection lines used to connect the internal parts of the microprocessor chip is
called bus. There are three types of buses in a microprocessor –
• Data Bus − Lines that carry data to and from memory are called data bus. It is a
bidirectional bus with width equal to word length of the microprocessor.
• Address Bus − It is a unidirectional responsible for carrying address of a memory
location or I/O port from CPU to memory or I/O port.
• Control Bus − Lines that carry control signals like clock signals, interrupt signal or
ready signal are called control bus. They are bidirectional. Signal that denotes that a
device is ready for processing is called ready signal. Signal that indicates to a device to
interrupt its process is called an interrupt signal.
Q. Write down the features of 8051 Microcontroller.
The microcontroller like 8051 was designed in the year 1981 by Intel. The microcontroller is one
kind of integrated circuit that includes 40-pins with dual inline package or DIP, RAM-128 bytes,
ROM-4kb & 16-bit timers–2. Based on the requirement, it includes addressable & programmable
4 – parallel 8-bit ports. In the 8051 microcontroller architecture, the system bus plays a key role
to connect all the devices to the central processing unit. This bus includes a data bus- an 8-bit,
an address bus-16-bit & bus control signals.

Basic components present internally inside 8051 Microcontroller architecture are:


CPU (Central Processing Unit): CPU act as a mind of any processing machine. It
synchronizes and manages all processes that are carried out in microcontroller. User
has no power to control the functioning of CPU. It interprets the program stored in ROM
and carries out from storage and then performs it projected duty. CPU manage the
different types of registers available in 8051 microcontroller.
Interrupts: Interrupts is a sub-routine call that given by the microcontroller when some
other program with high priority is request for acquiring the system buses the n
interrupts occur in current running program.
Types of interrupt in 8051 Microcontroller:
o Timer 0 overflow interrupt - TF0
o Timer 1 overflow interrupt - TF1
o External hardware interrupt - INT0
o External hardware interrupt - INT1
o Serial communication interrupt - RI/TI

Q. What is meant by interfacing 8051.


Interfacing is one of the important concepts in microcontroller 8051 because the
microcontroller is a CPU that can perform some operation on a data and gives the
output. However to perform the operation we need an input device to enter the data and
in turn output device displays the results of the operation.
Q. Difference between 8085 and 8086 Microprocessor.

8085 Microprocessor 8086 Microprocessor

It is an 8-bit microprocessor. It is a 16-bit microprocessor.

It has a 16-bit address line. It has a 20-bit address line.

It has a 8-bit data bus. It has a 16-bit data bus.

The memory capacity is 64 KB. The memory capacity is 1 MB.

The Clock speed of this microprocessor is 3 MHz. The Clock speed of this microprocessor varies between
5, 8 and 10 MHz for different versions.

It has five flags. It has nine flags.

8085 microprocessor does not support memory 8086 microprocessor supports memory segmentation.
segmentation.

It does not support pipelining. It supports pipelining.

It is accumulator based processor. It is general purpose register based processor.

It has no minimum or maximum mode. It has minimum and maximum modes.

In 8085, only one processor is used. In 8086, more than one processor is used. An additional
external processor can also be employed.

It contains less number of transistors compare to 8086 It contains more number of transistors compare to 8085
microprocessor. It contains about 6500 transistor. microprocessor. It contains about 29000 in size.

The cost of 8085 is low. The cost of 8086 is high.

Q. Write down the INPUT/OUTPUT interfacing.

Memory Interfacing: - When we are executing any instruction, the address of memory
location or an I/O device is sent out by the microprocessor. The corresponding memory
chip or I/O device is selected by a decoding circuit. Memory requires some signals to read
from and write to registers and microprocessor transmits some signals for reading or
writing data. The interfacing process includes matching the memory requirements with the
microprocessor signals. Therefore, the interfacing circuit should be designed in such a way
that it matches the memory signal requirements with the microprocessor's signals.

I/O interfacing: - As we know, keyboard and displays are used as communication channel
with outside world. Therefore, it is necessary that we interface keyboard and displays with
the microprocessor. This is called I/O interfacing. For this type of interfacing, we use
latches and buffers for interfacing the keyboards and displays with the microprocessor.
Q. What is DMA Controller : Working & Its Applications
DMA controller definition is, an external device that is used to control the data transfer between
memory and I/O device without the processor involvement is known DMA controller. This
controller has the capacity to access the memory directly to read or write operations. DMA
controller was implemented by Intel for having very fast data transfer with less utilization of the
processor.

DMA Controller Work: - The direct memory access controller produces memory addresses
and it covers numerous hardware registers that can be read & written through the CPU.
These registers mainly include a byte count, memory address & minimum of one or above
control registers. So based on the DMA controller features, these registers can select some
combination of source, destination, transfer direction, the transfer unit size & the number
of bytes to move within the single burst. To execute different operations like input (i/p),
output (o/p), otherwise me\mory-to-memory, the host processor initializes the controller
by the number of words to transmit & the memory address to utilize, then the CPU orders
the peripheral device to start data transfer.

Q. Traffic Light Control.

The objective of this project is to design a traffic light control system. This traffic light
controller is used at the intersection that consists of a main road and two side roads. A
four way traffic light control system with count down timers is to be designed and
constructed. The system is to be developed with the PIC16f877A chip being the
microcontroller that is programmed to do the task of controlling. Figure shows the drawing
of the 4-way junction, where each way has its traffic light and counter. Low power LEDs
are used for every traffic light with different colors, namely red, yellow and green. The red
LED indicates “stop driving”, the yellow LED indicates “start stopping” and the green LED
indicates “drive”. The sequence of altering the LEDs according to their color is as shown in
the figure below: Green-Yellow-Red-Green. Twelve LEDs are used three to each traffic light.

Q. Write down the LED & LCD in 8051 Microcontroller.

LED: - Light Emitting Diodes or LEDs are the mostly commonly used components in
many applications. They are made of semiconducting material. In this project, I will
describe about basics of Interfacing LED with 8051 Microcontroller. The main principle of
this circuit is to interface LEDs to the 8051 family micro controller. Commonly, used LEDs
will have voltage drop of 1.7v and current of 10mA to glow at full intensity. This is applied
through the output pin of the micro controller. The circuit mainly consists of AT89C51
microcontroller. AT89C51 belongs to the family of 8051 microcontroller. It is an 8-bit
microcontroller. This microcontroller has 4KB of Flash Programmable and Erasable Read
Only Memory and 128 bytes of RAM. This can be programmed and erased a maximum of
1000 times.

LCD: - We always use devices made up of Liquid Crystal Displays (LCDs) like computers, digital
watches, and also DVD and CD players. They have become very common and have taken a giant
leap in the screen industry by clearly replacing the use of Cathode Ray Tubes (CRT). CRT draws
more power than LCD and is also bigger and heavier. All of us have seen an LCD, but no one
knows the exact working of it. Let us take a look at the working of an LCD. Here we are using
alphanumeric LCD 16×2. A 16×2 LCD display is a very basic module and is very commonly used in
various devices and circuits. These modules are preferred over seven segments and other multi-
segment LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation
of displaying special & even custom characters (unlike in seven segments), animations, and so on.
The LCD display module requires 3 control lines as well as either 4 or 8 I/O lines for the data bus.
The user may select whether the LCD is to operate with a 4-bit data bus or an 8-bit data bus.

You might also like