Professional Documents
Culture Documents
The Typical Embedded System: B.Thirupathi
The Typical Embedded System: B.Thirupathi
B.THIRUPATHI.
Definition
Memory
Communication Interface
Embedded Firmware
2
Topics to be covered:
Definition
Embedded systems vs. General Computing Systems
Memory
Communication Interface
Embedded Firmware
3
Definition
Embedded System:
for specific application or domain, whose applications ranges from simple toy
Definition
Memory
Communication Interface
Embedded Firmware
Contains general purpose Operating System (GPOS) May or may not contain Operating System
Applications are alterable (programmable) by the The firmware of the embedded system is pre-
users.(It is possible for end users to re-install O S , also programmed and it is non-alterable by the end
add/remove user applications) user
Less/not at all tailored towards reduced operating Highly tailored to take advantage of the power
power requirements, options for different levels of saving modes supported by all hardware and the
power management. operating system
Response requirements are not time critical For certain category of Embedded systems like
mission critical systems, the response is time
critical
Need not be Deterministic in execution behavior Execution behavior is deterministic for certain
types of embedded systems like ‘Hard Real time
systems’
Definition
Communication Interface
Embedded Firmware
Memory Communication
Interfaces
Other supporting
ICs & Subsystems
Embedded System
Real
The Typical Embedded System World
Microprocessor Microcontroller
A silicon chip representing a Central Processing A highly integrated chip that contains a CPU,
Unit (CPU) which is capable of performing arithmetic Scratchpad RAM, Special and general purpose
as well as logical operations according to a predefined register arrays, on chip ROM / Flash memory for
set of instructions program storage, timer and interrupt control unit
and dedicated IO ports
It is dependent unit. It requires the combination of It is self contained unit and it doesn't require
other chips like timers. Program and data memory external interrupt control unit, timers, UART etc,
chips, interrupt controller etc. for functioning for functioning
Most of the time general purpose in design and Mostly application oriented and domain specific
operation
Doesn’t contain built in I/O port. I/O port Most of the processors contain multiple built in
functionally needs to be implemented with the help I/O ports which can be operated as a single
of external programmable peripheral interface chips 8/16/32 bit port or individual port pin.
like 8255
Targeted for high end market where performance is Targeted for embedded market where
important performance is not so critical.(at present, it is
invalid)
Limited power saving options compared to Includes lot of power saving features
microcontroller
2 to 3 times faster than General purpose Processors (architectural difference between the two)
In general DSP can be viewed as a microchip designed for performing high speed computational
operations for addition, subtraction multiplication and division.
I/O unit: acts as an interface between the outside world and DSP. It is responsible for capturing signals
to be processed and delivering the processed signals.
Audio, Video signal processing, telecommunication and multimedia applications are typical examples.
Involves Real time operations like Su m of Products(SoP), Convolution, FFT, DFT etc.
A large number of Registers are available. Limited number of general purpose registers.
Programmer needs to write more code to execute a Instructions are like macros in C language. A
task since the instructions are simpler ones programmer can achieve desired functionality
with a single instruction which in turn provides
the effect of using more number of instructions
in R I S C
Separate buses for instruction and Data fetching Single shared bus for instruction and data
fetching
Since data memory and program memory are Since data memory and program memory are
stored physically in different locations, no stored physically in same location there is
chances for accidental corruption of program chance for accidental corruption of program
memory memory
Let us consider a 4 bytes long integer Byte 0, Byte 1, Byte 2 and Byte 3
Base Address + 0 BYTE 0 0x2000 (Base Address) Base Address + 0 BYTE 3 0x2000 (Base Address)
Base Address + 1
BYTE 1 0x2001 (Base Address + 1) Base Address + 1
BYTE 2 0x2001 (Base Address + 1)
Base Address + 2 BYTE 2 0x2002 (Base Address + 2) Base Address + 2 BYTE 1 0x2002 (Base Address + 2)
Base Address + 3
BYTE 3 0x2003 (Base Address + 3) Base Address + 3
BYTE 0 0x2003 (Base Address + 3)
Lower-order byte of data is stored in memory at Lower-order byte of data is stored in memory at
lower address higher address
Higher-order byte of data is stored in memory at Higher-order byte of data is stored in memory at
higher address lower address
R1 R2 R3 4. store R3,z
00 x
7F ALU
23 y
z
Fetch Execute
Fetch Execute
Fetch Execute
Fetch Execute
1 2 3 4 5 6 7 8
Integrated several functions into a single chip and there by reducing system development cost. Most
As a single chip AS IC consumes a very small area in total system and thereby help to design smaller
Can be pre-fabricated for a special application or it can be custom fabricated by using components
from a re-usable “building blocks” library of components for a particular customer application.
AS I C based systems are profitable only for large volume commercial products.
Production of ASI C requires a non-refundable initial investment for the process technology and
If N RE is borne by Third Party and AS IC is made openly available in the market, ASI C is
referred as Application Specific Standard Product (ASSP)
Disadvantages: Since ASICs are proprietary products, the developers of such chips may
not be interested in revealing the internal details of it, hence it is very difficult to point out
example of it.
It creates legal disputes if an illustration of such an AS IC product is given without prior
With PLDs, designers use inexpensive software tools to quickly develop, simulate and test their
designs.
Design can be quickly programmed into a device and immediately tested in a live circuit.
There are no N RE costs and the final design is completed much faster than that of a custom, fixed
logic devices.
Key Benefit: During design phase customers can change the circuitry as often as they want until design
operates to their satisfaction.
PLD are based on re-writable memory technology. Once design is final, customers can go into
immediate production by simply programming as many PLDs as they need with final S/W design file.
Advanced FPGAs also provides hardwired processors, substantial amount of memory, clock
Are used in wide variety of applications ranging from data processing and storage, instrumentation,
But offer very predictable timing characteristics and are ideal for critical control applications
Also requires low amount of power and very inexpensive, hence ideal for cost sensitive, battery
• PLD offers customers to order just no. of parts they need, when they need them, allowing them to
control inventory. Fixed PLDs customers end up either with excess inventory or caught short of
parts which delays production.
Few years ago largest FPGA measured is 10s thousands of system gates and operated at 40Mhz.
Currently million of gates with integrated functionality like Processors and memory, operating at 300MHz
Assignment Q2: Which is the largest FPGA currently available in market and
what is its operating frequency?
components.
May be developed around a general purpose/ domain specific/ ASIC/ PLD
Typical examples - remote controlled toy car unit including the R F circuitry part, high performance
and high frequency microwave electronics, high bandwidth ADC, devices and components for operation
at very high temperature, electro-optic IR imaging arrays, UV/IR detectors etc.
Readily available in market, cheap and a developer can cut down his/her development time to a great
TCP/IP plug in module available from various manufacturers like WIZnet, Freescale, Dynalog etc. are
You have to identify C OT S for your system and give plug-in option on your board
Though multiple vendors supply C OT S for same application there is no operational and manufacturing
standards
C OT S manufactured by a vendor need not be having hardware plug-in and firmware compatibility with
technology occurs.
The Typical Embedded System
Definition
Memory
Sensors and Actuators
Communication Interface
Embedded Firmware
On-Chip Memory and Off-chip Memory Volatile Memory and Non Volatile Memory
Code
FLASH Memory NVRAM
(ROM)
Low cost , good for storing Firmware for low cost embedded devices.
Once the design is proven and tested, the binary data corresponding to it can
be given to M RO M Fabricator
for erasing process, it needs to be taken out of circuit board and put in a UV eraser device
for 20-30 mins, which is tedious and time consuming
F L ASH Latest RO M
Variation of EEP RO M
combines flexibility of E E P RO M + High capacity of Standard RO M .
organized as sectors(blocks) or pages.
stores information in an array of floating gate M O S F E T transistors.
memory can be erased at sector/page level without erasing other sectors
each page/sector must be erased before reprogramming, typical erase cycles is 1000 cycles
Data
Memory
(RAM)
in simple form SRAM is a 2 Cross-coupled inverters with read/write control through transistor.
access to memory cell is controlled by word line
for writing, desired value is applied to bit line controller. i.e. for 1, B=1 and B’=0
for 0, B=0 and B’=1
for reading, both the bit lines are asserted/set as 1 and word line is set to 1
S RA M DRAM
made up of 6 C M O S transistors (MOSFETs) made up of a M O S F E T and capacitor
Memory Shadowing
Advantage Limitation
RO M access speed is very slow compared to ROM Non Volatile Slower
RAM
Basic I/P O/P configuration ROM or BIOS stores hardware configuration information
like address of various ports.
Now manufactures include RAM behind BIOS at its same address, as a shadow BIOS
First step during Boot up is copying of BIOS to shadowed RAM and write protecting
this RAM and disabling BIOS
if made up of S o c / M C , on-chip memory may be enough, if not must be interfaced with external/off-
chip memory
ROM + RAM to execute program code, for RTO S based embedded system extra RAM is required for
Memory Shadowing
Memory Chip Size available in standard size like 512/1024 bytes (1Kb, 2Kb, 4Kb, 8Kb, 1Gb, 2Gb,
4Gb, 8Gb)
suppose memory required is 740 bytes, 1Kb chip can be selected
word siz e no. of bits that can be accessed simultaneously, word size <==> bus size
Definition
Memory
Embedded Firmware
Common Anode
Co mmon Cathode
36
Sensors and Actuators
Bipolar Stepper Motor
single winding per phase
2 L H H L
3 L L H H
4 H L L H
2 L H L L Step A B C D
1 H H L L
3 L L H L
2 H L L L
4 L L L H
3 L H H L
4 L H L L
5 L L H H
6 L L H L
Half Step:
7 H L L H
Combination of full step and wave step
8 L L L H
current requirement for stepper motor is little high, hence port pin of MP / MC may not
be able to drive stepper motor, normally requires 5v-24v supply voltage
therefore special circuits are required to interface stepper motor to MP/MC=> COTS->
ULN2803
39
Sensors and Actuators
Relay:
electro-mechanical device
dynamic path selector for signals and power
made up of 2 components:
Relay coil made up of insulated wire wound over a metal core
Metal armature with one or more contacts
works on electromagnetic principle
when voltage is applied to relay coil, current flows through the coil which generates
magnetic field, this magnetic field attracts/reflects armature and moves the contact
point
2 configurations single core and single throw only 1 path for information flow
single core and double throw 2 paths for information flow and selected by
energizing and de-energizing the coil
40
Sensors and Actuators
normally controlled using a relay driver circuit connected to the port pins of MP /M C
special relays Reeds are available for embedded applications for switching low
voltage D C signals
41
Sensors and Actuators
Piezo-buzzer:
piezo-electric device for generation of audio indication in embedded applications
42
Sensors and Actuators
Push t o m a ke switch is normally open
makes contact when pushed or pressed
remains in the closed state unless it is released
when released breaks connection
43
Sensors and Actuators
Keyboard:
input device
if keys required is very less, push buttons can be directly interfaced to port pins
if large number of keys are required for user inputs then it is not possible to interface
all the keys, also it will be wastage of port pins
44
Sensors and Actuators
Detecting a Key pressed:
Scanning Technique
each row of matrix is pulled low and column is read
after reading status of each column corresponding o a row, that row is pulled high and next row is
pulled low and process is repeated unless all the rows are checked
when row is pulled low and a key connected to that is pressed then
when status of column is read, it gives logic 0
Disadvantage: keys are mechanical therefore suffer from
MP/MC provides limited number of I/O port pins, in some cases there may be need for
more number of I/O pins than that is supported by MP / MC
Definition
Memory
Communication Interface
Embedded Firmware
2 prospective:
Device/Board level on-board Communication Interfaces
Product level External Communication Interfaces
48
Communication Interface
On-board Communication Interfaces
Inter Integrated Circuit (I2C) Bus:
Device Master/Slave
The Typical Embedded System
49
Communication Interface
Master controls communication by initiating/terminating data transfer, it sends
data, generates synchronous clock pulse
Slave waits for the commands from Master and responds on receiving the commands
50
Communication Interface
Sequence of operations for communicating between Master & Slave:
Therefore: S C L HIGH
START Condition for data transfer
SDA LOW
51
Communication Interface
slave device with address requested by the master responds by sending
acknowledgement (Bit value 1) over S DA line
upon receiving acknowledgement bit master device sends 8 bits data to slave device
over S DA line if requested operation is ‘WRITE to device’ else
if requested operation is ‘READ from device’ then slave device sends data to master
over S DA line.
Therefore: S C L HIG H
STOP Condition for data transfer
SDA HIG H
52
Communication Interface
I2C supports different data rates:
4 wires:
53
Communication Interface
Master generates Clock Pulses
selects the slave device by asserting the slave selecting signal low
Master Slave
1 0 0 1 0 1 1 0 MOSI 1 0 0 1 0 1 1 0
0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1
MISO
therefore Shift registers of Master & Slave form a
Circular buffer
The Typical Embedded System
54
Communication Interface
master and slave devices contains a special shift registers for data transfer. Size of
the shift register is device dependent, normally it is multiple of 8
55
Communication Interface
Start bits inform receiver that a data byte is about to arrive
If baud rate is x bps, time slot for each bit is 1/x seconds. For example if baudrate is
5 then 1/5 seconds.
1/5 (1000) ms = 200ms
UART on receiver device calculates the parity of bits received and compares it with
parity bit for error checking
UART on receiver device discards the ‘Start’, ’Stop’ and ‘Parity’ bits from received
bit stream and converts the received signal bits into words
56
Communication Interface
UART chips are available from different semiconductor manufacturers but National
Semiconductor’s 8250 UART is considered to be standard
Now a days most of the MP / MC are available with integrated UART functionality and
they provide built-in instructions to support serial data transmission and reception
1 wire Interface:
57
Communication Interface
Every 1-wire device contains a globally unique 64 bits identification number. This
UIN can be used for addressing individual devices on bus.
58
Communication Interface
Communication over 1-wire bus is divided into time slots of 60µsecs
For starting the communication, master asserts the Reset pulse by pulling 1-wire bus
Low for at least 8 time slots
If slave devices are present on bus and is ready for communication, should respond
with ‘Presence’ pulse within 60µsecs of reset pulse
For writing a bit value 1, master pulls the bus LOW for 1-15µsecs and releases for the
rest of the time slots.
59
Communication Interface
Parallel Interface:
for communicating with peripheral devices which are memory mapped to host system
the host MP/ MC of Embedded system contains a parallel bus & devices can be
directly connected to this bus
c om munication through parallel bus is c ontrolled by C ontrol Interface
Signal between device and host.
Control Signals:
Device Select signal device activates only when this signal is asserted
60
Communication Interface
the processor can then read/write from/to the device by asserting RD/WR’ control
lines
61
Communication Interface
External Communication Interfaces
R S 232C & R S 485:
the R X D pin of D C E must be connected to T XD pin of DTE and vice versa for
proper communication
Request to send (RTS) and Clear to send (CTS) coordinate the communication
between DTE and D C E
DTE ----------------------------- D C E
DTE -----------------------------DCE
DTE activates Data Terminal Ready (DTR) if ready to accept
D C E activates Data S et Ready (DSR) when it wants to send data
As per EIA R S 232 supports Baud rate upto 20Kbps
Commonly used Baud rates are 300bps, 1200 bps, 2400 bps, 9600 bps,
11.52 kbps, 19.2 kbps
The Typical Embedded System
63
Communication Interface
distance supported is 50 feet with full speed
RS 232 supports only point to point communication and not suited for multiple
drop communication
more susceptible to noise, reduced operating distance
RS 422 supports data rates upto 100 Kbps and distance of 400 ft
Same R S 232 is used at device end R S 232 – RS422 converter is plugged-in and
at the receiver end R S 422 to R S 232 converter is used
RS 422 supports multi drop communication with one transmitter and upto 10
receivers
64
Communication Interface
Universal Serial Bus (USB):
first version USB 1.0 was released in 1995 and created by USB core group
members including Intel, Microsoft, IBM, Compaq, Digital & Northern Telecom
follows star topology with USB host at center and one or more USB peripheral
devices/USB hosts connected to it.
65
Communication Interface
2 different standards for USB host control interface:
Open Host Control Interface (OHCI)
USB standards use 2 types of connectors (at the end of USB cable):
‘Type A’ for upstream connection (connection with host)
66
Communication Interface
Uses differential signals for data transfer. This increases the immunity of signal
USB interface has ability to supply power to connecting devices. 2 pins (power &
GND) is dedicated for carrying power. Can carry upto 500mA at 5V enough for low
power devices.
Vendor ID(VID)
2. Bulk Sending block of data, supports error checking & correction(data to printer)
4. Interrupt Small amount of data, uses polling checks whether USB device has
any data to send
The Typical Embedded System
67
Communication Interface
USB supports 4 different rates:
Low speed 5 Mbps USB 1.0
I E E E 1394 (Firewire):
S ony Corp. I L I N K
Texas I n s t r u m e n t s Lynx
supports peer to peer connection and point to multi point communication allowing
63 devices to be connected on bus in a tree topology
69
Communication Interface
Infrared(IrDA):
70
Communication Interface
IrDA communication involves a transmitter unit for transmitting the data
over IR and Receiver for receiving data
Infrared LE D is the IR source for transmitter and at the receiving end a photo
diode acts as receiver
usually m ost of Ir-devices con tains both transm itter and receiver called as
transreceiver for bidirectional communication
Infrared Data Association (IrDA) is regulatory body responsible for defining and
licensing the specification for IR data.
71
Communication Interface
C ontrol protocol contains implementation for Physical layer (PHY),
Media Access Control (MAC) and Logical Link Control (LLC)
physical layer defines physical characteristics like range, data rates, power etc.
IrDA is popular for file exchange and data transfer in low cost devices.
Bluetooth:
Low cost, low power, short range, wireless technology for data and voice communication
was first proposed by Ericsson in 1994
operates at 2.4 G Hz of Radio Frequency spectrum and uses Frequency Hopping
Spread Spectrum (FHSS) technique for communication
72
Communication Interface
Each bluetooth device will have a 48 bit Unique Identification Number(UIN).
Bluetooth follows packet based data transfer
Generic Access Profile (GAP) defines the requirement for detecting a Bluetooth
device and establishing a connection with it
Serial Port Profile (SPP) defines serial data communication
Wi-Fi enabled devices contains a wireless adaptor for transmitting and receiving data
in the form of radio signals through an antenna H/W part is called as Wi-Fi Radio
For communicating with devices over a Wi-Fi network, Wi-Fi Radio when turned ON,
it searches for the available Wi-Fi network in its vicinity & list out the Service S et
Identifier (SSID) of available networks.
74
Communication Interface
If network security is enabled, Password will be required
employs Wired Equivalency Privacy (WEP) and Wireless Protected Access (WPA)
for data security
75
Communication Interface
operating range is of 100 mts and data rates of 20-250 Kbps
In Zig Bee network each device falls under any one of
following devices:
Zig Bee coordinator/Network Coordinator(ZC)
acts as root of ZigBee network
has capability to store more information about the
network
Zig Bee Router (ZR)/Full Function Device (FFD)
responsible for transmitting data from device to other or
to another ZigBee Router
Zig Bee End Device (ZED)/Reduced Function Device (RFD)
contains ZigBee functionality for communication. It can talk with ZC /Z R, cannot
transmit data from one device to other directly
77
Topics to be covered:
Definition
Memory
Communication Interface
Embedded Firmware
Other System Components
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.
2.Write the program in Assembly language using the instructions supported by your
application‘s target processor/controller. The instruction set for each family of
processor/controller is different
The process of converting the program written in either a high level language or
processor/specific Assembly code to machine readable binary code is called "HE X
File Creation".
The methods used for 'HE X File Creation' is different depending on the
programming techniques used.
If the program is written in Embedded C/C++ using an IDE , the cross
compiler included in the IDE converts it into corresponding processor/controller
understandable H E X File'.
If you are following the Assembly language based programming
technique (method 2), you can use the utilities supplied by the
processor/controller vendors
to convert the source code into 'HE X File'.
Also third party tools are available, which may be of free of cost, for this
conversion.
The Typical Embedded System
The reasons for this being: writing codes in a high level language is easy, the code
written in high level language is highly portable which means you can use the same
code to run on different processor/controller with little or less dification.
The only thing you need to do is re-compile the program with the required
processor's IDE, after replacing the include files for that particular processor. Also
the programs written in high level languages are not developer dependent.
Any skilled programmer can trace out the functionalities of the program by just
having a look at the program. It will be much easier if the source code contains
necessary comments and documentation lines.
It is very easy to debug and the overall system development time will be reduced
to a greater extent.
So the program will be highly dependent on the developer. It is very difficult for a
second person to understand the code written in Assembly even if it is well
documented.
using a scheduler
Definition
Memory
Communication Interface
Embedded Firmware
Other System
Components
PCB and Passive
The Components
Typical Embedded System
84
Other System Components
The other system components refer to the components/circuits /ICs which are
necessary for the proper functioning of the embedded system.
Some of these circuits may be essential for the proper functioning of the
processor/controller and firmware execution.
Depending on the system requirement, the embedded system may include other
integrated circuits for performing specific functions, level translator ICs for
interfacing circuits with different logic levels, etc.
85
Other System Components
Reset Circuit:
The reset circuit is essential to ensure that the device is not operating at a voltage
level where the device is not guaranteed to operate, during system power ON.
The reset signal brings the internal registers and the different hardware systems of
the processor/controller to a known state and starts the firmware execution from the
reset vector
(Normally from vector 0x0000 for
processors/controllers. address The reset be reloc ated c onventional to
processors/controllers supporting
vector boot
can loader). an address
for
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).
Since the processor operation is synchronized to a clock signal, the reset pulse
should be wide enough to give time for the clock oscillator to stabilize before the
internal reset state starts.
86
Other System Components
The reset signal to the processor can be applied at power ON through an external
passive reset circuit comprising a Capacitor and Resistor or through a standard Reset
I C like MAX810 from Maxim Dallas (www.maxim-ic.com).
Select the reset I C based on the type of reset signal and logic level (CMOS/TTL)
supported by the processor/controller in use.
87
Other System Components
Brown-out Protection Circuit:
Brown-out protection circuit prevents the processor/controller from unexpected
program execution behavior when the supply voltage to the processor/controller falls
below a specified voltage.
It is essential for battery powered devices since there are greater chances for the
battery voltage to drop below the required threshold. The processor behavior may not
be predictable if the supply voltage falls below the recommended operating voltage. It
may lead to situations like data corruption.
88
Other System Components
Figure illustrates a brown-out with Active low
output circuit implementation using Zener diode and
transistor for processor/controller with active low
Reset logic,
The transistor stops conducting when the supply voltage falls below the sum of V B E
and V Z . Select the Zener diode with required voltage for setting the low threshold
value for Vc c .
The values of R1, R2, and R3 can be selected based on the electrical characteristics
(Absolute maximum current and voltage ratings) of the transistor in use.
89
Other System Components
Oscillator Unit :
A microprocessor/microcontroller is a digital device made digital
combinational and sequential circuits. up of The of a
microprocessor/controller occurs in sync with a instruction
clock signal. execution
It is analogous to the heartbeat of a living being which synchronises the execution of
life. For a living being the heart is responsible for the generation of the beat whereas
the oscillator unit of the embedded system is responsible for generating the precise
clock for the processor.
A quartz crystal is normally mounted in a hermetically sealed metal case with two
leads protruding out of the case.
90
Other System Components
Certain devices may not contain a built-in oscillator unit and require the clock
pulses to be generated and supplied externally. Quartz crystal Oscillators are available
in the form chips and they can be used for generating the clock pulses in such a cases.
The logical circuits lying inside the processor always have an upper threshold value
for the maximum clock at which the system can run, beyond which the system
becomes unstable and non functional.
The accuracy of program execution depends on the accuracy of the clock signal.
The accuracy of the crystal oscillator or ceramic resonator is normally expressed in
terms of +/-ppm (Parts per million).
91
Other System Components
Figure illustrates the usage of quartz crystal/ceramic resonator and external oscillator chip for
clock generation.
92
Other System Components
RTCs are available in the form of Integrated Circuits from different semiconductor manufacturers
like Maxim/Dallas, ST Microelectronics etc.
The RTC chip contains a microchip for holding the time and date related information and
backup battery cell for functioning in the absence of power, in a single I C package. The RTC chip is
interfaced to the processor or controller of the embedded system.
One IRQ can be assigned to the RTC interrupt and the kernel can perform necessary
operations like system date time updation, managing software timers etc when an RTC timer tick
interrupt occurs.
93
Other System Components
Watchdog Timer:
In desktop Windows systems, if we feel our application is behaving in an abnormal
way or if the system hangs up, we have the "Ctrl + Alt + Del‘’ to come out of the
situation. What if it happens to our embedded system? Do we really have a "Ctrl + Alt +
Del' to take control of the situation?
Of course not, but we have a watchdog to monitor the firmware execution and reset
the system processor/ microcontroller when the program execution hangs up
94
Other System Components
If the watchdog counter is in the enabled state, the firmware can write a
zero (for upcounting watchdog implementation) to it before starting the execution of a piece
of code (subroutine or portion of code which is susceptible to execution hang up) and the
watchdog will start counting.
If the firmware execution doesn't complete due to malfunctioning, within the time required
by the watchdog to reach the maximum count, the counter will generate a reset pulse and
this will reset the processor (if it is connected to the reset line of the processor).
If the firmware execution completes before the expiration of the watchdog timer you can
reset the count by writing a 0 (for an upcounting watchdog timer) to the watchdog timer
register.
Most of the processors implement watchdog as a built-in component and provides status
register to control the watchdog timer (like enabling and disabling watchdog functioning)
and watchdog timer register for writing the count value. If the processor/controller doesn't
contain a built in watchdog timer, the same can be implemented using an external watchdog
timer I C circuit.
95
Other System Components
The external watchdog timer uses hardware logic for enabling/disabling, resetting
the watchdog count, etc instead of the firmware based writing to the status and
watchdog timer register. The Microprocessor supervisor I C DS1232 integrates a
hardware watchdog timer in it.
96
Topics to be covered:
Definition
Memory
Communication Interface
Embedded Firmware
97
PCB and Passive Components
Printed Circuit Board (PCB) is the backbone of every embedded system. After
finalizing the components and the inter-connection among them, a schematic design
is created and according to the schematic the PCB is fabricated.
PCB acts as a platform for mounting all the necessary components as per the design
requirement. Also it acts as a platform for testing your embedded firmware.
They are very essential for the proper functioning of your embedded system. For
example for providing a regulated ripple-free supply voltage to the system, a regulator
I C and spike suppressor filter capacitors are very essential.
98
For Further Studies:
Reference
52
100