Chapter two
Embedded System Architecture
Hardware architectures for embedded systems
Typical embedded system mainly has two parts i.e., embedded
hardware and embedded software.
Embedded system hardware's are based around microprocessors and
microcontrollers
Embedded system hardware include memory, bus, Input/Output,
Controller, where as embedded system software includes embedded
operating systems, different applications and device drivers.
Basically there are two types of embedded system architecture:
Von Neumann architecture :- Single memory to be shared by both code and data.
Processor needs to fetch code in a separate clock cycle and data in another
clock cycle. So it requires two clock cycles. Higher speed, thus less time
consuming.
Harvard architecture are used in embedded systems. Separate memories for code and
data. Single clock cycle is sufficient, as separate buses are used to access code and data.
Slower in speed, thus more time-consuming. Complex in design.
Architecture of the Embedded System includes
Sensor, Analog to Digital Converter, Memory, Processor, Digital to Analog Converter,
and Actuators etc.
The below figure illustrates the overview of basic architecture of
embedded system.
Basic Structure/Arc of an Embedded System
Sensor:
It is used for sensing the change in environment condition.
It generate the electric signal on the basis of change in environment
condition.
Therefore it is also called as transducers for providing electric input
signal on the basis of change in environment condition.
A-D Converter:
An analog-to-digital converter is a device that converts analog electric
input signal into its equivalent digital signal for further processing in
an embedded system
Processor:
Processor used for processing the signal and data to execute desired set of
instructions with high-speed of operation.
Application specific integrated circuit (ASIC):
It is an integrated circuit designed to perform task specific operation inside an
embedded system.
D-A Converter:
A digital-to-analog converter is a device that converts digital electric input signal
into its equivalent analog signal for further processing in an embedded system.
Actuators:
It is a comparator used for comparing the analog input signal level to desired
output signal level for providing the error free output from the system.
ARM Cortex M0+ Microcontroller Hardware Overview
The LPC804 are one of an Arm Cortex-M0+ microcontroller based, low-cost 32-
bit MCU family operating at CPU frequencies of up to 15 MHz.
The LPC804 supports 32 KB of flash memory and 4 KB of SRAM.
The peripheral complement of the LPC804 includes a
two I2C-bus interfaces, up to two USARTs, one SPI interface, Capacitive
Touch Interface (Cap Touch), one multi-rate timer, self-wake-up timer, one
general purpose 32-bit counter/timer, one 12-bit ADC, one 10-bit DAC, one
analog comparator, function-configurable I/O ports through a switch matrix,
an input pattern match engine, Programmable Logic Unit (PLU), and up to 30
general-purpose I/O pins.
Application
• Sensor gateways
• Industrial
• Gaming controllers
• Lighting
• Motor control
• Fire and security applications
• Climate control
Embedded communications protocols
Serial Communication basics
Communication between electronic devices is like communication between
humans. Both sides need to speak the same language.
In electronics, these languages are called communication protocols.
There are only a few communication protocols (SPI,I2C,UART,USB) we need to
know when building most ES/electronics projects.
SPI, I2C, and UART are quite a bit slower than protocols like USB, Ethernet,
Bluetooth, and Wi-Fi, but they’re a lot simpler and use less hardware and system
resources.
SPI, I2C, and UART are ideal for communication between microcontrollers and
between microcontrollers and sensors where large amounts of high speed data
don’t need to be transferred.
Serial Communication:
In serial communication the data bits are transmitted serially one
by one i.e. bit by bit on single communication line.
It requires only one communication line rather than n lines to
transmit data from sender to receiver.
Bits of data are transmitted on single lines in serial fashion.
Less costly.
Long distance transmission.
Example: Telephone.
Serial communication uses two methods:
Asynchronous
Synchronous
Asynchronous:
transfers single byte at a time
No need of clock signal
Example: UART (universal asynchronous receiver transmitter)
Synchronous:
Transfers a block of data (characters) at a time.
Requires clock signal
Example: SPI (serial peripheral interface),
I2C (inter integrated circuit).
Data Transmission
In data transmission mode if the data can be transmitted and received, it
is a duplex transmission. There are three data transmission modes:
Simplex: Data is transmitted in only one direction. Ex Radio, TV
Half duplex: Data is transmitted in two directions but only one way
at a time. Ex walkie-talkie
Full duplex: Data is transmitted both ways at the same time.
Telephone line/mobile communication.
A Protocol is a set of rules agreed by both the sender and receiver on
Cont.
Parallel Communication
In parallel communication, all the bits of data are transmitted
simultaneously on separate communication lines.
Used for shorter distance.
In order to transmit n bit, n wires or lines are used.
More costly
Faster than serial transmission.
Data can be transmitted in less time.
Example: printers and hard disk
ATmega32 microcontroller Architecture
ATmega32 microcontroller Architecture