Chapter 02 Embedded Systems Hardware Arcitecture
Chapter 02 Embedded Systems Hardware Arcitecture
Chapter 02 Embedded Systems Hardware Arcitecture
LECTURE SESSIONS
Session Two: Embedded System Architecture.
2.0 Session Objectives
By the end of this session, you should be able to:
Describe embedded system architecture
Explain the function of each building blocks of an embedded system hardware
Classify the types of embedded systems processors, their architecture
Describe the memory used in embedded system
Describe the different I/O subsystems Data transfer Schemes
Describe the CPU performance and Enhancement parameters
Application Software
Operating System
Hardware
Input Output
Devices Central Processing
Devices
Unit (CPU)
Communication
Application specific Circuitry
Interfaces
Control Unit
(CU)
Memory
CPU Data Bus (Instruction
& Data)
Program Data
Memory Memory
Address Address
bus bus
Program
Memory CPU Data Memory
Program
Figure 07 Harvard Architecture
Data
Memory
Memory
Data bus
Data bus
2.5.3 The super Harvard Architecture (SHARC)
It is a slight but significant modification of the Harvard architecture.
In this architeture provision has been mad to store secondary data in the program memory
so as to balance the load on both memory blocks, since the data memory is frequently
accessed than the program memory
Program Data
Memory Memory
Address Address
bus CPU bus
Program
Memory Data Memory
(Instructions Instruction
and Program Cache
Data
Secondary Memory
Memory
Data) Data bus
Data bus
Processor
Address
Bus
Data Bus
EEPROM Flash
RAM
Memory
Interrupt Handlers
I/O device Hardware
Layer representation of the software component with respect to I/O devices
It comprises of I/O devices and their associated device drivers. I/O subsystem defines a standard
set of functions called application Programmable interface (API) for the operation of the I/O
devices.
The functions of the device drivers include:
Figure 7.1
The microprocessor use R/W signals to determine the direction of data flow.
The main advantage of this scheme is that it does not require additional decoding circuitry and the
set of instructions may be used to fetch data either from the I/O devices or from the memory
locations.
Following instructions may be used for the data transfer in this scheme:
MOV M, A
It moves the contents of accumulator to MH-L. If H-L pair contains the address of memory
location, then the data will be transferred to memory location; if on the other hand H-L pair
contains the address of the I/O devices, then the accumulator data will be transferred to I/O
devices.
MOV A, M
It moves the contents of MH-L to accumulator. If H-L pair contains the address of memory
location, then the data will be transferred from memory location; similarly if H-L pair contains the
address of the I/O devices, then the data from I/O devices will be transferred to accumulator.
STA address
It stores the contents of accumulator to addressed location. If the address represents the address of
memory location then the accumulator contents will be stored to memory location; if on the other
hand address represents the address of the I/O devices, then the accumulator data will be
transferred to I/O devices.
Figure 7.2
In 8085A the IO/M’ signal is used for this purpose. If this signal is low (0), it represents the
memory.
However, if this signal is high (1), it represents the I/O operations. RD’ and WR’ signals in
association with IO/M’ signal help in performing I/O read/write operations or memory
read/write operations.
Table 7.1 shows the operations of these signals.
Table 7.1
Table 7.2
2.9 DATA TRANSFER SCHEMES
The data transfer schemes are categorized depending upon the capabilities of I/O devices to
accept or transfer serial or parallel data.
Transmitter Receiver
Transmitter Transmitter
Receiver Receiver
Transmitter Transmitter
Receiver Receiver
Fig 7.4
Fig. 7.5 illustrates the asynchronous handshaking process to transfer the data from the
microprocessor to I/O device.
In this figure, the microprocessor sends a ready signal to I/O device. When the device is
ready to accept the data, the I/O device sends an ‘ACK’ (Acknowledge) signal to
microprocessor indicating that the I/O device has acknowledged the ‘Ready’ signal and is
ready for the transfer of data.
Fig 7.6
NOTE: In the programmed I/O data transfer method discussed above, the microprocessor is
busy all the time in checking for the availability of data from the slower I/O devices and also in
checking if I/O device is ready for the data transfer. In other words in this data transfer scheme,
some of the microprocessor time is wasted in waiting while an I/O device is getting ready.
Figure 7.9
However, to connect the several I/O devices to active high interrupt terminal (INTR) is shown in
figure 7.10. In the active low interrupt line of the microprocessor the devices are connected to
INTR terminal through different open collector NOT gates; when any of the devices is active it
provides a low signal to INTR enabling the interrupt line.
Similarly, in the active high interrupt line the I/O devices are connected through an OR gate.
When any of the device is high the output of OR gate sends a high signal to interrupt line (INTR).
Fig 7.11
c) Priority Interrupt Controller (PIC):
In this method several I/O devices may be connected to a single interrupt line
through programmable interrupt controller (IC 8259).
Up to 8 input/output devices may be connected to the microprocessor.
If more than 8 I/O devices to be connected, more PICs (programmable interrupt
controllers) are used in cascade.
2. Multi Interrupt System
When the microprocessor has several interrupt terminals and one I/O device is to be connected to
each interrupt terminal, then it is known as multi interrupt system. In this scheme, the number of
I/O devices to be connected to the interrupt lines should be equal to or less than the number of
interrupt terminals.
In this way one device is connected to each level of interrupt.
So when a device interrupts the microprocessor, it immediately knows which device has
interrupted.
Such an interrupt scheme is known as vectored interrupt.
2.9.3 Direct Memory Access (DMA) Data Transfer
In programmed I/O or interrupt driven I/O methods of data transfer between the I/O devices
and external memory is via the accumulator. For bulk data transfer from I/O devices to memory
or vice-versa, these two methods discussed above are time consuming and quite uneconomical
Fig 7.12
It may be mentioned here that DMA transfer the data of the following types:
• Memory to I/O device
• I/O device to memory
• Memory to memory
• I/O device to I/O device
Fig 7.13
Fig 7.14