Module 1
Module 1
Less/not at all tailored towards reduced Highly tailored to take advantage of the
operating power requirements, options for power saving modes supported by hardware
different levels of power management. and Operating System
Response requirements are not time critical For certain category of embedded systems
like mission critical systems, the response
time requirement is highly critical
2
Introduction to Embedded Systems MODULE 1
3
Introduction to Embedded Systems MODULE 1
and miniaturization into the embedded device market. Example are, Smart phone devices,
MIDs etc.
4
Introduction to Embedded Systems MODULE 1
1. Data Collection/Storage/Representation
Performs acquisition of data from the external world.
The collected data can be either analog or digital
Data collection is usually done for storage, analysis, manipulation and transmission
5
Introduction to Embedded Systems MODULE 1
The collected data may be stored directly in the system or may be transmitted to some
other systems or it may be processed by the system or it may be deleted instantly after giving
a meaningful representation
2. Data Communication
Embedded Data communication systems are deployed in applications ranging from
complex satellite communication systems to simple home networking systems
Embedded Data communication systems are dedicated for data communication
The data communication can happen through a wired interface (like Ethernet, RS-
232C/USB/IEEE1394 etc) or wireless interface (like Wi-Fi, GSM,/GPRS, Bluetooth,
ZigBee etc)
Network hubs, Routers, switches, Modems etc are typical examples for dedicated data
transmission embedded systems
3. Data (Signal) Processing
Embedded systems with Signal processing functionalities are employed in applications
demanding signal processing like Speech coding, synthesis, audio video codec,
transmission applications etc
Computational intensive systems
Employs Digital Signal Processors (DSPs)
4. Monitoring
Embedded systems coming under this category are specifically designed for monitoring
purpose
They are used for determining the state of some variables using input sensors
They cannot impose control over variables.
Electro Cardiogram (ECG) machine for monitoring the heart beat of a patient is a typical
example for this
The sensors used in ECG are the different Electrodes connected to the patient’s body
Measuring instruments like Digital CRO, Digital Multi meter, Logic Analyzer etc used
in Control & Instrumentation applications are also examples of embedded systems for
monitoring purpose
5. Control
Embedded systems with control functionalities are used for imposing control over some
variables according to the changes in input variables
Embedded system with control functionality contains both sensors and actuators
6
Introduction to Embedded Systems MODULE 1
Sensors are connected to the input port for capturing the changes in environmental
variable or measuring variable
The actuators connected to the output port are controlled according to the changes in
input variable to put an impact on the controlling variable to bring the controlled variable
to the specified range
Air conditioner for controlling room temperature is a typical example for embedded
system with Control functionality
Air conditioner contains a room temperature sensing element (sensor) which may be a
thermistor and a handheld unit for setting up (feeding) the desired temperature
The air compressor unit acts as the actuator. The compressor is controlled according to
the current room temperature and the desired temperature set by the end user.
6. Application Specific User Interface
Embedded systems which are designed for a specific application
Contains Application Specific User interface (rather than general standard UI) like key
board, Display units etc
Aimed at a specific target group of users
Mobile handsets, Control units in industrial applications etc are examples
7
Introduction to Embedded Systems MODULE 1
Microprocessor
A silicon chip representing a Central Processing Unit (CPU), which is capable of
performing arithmetic as well as logical operations according to a pre-defined set of
Instructions, which is specific to the manufacturer
In general, the CPU contains the Arithmetic and Logic Unit (ALU), Control Unit and
Working registers
Microprocessor is a dependant unit and it requires the combination of other hardware like
Memory, Timer Unit, and Interrupt Controller etc for proper functioning.
Intel claims the credit for developing the first Microprocessor unit Intel 4004, a 4 bit
processor which was released in Nov 1971
Developers of microprocessors.
Intel – Intel 4004 – November 1971(4-bit)
Intel – Intel 4040.
Intel – Intel 8008 – April 1972.
Intel – Intel 8080 – April 1974(8-bit).
Motorola – Motorola 6800.
Intel – Intel 8085 – 1976.
Zilog - Z80 – July 1976
Microcontroller:
A highly integrated silicon chip containing a CPU, scratch pad RAM, Special and General-
purpose Register Arrays, On Chip ROM/FLASH memory for program storage, Timer and
Interrupt control units and dedicated I/O ports
Microcontrollers can be considered as a super set of Microprocessors
Microcontroller can be general purpose (like Intel 8051, designed for generic applications
and domains) or application specific (Like Automotive AVR from Atmel Corporation.
Designed specifically for automotive applications)
Since a microcontroller contains all the necessary functional blocks for independent
working, they found greater place in the embedded domain in place of microprocessors
Microcontrollers are cheap, cost effective and are readily available in the market
Texas Instruments TMS 1000 is considered as the world‟s first microcontroller
8
Introduction to Embedded Systems MODULE 1
Microprocessor Vs Microcontroller
Microprocessor Microcontroller
A silicon chip representing a Central A microcontroller is a highly integrated chip
Processing Unit (CPU), which is capable of that contains a CPU, scratch pad RAM,
performing arithmetic as well as logical Special and General-purpose Register
operations according to a pre-defined set of Arrays, On Chip ROM/FLASH memory for
Instructions program storage, Timer and Interrupt control
units and dedicated I/O ports
It is a dependent unit. It requires the It is a self-contained unit and it doesn’t
combination of other chips like Timers, require external Interrupt Controller, Timer,
Program and data memory chips, Interrupt UART etc. for its functioning
controllers etc. for functioning
Most of the time general purpose in design Mostly application oriented or domain
and specific
operation
Doesn’t contains a built in I/O port. The I/O Most of the processors contain multiple
Port functionality needs to be implemented built-in I/O ports which can be operated as a
with the help of external Programmable single 8 or 16- or 32-bit Port or as individual
Peripheral Interface Chips like 8255 port pins
Targeted for high end market where Targeted for embedded market where
performance is important performance is not so critical (At present this
demarcation is invalid)
Limited power saving options compared to Includes lot of power saving features
microcontrollers
9
Introduction to Embedded Systems MODULE 1
The need for an ASIP arises when the traditional general purpose processor are unable to
meet the increasing application needs
Some Microcontrollers (like Automotive AVR, USB AVR from Atmel), System on Chips,
Digital Signal Processors etc are examples of Application Specific Instruction Set
Processors (ASIPs)
ASIPs incorporate a processor and on-chip peripherals, demanded by the application
requirement, program and data memory
10
Introduction to Embedded Systems MODULE 1
11
Introduction to Embedded Systems MODULE 1
Separate buses for Instruction and Data Single shared bus for Instruction and Data
fetching fetching
Easier to Pipeline, so high performance can Low performance Compared to Harvard
be achieved Architecture
Comparatively high cost Cheaper
No memory alignment problems Allows self modifying codes
Since data memory and program memory are Since data memory and program memory
stored physically in different locations, no are stored physically in same chip, chances
chances for accidental corruption of program for accidental corruption of program
memory memory
12
Introduction to Embedded Systems MODULE 1
The execute stage reads the operands, perform ALU operations and stores the result. In
conventional program execution, the fetch and decode operations are performed in sequence
During the decode operation the memory address bus is available and if it possible to
effectively utilize it for an instruction fetch, the processing speed can be increased
In its simplest form instruction pipelining refers to the overlapped execution of instructions
13
Introduction to Embedded Systems MODULE 1
Most of the ASICs are proprietary products. As a single chip, ASIC consumes very small
area in the total system and thereby helps in the design of smaller systems with high
capabilities/functionalities.
ASICs can be pre-fabricated for a special application or it can be custom fabricated by
using the components from a re-usable “building block‟ library of components for a
particular customer application
Fabrication of ASICs requires a non-refundable initial investment (Non-Recurring
Engineering (NRE) charges) for the process technology and configuration expenses
If the Non-Recurring Engineering Charges (NRE) is born by a third party and the
Application Specific Integrated Circuit (ASIC) is made openly available in the market, the
ASIC is referred as Application Specific Standard Product (ASSP)
The ASSP is marketed to multiple customers just as a general-purpose product, but to a
smaller number of customers since it is for a specific application.
Some ASICs are proprietary products, the developers are not interested in revealing the
internal details.
14
Introduction to Embedded Systems MODULE 1
CPLD:
A complex programmable logic device (CPLD) is a programmable logic device with
complexity between that of PALs and FPGAs, and architectural features of both.
CPLDs, by contrast, offer much smaller amounts of logic - up to about 10,000 gates.
CPLDs offer very predictable timing characteristics and are therefore ideal for critical
control applications.
CPLDs such as the Xilinx Cool Runner series also require extremely low amounts of
power and are very inexpensive, making them ideal for cost-sensitive, battery-operated,
portable applications such as mobile phones and digital handheld assistants.
Advantages of PLDs:
PLDs offer customer much more flexibility during design cycle
PLDSs do not require long lead times for prototype or production-the PLDs are already on
a distributor’s self and ready for shipment
PLDs do not require customers to pay for large NRE costs and purchase expensive mask
sets
15
Introduction to Embedded Systems MODULE 1
PLDs allow customers to order just the number of parts required when they need them.
allowing them to control inventory.
PLDs are reprogrammable even after a piece of equipment is shipped to a customer.
The manufacturers able to add new features or upgrade the PLD based products that are in
the field by uploading new programming file
Memory:
Memory is an important part of an embedded system. The memory used in embedded
system can be either Program Storage Memory (ROM) or Data memory (RAM)
16
Introduction to Embedded Systems MODULE 1
17
Introduction to Embedded Systems MODULE 1
In the high threshold mode, the supply voltage required to turn ON the transistor is
above the normal ROM IC operating voltage.
This ensures that the transistor is always off and the memory cell stores always logic 0.
The limitation with MROM based firmware storage is the inability to modify the device
firmware against firmware upgrades.
The MROM is permanent in bit storage, it is not possible to alter the bit information
18
Introduction to Embedded Systems MODULE 1
19
Introduction to Embedded Systems MODULE 1
20
Introduction to Embedded Systems MODULE 1
Sensor
A transducer device which converts energy from one form to another for any measurement
or control purpose. Sensors acts as input device
Eg. Hall Effect Sensor which measures the distance between the cushion and magnet in the
Smart Running shoes from adidas
Example: IR, humidity, PIR (passive infra-red), ultrasonic, piezoelectric, smoke sensors
Actuator
A form of transducer device (mechanical or electrical) which converts signals to
corresponding physical action (motion). Actuator acts as an output device
Eg. Micro motor actuator which adjusts the position of the cushioning element in the Smart
Running shoes from adidas
21
Introduction to Embedded Systems MODULE 1
Vcc
R
GND
22
Introduction to Embedded Systems MODULE 1
The LED Segments A to G and DP should be lit accordingly to display numbers and
characters
The 7 – segment LED displays are available in two different configurations, namely;
Common anode and Common cathode
In the Common anode configuration, the anodes of the 8 segments are connected commonly
whereas in the Common cathode configuration, the 8 LED segments share a common
cathode line
Based on the configuration of the 7 – segment LED unit, the LED segment anode or cathode
is connected to the Port of the processor/controller in the order “A‟ segment to the Least
significant port Pin and DP segment to the most significant Port Pin.
The current flow through each of the LED segments should be limited to the maximum
value supported by the LED display unit
The typical value for the current falls within the range of 20mA
The current through each segment can be limited by connecting a current limiting resistor
to the anode or cathode of each segment
23
Introduction to Embedded Systems MODULE 1
Unipolar: A unipolar stepper motor contains two windings per phase. The direction of
rotation (clockwise or anticlockwise) of a stepper motor is controlled by changing the
direction of current flow. Current in one direction flows through one coil and in the opposite
direction flows through the other coil. It is easy to shift the direction of rotation by just
switching the terminals to which the coils are connected
Bipolar: A bipolar stepper motor contains single winding per phase. For reversing the
motor rotation, the current flow through the windings is reversed dynamically. It requires
complex circuitry for current flow reversal
4.13. Keyboard
Keyboard is an input device for user interfacing.
If the number of keys required is very limited, push button switches-can be used and
they can be directly interfaced to the port pins for reading.
24
Introduction to Embedded Systems MODULE 1
However, there may be situations demanding a large number of keys for user input
(e.g. PDA device with alpha-numeric keypad for user data entry). In such situations it
may not be possible to interface each keys to a port pin due to the limitation in the
number of general purpose port pins available for the processor/controller in use and
moreover it is wastage of port pins.
Matrix keyboard is an optimum solution for handling large key requirements. It greatly
reduces the number of interface connections.
For example, for interfacing 16 keys, in the direct interfacing technique 16 port pins
are required, whereas in the matrix keyboard only 8 lines are required.
The 16 keys are arranged in a 4 column x 4 Row matrix. Figure illustrates the
connection of keys in a matrix keyboard.
In a matrix keyboard, the keys are arranged in matrix fashion (i.e. they are connected
in a row and column style). For detecting a key press, the keyboard uses the scanning
technique, where each row of the matrix is pulled low and the columns are read.
After reading the status of each columns corresponding to a row, the row is pulled high
and the next row is pulled low and the status of the columns are read. This process is
repeated until the scanning for all rows are completed. When a row is pulled low and
if a key connected to the row is pressed, reading the column to which the key is
connected will give logic 0.
Since keys are mechanical devices, there is a possibility for de-bounce issues, which
may give multiple key press effect for a single key press.
To prevent this, a proper key de-bouncing technique should be applied. Hardware key
de-bouncer circuits and software key de-bounce techniques are the key de- bouncing
techniques available.
The software key de-bouncing technique doesn't require any additional hardware and
is easy to implement. In the software de-bouncing technique, on detecting a key-press,
the key is read again after a de-bounce delay. If the key press is a genuine one, the
state of the key will remain as 'pressed' on the second read also.
Pull-up resistors are connected to the column lines to limit the current that flows to the
Row line on a key press.
25
Introduction to Embedded Systems MODULE 1
26
Introduction to Embedded Systems MODULE 1
The magnetic field attracts the armature core and moves the contact point.
The movement of the contact point changes the power/signal flow path.
The Relay is normally controlled using a relay driver circuit connected to the port pin of
the processor/controller
A transistor can be used as the relay driver. The transistor can be selected depending on the
relay driving current requirements.
Communication Interface
Communication interface is essential for communicating with various subsystems of the
embedded system and with the external world
The communication interface can be viewed in two different perspectives; namely;
1. Device/board level communication interface (Onboard Communication Interface)
2. Product level communication interface (External Communication Interface)
27
Introduction to Embedded Systems MODULE 1
28
Introduction to Embedded Systems MODULE 1
SDA
2.2K
Port Pins SCL
Slave 1
SCL I2C Device
Master SDA (Eg: Serial
(Microprocessor/ EEPROM)
Controller)
SCL Slave 2
SDA I2C Device
I2C Bus
29
Introduction to Embedded Systems MODULE 1
7. In normal data transfer, the data line only changes state when the clock is low.
8. Master waits for the acknowledgement bit from the slave device whose address is sent on
the bus along with the Read/Write operation command.
9. Slave devices connected to the bus compares the address received with the address assigned
to them
10. The Slave device with the address requested by the master device responds by sending an
acknowledge bit (Bit value =1) over the SDA line
11. Upon receiving the acknowledge bit, master sends the 8bit data to the slave device over
SDA line, if the requested operation is “Write to device‟.
12. If the requested operation is “Read from device‟, the slave device sends data to the master
over the SDA line.
13. Master waits for the acknowledgement bit from the device upon byte transfer complete for
a write operation and sends an acknowledge bit to the slave device for a read operation
14. Master terminates the transfer by pulling the SDA line “HIGH‟ when the clock line SCL
is at logic “HIGH‟ (Indicating the “STOP‟ condition).
30
Introduction to Embedded Systems MODULE 1
31
Introduction to Embedded Systems MODULE 1
32
Introduction to Embedded Systems MODULE 1
UART based serial data transmission doesn’t require a clock signal to synchronize the
transmitting end and receiving end for transmission. Instead it relies upon the pre-defined
agreement between the transmitting device and receiving device.
The serial communication settings (Baud rate, number of bits per byte. parity, number of
start bits and stop bit and flow control) for both transmitter and receiver should be set as
identical. The start and stop of communication is indicated through inserting special bits in
the data stream. While sending a byte of data, a start bit is added first and a stop bit is added
at the end of the bit stream.
The least significant bit of the data byte follows the ‘start’ bit.
The ‘start’ bit informs the receiver that a data byte is about to arrive.
The receiver device starts polling its received line’ as per the baud rate settings.
If the baud rate is ‘x’ bits per second, the time slot available for one bit is l /x seconds. The
receiver unit polls the receiver line at exactly half of the time slot available for the bit.
If parity is enabled for communication, the UART of the transmitting device adds a parity
bit (bit value is l for odd number of ls in the transmitted bit stream and 0 for even number
of is the UART of the receiving device calculates the parity of the bits received and
compares it with the received parity bit for error checking.
The UART of the receiving device discards the ‘Start’, ‘Stop’ and ‘Parity' bit from the
received bit stream and converts the received serial bit data to a word (In the case of 8
bits/byte, the byte is formed with the received 8 bits with the first received bit as the LSB
and last received data bit as MSB).
For proper communication, the ‘Transmit line’ of the sending device should be connected
to the ‘Receive line’ of the receiving device. Figure illustrates the same.
In addition to the serial data transmission function, UART provides hardware handshake
receiver support for controlling the serial data now. UART chips are available from
33
Introduction to Embedded Systems MODULE 1
Every 1-wire device contains a globally unique 64bit identification number stored within
it. The unique identification number can be used for addressing individual devices present
on the bus in case there are multiple slave devices connected to the 1-wire bus.
The identifier has three parts: an 8bit family code, a 48bit serial number and an 8-bit CRC
computed from the first 56 bits.
The sequence of operation for communicating with a 1-wire slave device is listed below:
1. The master device sends a ‘Reset’ pulse on the l-wire bus.
34
Introduction to Embedded Systems MODULE 1
2. The slave device(s) present on the bus respond with a ‘Presence’ pulse.
3. The master device sends a ROM command (Net Address Command followed by the
64bit address of the device). This addresses the slave device(s) to which it wants to initiate
a communication.
4. The master device sends a read/write function command to read/write the internal
memory or register of the slave device.
5. The master initiates a Read data/Write data from the device or to the device
All communication over the l-wire bus is master initiated. The communication over the l-
wire bus divided into timeslots of 60 microseconds. The ‘Reset’ pulse occupies 8 time slots.
For starting a communication, the master asserts the reset pulse by pulling the 1-wire bus
‘LOW’ for at least 8 time slots ‘slave’ device is present on the bus and is ready for
communication it should respond to the master with a ‘Presence’ pulse, within 60us of the
release of the ‘Reset’ pulse by the master.
The slave device(s) responds with a ‘Presence’ pulse by pulling the l-wire bus ‘LOW’ for
a minimum of 1 time slot (60 us).
For writing a bit value of 1 on the l-wire bus, the bus master pulls the bus for l to l5µs and
then releases the bus for the rest of the time slot. A bit value of ‘0’ is written on the bus by
master pulling the bus for a minimum of 1 time slot (60µs) and a maximum of 2 time slots
(120µs). To Read a bit from the slave device, the master pulls the bus ‘LOW’ for l to 15us.
If the slave wants to send a bit value ‘1’ in response to the read request from the master, it
simply releases the bus for the rest of the time slot. If the slave wants to send a bit value
‘0’, it pulls the bus ‘LOW’ for the rest of the time slot.
Parallel interface
The on-board parallel interface is normal used for communicating with peripheral devices
which are memory mapped to the host of the system.
The host processor/controller of the embedded system contains a parallel bus and the device
which supports parallel bus can directly connect to this bus system.
The communication through the parallel bus is controlled by the control signal interface
between the device and the host.
The ‘Control Signals’ for communication includes ‘Read/ Write’ signal and device select
signal. The device normally contains a device select line and the device becomes active
only when this line is asserted by the host processor.
35
Introduction to Embedded Systems MODULE 1
The direction of data transfer (Host to Device or Device to Host) can be controlled through
the control signal lines for ‘Read’ and ‘Write’. Only the host processor has control over the
‘Read’ and ‘Write’ control signals.
The device is normally memory mapped to the host processor and a range of address is
assigned to it. An address decoder circuit is used for generating the chip select signal for
the device.
When the address selected by the processor is within the range assigned for the device, the
decoder circuit activates the chip select line and thereby the device becomes active.
The processor then can read or write from or to the device by asserting the corresponding
control line (RD and WR respectively). Strict timing characteristics are followed for
parallel communication.
parallel communication is host processor initiated.
If a device wants to initiate the communication, it can inform the same to the processor
through interrupts. For this, the interrupt line of the device is connected to the interrupt line
of the processor and the core, responding interrupt is enabled in the host processor. The
width of the parallel interbank is determined by the data bus width of the host processor. It
can be 4bit, 8bit, 16bit, 32bit or 64bit etc. The bus width supported by the device should be
same as that of the host processor.
The bus interface diagram shown in Figure illustrates the interfacing of devices through
parallel interface.
36
Introduction to Embedded Systems MODULE 1
RS-232C:
RS-232 C (Recommended Standard number 232, revision C from the Electronic Industry
Association) is a legacy, full duplex, wired, asynchronous serial communication interface
RS-232 extends the UART communication signals for external data communication.
UART uses the standard TTL/CMOS logic (Logic “High‟ corresponds to bit value 1 and
Logic “LOW‟ corresponds to bit value 0) for bit transmission whereas RS232 use the EIA
standard for bit transmission.
As per EIA standard, a logic “0‟ is represented with voltage between +3 and +25V and a
logic “1‟ is represented with voltage between -3 and -25V.
In EIA standard, logic “0‟ is known as “Space‟ and logic “1‟ as “Mark‟.
The RS232 interface define various handshaking and control signals for communication
apart from the “Transmit‟ and “Receive‟ signal lines for data communication
RS-232 supports two different types of connectors, namely; DB-9: 9-Pin connector and
DB-25: 25-Pin connector.
37
Introduction to Embedded Systems MODULE 1
The RXD pin of DCE should be connected to the TXD pin of DTE and vice versa for proper
data transmission.
If hardware data flow control is required for serial transmission, various control signal lines
of the RS-232 connection are used appropriately.
The control signals are implemented mainly for modem communication and some of them
may be irrelevant for other type of devices.
The Request to Send (RTS) and Clear To Send (CTS) signals co-ordinate the
communication between DTE and DCE.
Whenever the DTE has a data to send, it activates the RTS line and if the DCE is ready to
accept the data, it activates the CTS line.
The Data Terminal Ready (DTR) signal is activated by DTE when it is ready to accept data.
The Data Set Ready (DSR) is activated by DCE when it is ready for establishing a
communication link.
DTR should be in the activated state before the activation of DSR.
The Data Carrier Detect (DCD) is used by the DCE to indicate the DTE that a good signal
is being received.
Ring Indicator (RI) is a modem specific signal line for indicating an incoming call on the
telephone line.
As per the EIA standard RS-232 C supports baudrates up to 20Kbps (Upper limit
19.2Kbps).
The commonly used baudrates by devices are 300bps, 1200bps, 2400bps, 9600bps,
11.52Kbps and 19.2Kbps.
The maximum operating distance supported in RS-232 communication is 50 feet at the
highest supported baudrate.
Embedded devices contain a UART for serial communication and they generate signal
levels conforming to TTL/CMOS logic.
A level translator IC like MAX 232 from Maxim Dallas semiconductor is used for
converting the signal lines from the UART to RS-232 signal lines for communication.
On the receiving side the received data is converted back to digital logic level by a converter
IC.
38
Introduction to Embedded Systems MODULE 1
The first version of USB (USB1.0) was released in 1995 and was created by the USB core
group members consisting of Intel, Microsoft, IBM, Compaq, Digital and Northern
Telecom.
The USB communication system follows a star topology with a USB host at the center and
one or more USB peripheral devices/USB hosts connected to it.
A USB host can support connections up to 127, including slave peripheral devices and other
USB hosts. Figure illustrates the star topology for USB device connection.
USB transmits data in packet format. Each data packet has a standard format. The USB
communication is a host initiated one.
The USB host contains a host controller which is responsible for controlling the data
communication, including establishing connectivity with USB slave devices, packetizing
and formatting the data.
There are different standards for implementing the USB Host Control interface; namely
Open Host Control Interface (OHCI) and Universal Host Control Interface (UHCI).
USB uses differential signals for data transmission. It improves the noise immunity.
USB interface has the ability to supply power to the connecting devices. Two connection
lines (Ground and Power) of the USB interface are dedicated for carrying power. It can
supply power up to 500 mA at 5 V. It is sufficient to operate low power devices. Mini and
Micro USB connectors are available for small form factor devices like portable media
players.
The pin details for connectors are listed below:
39
Introduction to Embedded Systems MODULE 1
Each USB device contains a Product ID (PID) and a Vendor ID (VID). The PID and VID
are embedded into the USB chip by the USB device manufacturer. The VID for a device is
supplied by the USB standards forum. PID and VID are essential for loading the drivers
corresponding to a USB device for communication.
USB supports four different types of data transfers, namely; Control, Bulk, Isochronous
and Interrupt.
Control transfer is used by USB system software to query, configure and issue commands
to the USB device.
Bulk transfer is used for sending a block of data to a device. Bulk transfer supports error
checking and correction. Transferring data to a printer is an example for bulk transfer.
Isochronous data transfer is used for real-time data communication. In Isochronous transfer,
data is transmitted as streams in real-time. Isochronous transfer doesn’t support error
checking and re-transmission of data in case of any transmission loss. All streaming devices
like audio devices and medical equipment for data collection make use of the isochronous
transfer.
Interrupt transfer is used for transferring small amount of data. Interrupt transfer
mechanism makes use of polling technique to see whether the USB device has any data to
send. The frequency of polling is determined by the USB device and it varies from 1 to 255
milliseconds. Devices like Mouse and Keyboard, which transmits fewer amounts of data,
uses interrupt transfer.
40
Introduction to Embedded Systems MODULE 1
LLINK is the 1394 implementation from Sony Corporation (www.sony.netl and Lynx is
the implementation from Texas Instruments www.ti.com).
1394 supports peer-to-peer connection and point-to-multipoint communication allowing 63
devices to be connected on the bus in a nee topology.
1394 is a wired serial interface and it can support a cable length of up to 15 feet for
interconnection.
The 1394 standard has evolved a lot from the first version IEEE 1394-1995 released in
1995 to the recent version IEEE 1394-2008 released in June 2008. The 1394 standard
supports a data rate of 400 to 3200Mbits/second.
The IEEE 1394 uses differential data transfer (The information is sent using differential
signals through a pair of twisted cables. It increases the noise immunity) and the interface
cable supports 3 types of connectors, namely; 4-pin connector, 6-pin connector (alpha
connector) and 9 pin connectors (beta connector).
The 6 and 9 pin connectors carry power also to support external devices (In case an
embedded device is connected to a PC through an IEEE 1394 cable with 6 or 9 pin
connector interface, it can operate from the power available through the connector.) It can
supply unregulated power in the range of 24 to 30V.
(The Apple implementation is for battery operated devices and it can supply a voltage in the
range 9 to 12V.)
The table given below illustrates the pin details for 4, 6 and 9 pin connectors.
Pin Pin No: Pin No: Pin No: Description
Name (4 Pin (6 Pin (9 Pin
Connector) Connector) Connector)
41
Introduction to Embedded Systems MODULE 1
NC 7 No connection
There are two differential data transfer lines A and B per connector. In a 1394 cable,
normally the differential lines of A are connected to B (TPA+ to TPB+ and TPA-to TPB~)
and vice versa.
1394 is a popular communication interface for connecting embedded devices like Digital
Camera, Camcorder, and Scanners to desktop computers for data transfer and storage.
Unlike USB interface (Except USB OTG), IEEE 1394 doesn‘t require a host for
communicating between devices.
For example, you can directly connect a scanner with a printer for printing. The data rate
supported by 1394 is far higher than the one supported by USB2.0 interface.
The 1394 hardware implementation is much costlier than USB implementation.
INFRARED:
Infrared is a certain region in the light spectrum
Ranges from .7μ to 1000μ or .1mm
Broken into near, mid, and far infrared
One step up on the light spectrum from visible light
Measure of heat
42
Introduction to Embedded Systems MODULE 1
Most of the thermal radiation emitted by objects near room temperature is infrared. Infrared
radiation is used in industrial, scientific, and medical applications. Night-vision devices using
active near-infrared illumination allow people or animals to be observed without the observer
being detected.
IR transmission:
The transmitter of an IR LED inside its circuit, which emits infrared light for every electric
pulse given to it. This pulse is generated as a button on the remote is pressed, thus completing
the circuit, providing bias to the LED.
The LED on being biased emits light of the wavelength of 940nm as a series of pulses,
corresponding to the button pressed. However, since along with the IR LED many other sources
of infrared light such as us human beings, light bulbs, sun, etc, the transmitted information can
be interfered. A solution to this problem is by modulation. The transmitted signal is modulated
using a carrier frequency of 38 KHz (or any other frequency between 36 to 46 KHz). The IR
LED is made to oscillate at this frequency for the time duration of the pulse. The information
or the light signals are pulse width modulated and are contained in the 38 KHz frequency.
IR supports data rates ranging from 9600bits/second to 16Mbps
Serial infrared: 9600bps to 115.2 kbps
Medium infrared: 0.576Mbps to 1.152 Mbps
Fast infrared: 4Mbps
43
Introduction to Embedded Systems MODULE 1
Bluetooth:
Bluetooth is a wireless technology standard for short distances (using short-wavelength
UHF band from 2.4 to 2.485 GHz) for exchanging data over radio waves in the ISM and
mobile devices, and building personal area networks (PANs).
Invented by telecom vendor Ericsson in 1994, it was originally conceived as a wireless
alternative to RS- 232 data cables.
Bluetooth uses a radio technology called frequency- hopping spread spectrum. Bluetooth
divides transmitted data into packets, and transmits each packet on one of 79 designated
Bluetooth channels. Each channel has a bandwidth of 1 MHz. It usually performs 800 hops
per second, with Adaptive Frequency-Hopping (AFH) enabled
Originally, Gaussian frequency-shift keying (GFSK) modulation was the only modulation
scheme available. Since the introduction of Bluetooth 2.0+EDR, π/4-DQPSK (Differential
Quadrature Phase Shift Keying) and 8DPSK modulation may also be used between
compatible devices.
Bluetooth is a packet-based protocol with a master- slave structure. One master may
communicate with up to seven slaves in a piconet. All devices share the master's clock.
Packet exchange is based on the basic clock, defined by the master, which ticks at 312.5 μs
intervals.
A master BR/EDR Bluetooth device can communicate with a maximum of seven devices
in a piconet (an ad-hoc computer network using Bluetooth technology), though not all
devices reach this maximum.
The devices can switch roles, by agreement, and the slave can become the master (for
example, a headset initiating a connection to a phone necessarily begins as master—as
initiator of the connection—but may subsequently operate as slave).
Wi-Fi:
Wi-Fi is the name of a popular wireless networking technology that uses radio waves to
provide wireless high-speed Internet and network connections
Wi-Fi follows the IEEE 802.11 standard
Wi-Fi is intended for network communication and it supports Internet Protocol (IP) based
communication
Wi-Fi based communications require an intermediate agent called Wi-Fi router/Wireless
Access point to manage the communications.
44
Introduction to Embedded Systems MODULE 1
The Wi-Fi router is responsible for restricting the access to a network, assigning IP address
to devices on the network, routing data packets to the intended devices on the network.
Wi-Fi enabled devices contain a wireless adaptor for transmitting and receiving data in the
form of radio signals through an antenna.
Wi-Fi operates at 2.4GHZ or 5GHZ of radio spectrum and they co-exist with other ISM
band devices like Bluetooth.
A Wi-Fi network is identified with a Service Set Identifier (SSID). A Wi-Fi device can
connect to a network by selecting the SSID of the network and by providing the credentials
if the network is security enabled
Wi-Fi networks implements different security mechanisms for authentication and data
transfer.
45
Introduction to Embedded Systems MODULE 1
Wireless Equivalency Protocol (WEP), Wireless Protected Access (WPA) etc are some of
the security mechanisms supported by Wi-Fi networks in data communication.
ZIGBEE:
Zigbee is an IEEE 802.15.4-based specification for a suite of high- level communication
protocols used to create personal area networks with small, low-power digital radios, such
as for home automation, medical device data collection, and other low-power low-
bandwidth needs, designed for small scale projects which need wireless connection. Hence,
ZigBee is a low-power, low data rate, and close proximity (i.e., personal area) wireless ad
hoc network.
The technology defined by the ZigBee specification is intended to be simpler and less
expensive than other wireless personal area networks (WPANs), such as Bluetooth or Wi-
Fi .
Applications include wireless light switches, electrical meters with in-home-displays,
traffic management systems, and other consumer and industrial equipment that require
short-range low- rate wireless data transfer.
Its low power consumption limits transmission distances to 10– 100 meters line-of-sight,
depending on power output and environmental characteristics.
Zigbee devices can transmit data over long distances by passing data through a mesh
network of intermediate devices to reach more distant ones.
46
Introduction to Embedded Systems MODULE 1
Zigbee Coordinator: The ZigBee coordinator acts as the root of the ZigBee network. The
ZC is responsible for initiating the Zigbee network and it has the capability to store
information about the network.
Zigbee Router: Responsible for passing information from device to another device or to
another ZR.
Zigbee end device: End device containing ZigBee functionality for data communication. It
can talk only with a ZR or ZC and doesn’t have the capability to act as a mediator for
transferring data from one device to another.
Zigbee supports an operating distance of up to 100 metres at a data rate of 20 to 250 Kbps
47
Introduction to Embedded Systems MODULE 1
Instant messaging and presence-wireless village Internet applications for smart devices
through wireless application protocol (WAP).
Point-to-point (P2P) service: inter-networking with the Internet (IP).
Point-to-multipoint (P2M) service]: point-to- multipoint multicast and point-to-
multipoint group calls.
Embedded Firmware
The control algorithm (Program instructions) and or the configuration settings that an
embedded system developer dumps into the code (Program) memory of the embedded system
The embedded firmware can be developed in various methods like
1. Write the program in high level languages like Embedded C/C++ using an Integrated
Development Environment (The IDE will contain an editor, compiler, linker, debugger,
simulator ) etc. IDEs (Keil) are different for different family of processors/controllers.
2. Write the program in Assembly Language using the Instructions Supported by your
application’s target processor/controller
48
Introduction to Embedded Systems MODULE 1
The reset signal can be either active high (The processor undergoes reset when the reset
pin of the processor is at logic high) or active low (The processor undergoes reset when
the reset pin of the processor is at logic low).
R1
V BE
R2
Q
Reset Pulse
DZ Active Low
Vz
R3
GND
3. Oscillator Unit
A microprocessor/microcontroller is a digital device made up of digital combinational
and sequential circuits.
The instruction execution of a microprocessor/controller occurs in sync with a clock
signal. The oscillator unit of the embedded system is responsible for generating the
precise clock for the processor.
Quartz crystal Oscillators are example for clock pulse generating devices
49
Introduction to Embedded Systems MODULE 1
50
Introduction to Embedded Systems MODULE 1
Microoprocessor/
Controller
Watchdog
Free Running
Reset Pin
Counter
Watchdog Reset
System Clock
51
Introduction to Embedded Systems MODULE 1
POSSIBLE QUESTIONS
52
Introduction to Embedded Systems MODULE 1
29. Explain Load Store Operation & Instruction Pipelining with diagram
30. Explain PLD and its types. Mention advantages of PLD
31. Explain Program Storage Memory (ROM) in detail
32. Explain Read-Write Memory/Random Access Memory (RAM) in detail
33. Differentiate between SRAM and DRAM
34. Explain sensors and actuators
35. Explain any four I/O subsystem of the embedded system with neat diagram
36. Define communication interface. Explain two prospective of communication interface
37. Explain any four onboard communication interfaces
38. Explain any four external wired communication interfaces
39. Explain any four external wireless communication interfaces
40. Explain any three other system components with neat diagram
53