Module 5- Electronics
Module 5- Electronics
Instruction register
• Provides a temporary storage location in which the current microprocessor instruction is
held while it is decoded.
• Program instructions are passed into the microprocessor one at a time through the data bus.
• Machine cycle:
-First cycle instruction is fetched and decoded
- Subsequent cycles : instruction is executed
- Each machine cycle takes a finite time (less than a microsecond) depending upon the
frequency of the microprocessor clock
Data bus (D0 to D7)
• The external data bus provides a highway for data that links all of the
system components (ROM,RAM,I/O devices) together.
• 8 bit system-
8 data lines , labeled D0 (least significant bit) to D7 (most significant
bit). Data is moved around in group of 8 bits, or bytes.
• 16 bit system : labeled D0 (least significant bit) to D15 (most
significant bit) and so on.
Data bus buffer
• It is a temporary register.
• Bytes of data pass on their way into and out of the microprocessor.
• Bidirectional -
The buffer is thus referred to as bidirectional with data passing out of the
microprocessor on a write operation and into the processor during read
operation.
• Control unit -
The direction of data transfer is controlled by the control unit as it responds to
each individual program instruction.
Internal data bus
• It is a high speed data highway that links all of the microprocessors internal
elements together.
• Data is constantly flowing forward and backward along the internal data bus
lines.
General purpose register
• Many microprocessor operations (example: adding two 8 bit
numbers) require the use of more than one registers.
• There is a requirement for temporarily storing the partial result of an
operation when other operation take place.
• These needs can be met by providing a no. of general purpose
registers
Stack pointer
• Stack pointer is simply a register that contains the last used stack location.
• Most microprocessors make use of a region of external Random access
Memory (RAM) known as a stack to suspend a particular task in order to
briefly attend something else.
• When the main program is interrupted, microprocessor temporarily
places the stack contents of its internal registers together with the
address of the next instruction in the main program.
• When the interrupt is attended , microprocessor recovers the data that
has been stored temporarily with the address of next instruction within
the main program.
• It is thus able to return to the main program exactly where it left off and
all the data preserved in its registers.
Program counter
• Programs consists of a sequence of instructions that are executed by
microprocessor.
• These instructions are stored in external RAM or ROM.
• Instructions must be fetched and executed by the microprocessor in a strict
sequence.
• By storing the address of the next instruction to be executed, the program
counter allows the microprocessor to keep track of where it is within the
program.
• The program counter is automatically incremented when each instruction is
executed.
Address bus buffer
• Address bus buffer is a temporary register through which addresses (16 bits)
pass on their way out of the microprocessor.
• In a simple microprocessor the address buffer is unidirectional with
addresses placed on the address bus during both read and write operations.
• Address bus lines are labeled A0(least significant address bus line) to
A15(most significant address bus line).
• A 16 bit address line can be used to communicate with 65,536 individual
locations.
• At each location a single byte of data is stored.
Control bus
• It is a collection of signal lines
that are used to control the
transfer of data around the
system and also to interact
with the external devices.
• The control signals used by
the microprocessors tend to
differ with different types.
• Commonly found control
signals are – Read, Write,
Reset, IRQ, NMI signals.
Instruction decoder
• It is an arrangement of logic gates that acts on the bits stored in the instruction
register and determines which instruction is currently being referred.
• It provides output signals for the microprocessor's control unit.
Control unit
• It is responsible for organizing the orderly flow of data within the microprocessor as
well as generating and responding to signals on the control bus.
• It is also responsible for timing all data transfers.
• This process is synchronized using an internal or external clock signal.
Arithmetic logic unit
• Performs arithmetic and logic operations. It has 2 inputs (here ,8 bits wide).
• One input is derived from the accumulator and the other from the internal data bus
via a temporary register.
• Operations provided by ALU : addition, subtraction, logical AND ,logical OR, logical
exclusive-OR, shift right, shift left etc.
• The result of most ALU operations are stored in accumulator.
Flag register (status register)
• The result of an ALU operation is sometimes important in determining
what subsequent operation takes place.
• A flag register contains a no. of individual bits that are set or reset
according to the result of an ALU operation. These bits are referred to as
flags.
• The following flags are available in microprocessor
MICROCONTROLLER SYSTEM
MICROCONTROLLER SYSTEM
• The arrangement of a typical microcontroller system is shown.
• The sensed quantities (temperature, position etc.) are converted
corresponding electrical signals by means of a no. of sensors .
• The output from the sensors (either analog or digital) are passed as
input signals to the microcontroller.
• The microcontroller also accepts input from the user.
• The operation of microcontroller is controlled by a sequence of
software instructions known as a control program.
• The control program operates continuously , examining inputs from the sensors ,user
settings and time data before making changes to the output signals sent to one or more
controlled devices.
• The controlled quantities are produced by the control devices in response to output
signals from the microcontroller.
• The controlled device generally converts energy in one form into energy in another form.
• Example : the controlled device might be an electric heater which converts electrical
energy from the AC mains supply into heat energy thus producing a given temperature
(controlled quantity).
• In most real world systems , there is a requirement for the system to be automatic or
self – regulating.
• Microcontrollers also have a CPU capable of performing simple arithmetic, logical and
timing operations.
• The input port signals are derived from a no. of sources including
• Switches : (including momentary action push buttons)
• Sensors : (producing logic-level compatible outputs)
• Keypads : (both encoded and unencoded types)
• The output port signals are connected to no. of devices including
• LED indicators : individual and multiple bar types
• LED seven segment display : via a suitable interface
• Motors and actuators : linear and rotatory types via a buffer /driver or
suitable interface
• Relays: conventional electro magnetic types and optically coupled
solid state types
• Transistor drivers and other solid state switching devices
Input devices
• Input devices supplies input to the computer system from the outside world.
• Input devices available on a PC are mouse (pointing device), scanner and modem.
• Microcontrollers use simple input devices.
• They may be individual switches or contacts that make and break .
• Many types of sensors that provide logic level outputs are also used (float switches ,proximity devices ,light
sensors) .
• To connect directly to the input port of a microcontroller , the input dvice must provide a logic compatible
signal.
• This is because the microcontroller signals can only accept digital input signals with the same voltage levels
as the logic power source.
• The 0 V ground level (VSS in CMOS microcontroller) and the positive power supply (VDD in CMOS
microcontroller) is invariably 5V ± 5 %.
• A level of approximately 0 V indicates a logic 0 signal and a voltage approximately equal to the positive
power supply indicates a logic 1 signal.
• Other input device must sense analogue quantities (such as velocity) but uses a digital code to represent
their value as an input to the microcontroller system.
• Some microcontrollers provide an internal analogue to digital converter (ADC) in order to simplify the
connection of analogue sensors as input devices.
• If there is no internal ADC, it will be necessary to use an external ADC which usually takes the form of a
single integrated circuit.
Output devices
• These are used to communicate information or actions from a control system to the outside
world.
• Output devices in PC are CRT (cathode ray tube) display, printers and modems.
• Microcontrollers use simple output devices.
• They may be LEDs , piezoelectric sounders, relays and motors.
• To connect directly to the output port of a microcontroller the output device must be able to
accept a logic compatible signal.
• Analogue quantities (rather than digital on/off) are required at the output of the digital- to-
analog converter.
• All functions associated with the DAC can be provided by a single integrated circuit.
• The output resolution of DAC /ADC will depend upon the no. of bits used.
• 8, 10,12 bit devices are common in control applications.
Interface circuits
• When input and output devices are logically not compatible
• when they are outside the range of signals that can be connected directly to
the microcontroller.
• Some additional interface circuitry may be required to shift the voltage
levels or to provide additional current drive.
• Additional circuitry may also be required , when a load (such as relay and
motors) requires more current than is available from a standard logic device
or output port.
• Example : a common range of interface circuits (solid state relays) is
available that will allow a microcontroller to be easily interfaced to an AC
mains – connected load.
• It then becomes possible for a small microcontroller (operating from only a
5V dc supply) to control a central heating system operating from 240V AC
mains
Introduction to the
communication system
• Communication is the process of exchanging information between
two stations that is between transmitter and receiver.
• The basic components of a communication system are: Source,
transmitter, channel and receiver.
• To transmit signals in communication system, it must be processed by
several stages, beginning from signal representation to signal shaping
until encoding and modulation.
• Application Areas- Telephone/ Mobile, Telegraph, TV cable/Radio,
Computer, Defense/ Military application, Satellite/ Space
communication, etc.
Block diagram of generalized Communication system
Voice Voice
Audio Audio
Music Music
Video Noise
Video
Data (text, image, email, Data (text, image, email,
etc.) etc.)
Modulation:
• In order to convey information using a radio frequency carrier ,the signal
information must be superimposed or ‘modulated’ onto the carrier.
• Modulation is the process of changing the particular property of the carrier
wave in accordance with the instantaneous current /voltage signal.
• Commonly used modulation methods are -
• Amplitude modulation: the carrier amplitude (peak voltage) varies according to
the voltage at any instant of the modulating signal.
• Frequency modulation: the carrier frequency varies according to the voltage at
any instant of the modulating signal.
• The effect of amplitude &frequency modulating a sinusoidal carrier is shown in
figure.
• Many more cycles of the RF carrier would occur in the time span of one cycle of
the modulating signal
Fig. Amplitude and Frequency Modulation
Need for Modulation
Because of the following advantages the modulation technique is
necessary in transmission of signals for long distances-
1. Reduces the height of antenna
2. Avoids mixing of signals
3. Increases the range of communication
4. Allows multiplexing of signals
5. Allows adjustments in the bandwidth
Demodulation
• Reverse of modulation.
• Demodulation is the process by which the signal information is
recovered from the modulated carrier.
• It is achieved by means of a demodulator (detector).
• Output of demodulator consists of a reconstructed version of the
original signal information present at the input of modulator stage
within the transmitter
A simple CW transmitter and
receiver
• A simple radio communication system comprises of a transmitter and
receiver for use with continuous wave (cw) signals.
• Communication is achieved by switching (keying)the radio frequency signal on
and off.
• Keying can be achieved by interrupting the supply to the power amplifier stage
or oscillator stage.
• It is normally applied within the driver stage that operates at a more modest
power level.
• Keying the oscillator stage usually results in impaired frequency stability.
• CW receiver consists of a radio frequency amplifier (provides gain and
selectivity) ,detector and an audio amplifier.
Detector stage:
• Mixes a locally generated radio frequency signal produced by the beat frequency
oscillator BFO (example : 99 KHz) with the incoming signal (example :100 KHz).
• Produces a signal within the audio frequency range (1KHzi.e difference between
the two signals).
• This will be amplified within the audio stage before being fed to the loud speaker.
Morse code
• Transmitters and receivers for CW operation are extremely simple but
nevertheless they can be extremely efficient.
• This make them disaster and emergency communications or for any
situation that requires optimum use of low power equipment.
• This code is invented by Samuel Morse and signals are transmitted
using these codes.
• Morse code uses a combination of dots(short period of transmission)
and dashes(slightly longer period of transmission) to represent
characters.
A super het receiver