You are on page 1of 19

Unit-3

Generating control signals and


Microcontroller architecture

Generating control signals


Microcontroller and microprocessor
Architecture of 8051 Microcontroller
Selection factors
Comparison of microcontroller and Microprocessor
Microchip microcontroller
Interfacing and applications.
Control Signals
Control signal is a pulse or frequency of electricity or light that represents a control
command as it travels over a network, a computer channel or wireless. In the data
communications world, 
Control signals typically travel the same path as the data either as separate packets or
contained within the data packets.

Fig.1 : Schematic diagram of generate control

Figure shows the read (RD) as a control signal for both memory and input devices
Two different RD signals are required one for memory and other for input.
Similarly two separate writing signals must be generated.
Control signals ---------Read signal (memory)
--------- Read signal (I/O)
--------- Write signal (memory)
--------- Write signal (I/O)

If IO/M and RD and WR signals are ANDed connection with 74LS32 OR gate
This will give 0 with 0 and 1 with 1 outputs as per the task. Here both input signals are
low with MEMR and MEMW control signals.

But HEX inverter is used in this circuit, ANDed with RD and WR signals the output
becomes reverse.
ie if 0 input, 1 becomes the output and
if 1 is input the output becomes 0

That means if normal ANDED and OR gates are used with quadruple no change in
output, but inverse is used the output becomes reverse
Microcontroller

The 8051 Basic type of Microcontroller is designed by Intel Co. in 1980’s. This
microcontroller  was based on Harvard Architecture and developed primarily for the use
of embedded systems technology.
The 8051 Microcontroller  has two buses and two memory spaces of 64K X8 size for
program and data units. It has an 8 bit processing unit and 8 bit accumulator units

4
Comparision between Microprocessor and Microcontrollers

Sl. Microprocessor Microcontroller


No.
1. Microprocessor: general purpose digital Microcontroller: The microcontroller can be
computer central processing unit (CPU), simply also defined as a computer on chip
popularly known as computer on chip, microchip or microcomputer or integrated
circuit designed for particular function
usually read only memory(ROM), Random (Task) that contains programmable
access memory(RAM), memory decoders, an input/output peripherals, processor, and
oscillator and number of I/O devices such as memory. Which performs limited calculations.
parallel and serial data ports, interrupt handles, Microcontrollers are especially used in
timing and counting devices Embedded systems.
Example Washing machine: many functions Example. Printer: particular data and print it.
with several data’s.
2. The ROM based programs are primarily small The prime use of microcontroller is to control
and fixed flexible programs that operates the operation of a machine using fixed
peripheral and other devices. programs that is stored ROM and that does not
changeover the lifetime of the machine
Contd..

3.: Microprocessors are many operational codes Microcontrollers one or two operational
(op codes) for moving data from external codes specific to task
memory to CPU
4. Microprocessors have one or two types of Microcontrollers have many bit handling
bit handling instructions instructions
5. Microprocessor is concerned with rapid Microcontroller is connected with rapid
movement of code and data from external movement of bits within the chip
addresses to the chip.
6. Microprocessor must have many additional Microcontroller can function as a
parts to be operational. computer with addition of no external
digital parts.
Applications of Microcontrollers :
Home appliances: Telephones,, microwave, door opens systems, TV, VCR, remote control,
video games, cell phones, camera, lighting control, automatic camera..

Office: telephones, laser printer, security systems, Fax machine, computers..

Automotives : Engine control, ABS (Automatic Braking System), steering control, Airbag,
transmission control, climate control, keyless entry(sensor based)
Microcontroller Arhitecture

Fig.1 : Architecture of 8051 Microcontroller


The 8051 Microcontroller is one of the basic type of  microcontroller, designed by Intel in
1980’s. This microcontroller  was based on Harvard Architecture and developed primarily
for use in embedded systems technology. The 8051 Microcontroller  has two buses and
two memory spaces of 64K X 8 size for program and data units. It has an 8 bit processing
unit and 8 bit accumulator units.

The Intel 8051 is an 8-bit microcontroller which means that most available operations are
limited to 8 bits.

There are 3 basic "sizes" of the 8051: Short, Standard, and Extended. The Short and
Standard chips are often available in DIP (Dual In-line package) form, but the Extended
8051 models often have a different form factor, and are not "drop-in compatible".

All these things are called 8051 because they can all be programmed using 8051
assembly language, and they all share certain features (although the different models all
have their own special features).
8
I/O ports , ALE, PSEN, XTAL1, XTAL2, RESET, Serial input /output, Timing,
Interrupts
Input/output Port : Normally Microcontroller is used in embedded system to control
the operation of machines in the microcontroller. Therefore, to connect  it to other
machines, devices or peripherals we require I/O interfacing ports.

ALE(Address Latch Enable) : Pin provides an output pulse for latching the low order
byte of the address during access to external memory. This allows 16 bit addresses.

PSEN : program stroke enable : this pin is read signal pin for external program memory
and is active when low. It is connected to output enable pin of external ROM OR
EPROM

EA (External access ) : this pin is used for external program code. it access
automatically
Access internal or external code depending on address. 9
Contd..
XTAL1 , XTAL2 : these are the connecting pins for a external oscillator, used with crystal
Circuit of 12MHz

RESET : used for system to allow startup orderly when high signals on the pin.

Serial I/P and O/P : writing serial data in to buffer at address 99H loads data fro
transmission.

Timers/Counters : 8051 microcontroller has two 16 bit timers and counters. These counters
are again divided into a 8 bit register. The timers are used for measurement of intervals to
determine the pulse width of pulses.
Interrupts : As its name suggests, Interrupt is a subroutine call that interrupts of the
microcontrollers main operations or work and causes it to execute any other  program, An
Interrupts gives us a mechanism to put on hold the ongoing operations, execute a subroutine
and then again resumes to another type of Generally five interrupt sources are there in 8051
Microcontroller. There are 5 vectored interrupts are shown in below
INTO
TFO
INT1
TF1
R1/T1Out of these,  (INT0) ̅ and (INT1) ̅ are external interrupts that could be negative edge
10
triggered or low level triggered. The memory which is used to store the 
BUS
Basically Bus is a collection of wires which work as a communication channel or
medium for transfer of Data. These buses consists of 8, 16 or more wires of the
microcontroller. Thus, these can carry 8 bits,16 bits simultaneously. Hire two types of
buses that are shown in below
Address Bus
Data Bus

Oscillator : In general, we know that, crystal oscillators are used in


the microprocessors and microcontrollers for providing the clock signals. ... This
crystal oscillator is used to generate clock pulses required for the synchronization of
all the internal operations.

Microcontroller 8051 has an on-chip oscillator which works as a clock source for
Central Processing Unit of the microcontroller. The output pulses of oscillator are
stable. Therefore, it enables synchronized work of all parts of the 8051
Microcontroller.

11
Applications of 8051:

Light sensing and controlling devices


Temperature sensing and control devices
Fire detections and safety devices
Automobile aeronautics applications
space, robotics, electronics, defence applications
Rail transport, industrial processing and medical applications

12
Harvard architecture
The Harvard architecture is a computer architecture with separate storage and signal
pathways for instructions and data. The term originated from the Harvard Mark I relay-
based computer, which stored instructions on punched tape (24 bits wide) and data
in electro-mechanical counters.

13
Microchip Microcontroller
Peripheral Interface Controller (PIC) microcontrollers are a family of
specialized microcontroller chips produced by Microchip Technology in Chandler,
Arizona. This is called PIC used as single chip microcontroller. The main functions as
follows.

The structure is used in form of Harvard architecture


Here instructions can be fetched every cycle without waiting during its execution.
Enables faster execution speeds to be achieved for a given clock frequency.
The basic features of Harvard architecture
Input output ports
Analogue inputs through internal ADC
Timers 0, 1 and 2
Serial input and output
Parallel slave port D and E for interfacing PC
14
Master Clear Reset pins
In computer networking, master/slave is a model for a communication protocol in
which one device or process (known as the master) controls one or more other
devices or processes (known as slaves).

15
Microcontroller Selection factors

Number of input output pins which are task determined

Interfaces Type of interfaces required

Memory requirement Based on size and task

Interrupts required How many events will need to interrupts

Process speed required execution of interrupt

16
Interfacing Devices
Interfacing can be defined as transferring data
between microcontrollers and interfacing peripherals such as sensors, keypads,
microprocessors, analog to digital converters or ADC, LCD displays, motors, external
memories, even with other microcontrollers.

Interfacing can be defined as transferring data between microcontrollers and interfacing


peripherals such as sensors, keypads, microprocessors, Analog to Digital Converters
ADC, LCD displays, motors, external memories, even with other microcontrollers, some .
Interfacing is a technique that has been developed and being used to solve many
composite problems in circuit designing with appropriate features, reliability, availability,
cost, power consumption, size, weight.

An interface is either Input device, or output device, or a storage device, or processing


device. Input devices are used to provide some data to the microcontroller. ... These
devices provide some input to the microcontroller, and this input is called as data
17
Interfaceing LCD using ADC

 Temperature sensors are interfaced with microcontroller that is connected to a PC. 


 Temparature sensors are interfaced to microcontroller with the help of ADC
 analogue signals are converted into digital and then fed to the microcontroller.
 serial communication RS232 standard interface is used for obtaining communication
between the computer and circuit.
18
Note :

Oscillator : an electronic circuit that produces a periodic , oscillating electronic signal


often sine wave or a square wave. Oscillators convert direct current from power sully to
alternating current current signal.

Embedded systems : is one that has computer hardware with software embedded with
other devices. Or Hardware (input out put interfaces, user interface, memory and the
display) is built with a microprocessor or microcontroller

In 1981 Intel corporation introduced 8 bit microcontroller called 8051

19

You might also like