Rns Institute of Technology: Text Books
Rns Institute of Technology: Text Books
Rns Institute of Technology: Text Books
MODULE 3
Embedded System Components: Embedded Vs General computing system,
Classification of Embedded systems, Major applications and purpose of ES. Core of an
Embedded System including all types of processor/controller, Memory, Sensors,
Actuators, LED, 7 segment LED display, Optocoupler, relay, Piezo buzzer, Push
button switch, Communication Interface (onboard and external types), Embedded
firmware, Other system components. (Text 2: All the Topics from Ch-1 and Ch-2,
excluding 2.3.3.4 (stepper motor), 2.3.3.8 (keyboard) and 2.3.3.9 (PPI) sections).
“life is an embedded system designed by God and our brains are the neural
networks surrounded by neurons each neuron has its individual function but they
are controlled by microcontroller IC's called our minds :)”
Text Books:
1. Shibu K V, “Introduction to Embedded Systems”, Tata McGraw Hill
Education Private Limited, 2009.
By,
Geetha G
Asst Professor, ECE
RNSIT
The Typical Embedded System
3.1.1.1 Microprocessors
Microprocessor is a silicon chip representing a Central Processing Unit (CPU), which is
capable of performing arithmetic as well as logical operations according to a predefined 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.
A microprocessor is a dependent 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 i.e Intel 4004, 4 bit processor
which was released in November 1971.
- It featured 1K data memory, a 12 bit program counter and 4K program memory, sixteen 4bit
general purpose registers and 46 instructions.
- It ran at a clock speed of 740 kHz. It was designed for olden day’s calculators.
In 1972, Intel 4040 was released
- 14 more instructions were added to the 4004 instruction set and the program space is
upgraded to 8K.
- Also interrupt capabilities were added to it
It was quickly replaced in April 1972 by Intel 8008 which was similar to Intel 4040, the only
difference was that its program counter was 14 bits wide and the 8008 served as a terminal
controller.
In April 1974 Intel launched the first 8 bit processor, the Intel 8080, with 16 bit address bus and
program counter and seven 8 bit registers (A-E,H,L: BC, DE, and HL pairs formed the 16bit
register for this processor).
- Intel 8080 was the most commonly used processors for industrial control and other embedded
applications in the 1975s.
- Since the processor required other hardware components as mentioned earlier for its proper
functioning, the systems made out of it were bulky and were lacking compactness.
Immediately after the release of Intel 8080, Motorola also entered the market with their
processor, Motorola 6800 with a different architecture and instruction set compared to 8080.
In 1976 Intel came up with the upgraded version of 8080 Intel 8085, with two newly added
instructions, three interrupt pins and serial I/O.
- Clock generator and bus controller circuits were built-in and the power supply part was
modified to a single +5 V supply.
In July 1976 Zilog entered the microprocessor market with its Z80 processor as competitor to
Intel.
- Actually it was designed by an ex-intel designer, Frederico Faggin and it was an improved
version of Intel’s 8080 processor, maintaining the original 8080 architecture and instruction
set with an 8 bit data bus and a 16 bit address bus and was capable of executing all
instructions of 8080.
- It included 80 more new instructions and it brought out the concept of register banking by
doubling the register set. Z80 also included two sets of index registers for flexible design.
Technical advances in the field of semiconductor industry brought a new dimension to the
microprocessor market and twentieth century witnessed a fast growth in processor technology.
16, 32 and 64 bit processors came into the place of conventional 8 bit processors.
The initial 2 MHz clock is now an old story.
Today processors with clock speeds up to 2.4 GHz are available in the market.
More and more competitors entered into the processor market offering high speed, high
performance and low cost processors for customer design needs.
Intel, AMD, Freescale, IBM, TI, Cyrix, Hitachi, NBC, LSI Logic etc are the key players in the
processor market.
Intel still leads the market with cutting edge technologies in the processor industry.
Different instruction set and system architecture are available for the design of a microprocessor.
Harvard and Von-Neumann are the two common system architectures for processor design.
Processors based on Harvard architecture contains separate buses for program memory and data
memory, whereas processors based on Von-Neumann architecture shares a single system bus for
program and data memory.
Reduced Instruction Set Computing (RISC) and Complex Instruction Set Computing (CISC) are
the two common Instruction Set Architectures (ISA) available for processor design.
3.1.1. 3 Microcontrollers
A Microcontroller is a highly integrated chip that contains 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.
Since a microcontroller contains all the necessary functional blocks for independent working,
they found greater place in the embedded domain in place of microprocessors.
Apart from this, they are cheap, cost effective and are readily available in the market.
Texas Instrument’s TMS 1000 is considered as the world’s first microcontroller.
We cannot say it as a fully functional microcontroller when we compare it with modern
microcontrollers.
TI followed Intel’s 4004/4040, 4 bit processor design and added some amount of RAM, program
storage memory (ROM) and support on a single chip, there by eliminated the requirement of
multiple hardware chips for self-functioning.
Provision to add custom instructions to the CPU was another innovative feature of TMS 1000.
TMS 1000 was released in 1974.
In 1977 Intel entered the microcontroller market with a family of controllers coming under one
umbrella named MCS-48TM family.
- The processors came under this family were 8038HL, 8039HL, 8040AHL, 8048H, 8049H
and 8050AH. Intel 8048 is recognized as Intel’s first microcontroller and it was the most
prominent member in the MCS-48TMT family.
- It was used in the original IBM PC keyboard.
The inspiration behind 8048 was Fairchild’s F8 microprocessor and Intel’s goal of developing a
low cost and small size processor.
- The design of 8048 adopted a true Harvard architecture where program and data memory
shared the same address bus and is differentiated by the related control signals.
Eventually Intel came out with its most fruitful design in the 8bit microcontroller domain-the
8051 family and its derivatives.
- It is the most popular and powerful 8 bit microcontroller ever built.
- It was developed in the 1980s and was put under the family MCS-51.
- Almost 75% of the microcontroller used in the embedded domain were 8051 family based
controllers during the 1980-90s.
- 8051 processor cores are used in more than 100 devices by more than 20 independent
manufacturers like Maxim, Philips, Atmel, etc under the license from Intel.
- Due to the low cost, wide availability, memory efficient instruction set, mature development
tools and Boolean processing or bit manipulation operation capability, 8051 family
derivative microcontrollers are much used in high-volume consumer electronic devices,
entertainment industry and other gadgets where cost-cutting is essential.
Another important family of microcontrollers used in industrial control and embedded
applications is the PIC family micro controllers from Microchip Technologies.
- It is a high performance RISC microcontroller complementing the CISC (Complex Instruction
Set Computing) features of 8051.
- The terms RISC and CISC will be explained in detail in a separate heading.
Some embedded system applications require only 8 bit controllers whereas some embedded
applications requiring superior performance and computational needs demand l6/32bit
microcontrollers.
Infineon, Freescale, Philips, Atmel, Maxim, Microchip etc are the key suppliers of 16bit
microcontrollers.
Philips tried to extend the 8051 family microcontrollers to use for 16 bit applications by
developing the Philips XA (extended Architecture) microcontroller series.
8 bit microcontrollers are commonly used in embedded systems where the processing power is
not a big constraint.
The companies tried to add more and more functionalities like built in SPI, I2C serial buses,
USB controller, ADC, Networking capability etc to 8051.
So the competitive market is driving towards a one-stop solution chip in microcontroller domain.
High processing speed microcontroller families like ARM11 series are also available in the
market, which provides solution to applications requiring hardware acceleration and high
processing capability.
Freescale, NBC, Zilog, Hitachi, Mitsubishi, Infineon, ST Micro Electronics, National, Texas
Instruments, Toshiba, Philips, Microchip, Analog Devices, Daewoo, Intel, Maxim, Sharp, Silicon
Laboratories, TDK, Triscend, Winbond, Atmel, etc. are the key players in the microcontroller
market.
Of these Atmel has got special significance.
They are the manufacturers of a variety of Flash memory based microcontrollers.
They also provide In-System Programmability for the controller.
The Flash memory technique helps in fast reprogramming of the chip and thereby reduces the
product development time.
Atmel also provides another special family of microcontroller called AVR, an 8 bit RISC Flash
microcontroller and fast enough to execute powerful instructions in a single clock cycle and
provide the latitude you need to optimize power consumption.
The instruction set architecture of a microcontroller can be either RISC or CISC.
Microcontrollers are designed for either general purpose application requirement or domain
specific application requirement.
Example for a general purpose microcontroller: The Intel 8051 microcontroller
Example for ASIP: Automotive AVR microcontroller family from Atmel Corporation.
RISC CISC
Lesser no. of instructions Greater no. of Instructions
Instruction Pipelining and increased execution Generally no instruction pipelining feature
speed
Orthogonal Instruction Set (Allows each Non Orthogonal Instruction Set (All
instruction to operate on any register and use instructions are not allowed to operate on any
any addressing mode) register and use any addressing mode. It is
instruction specific)
Operations are performed on registers only, the Operations are performed on registers or
only memory operations are load and store memory depending on the instruction
Large number of registers are available Limited no. of general purpose registers
Programmer needs to write more code to Instructions are like macros in C language. A
execute a task since the instructions are simpler programmer can achieve the desired
ones functionality with a single instruction which in
turn provides the effect of using more simpler
single instructions in RISC
Single, Fixed length Instructions Variable length Instructions
Less Silicon usage and pin count More silicon usage since more additional
decoder logic is required to implement the
complex instruction decoding.
With Harvard Architecture Can be Harvard or Von-Neumann Architecture
Program
CPU Data Memory
Memory
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 Since data memory and program memory
are stored physically in different locations, are stored physically in same chip, chances
no chances for accidental corruption of for accidental corruption of program
program memory memory
Big-endian means the higher-order byte of the data is stored in memory at the lowest address,
and the lower-order byte at the highest address.
For example, a 4 byte long integer Byte3 Byte2 Byte1 Byte0 will be stored in the memory as
shown in Fig 4.
Base Address + 0 Byte 3 Byte 3 0x20000 (Base Address)
R1 R2 R3
1 3 3 1
load R1, x
load R2, y 2
x 00 add R3, R1, R2 3
y 7F ALU 3
store R3, z 4
z 23
4
Fig 5: Load Store Operation
Suppose x, y and z are memory locations and to add the contents of x and y and store the result
in location z.
Under the load store architecture the same is achieved with 4 instructions as shown in Fig 5.
The first instruction load R1, x loads the register R1 with the content of memory location x, the
second instruction load R2, y loads the register R2 with the content of memory location y.
The instruction add R3, R1, R2 adds the content of registers R1 and R2 and stores the result in
register R3.
The next instruction store R3, z stores the content of register R3 in memory location z.
The conventional instruction execution by the processor follows the fetch-decode-execute
sequence.
Where the fetch part fetches the instruction from program memory or code memory and the
decode part decodes the instruction to generate the necessary control signals.
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.
For simplicity let’s consider decode and execution together.
During the decode operation the memory address bus is available and if it is 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 instruction.
Under normal program execution flow it is meaningful to fetch the next instruction to execute,
while decoding and execution of the current instruction is in progress.
If the current instruction in progress is a program control flow transfer instruction like jump or
call instruction, there is no meaning in fetching the instruction following the current instruction.
In such cases the instruction fetched is flushed and a new instruction fetch is performed to fetch
the instruction.
Clock Pulses Clock Pulses Clock Pulses
Whenever the current instruction is executing the program counter will be loaded with the
address of the next instruction.
In case of jump or branch instruction, the new location is known only after completion of the
jump or branch instruction.
Depending on the stages involved in an instruction (fetch, read register and decode. execute
instruction, access an operand in data memory, write back the result to register etc.), there can be
multiple levels of instruction pipelining.
Fig 6 illustrates the concept of Instruction pipelining for single stage pipelining.
3.1.2 Application Specific Integrated Circuits (ASICs)
Application Specific Integrated Circuit (ASIC) is a microchip designed to perform a specific or
unique application.
It is used as replacement to conventional general purpose logic chips.
It integrates several functions into a single chip and there by reduces the system development
cost.
Most of the ASICs are proprietary products.
As a single chip, ASIC consumes a very small area in the total system and there by 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, ASIC based systems are profitable only for large volume commercial productions.
Fabrication of ASICs requires a non-refundable initial investment for the process technology
and configuration expenses.
This investment is known as Non-Recurring Engineering Charge (NRE) and it is a one-time
investment.
If the Non-Recurring Engineering Charges (NRE) is borne 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 is, but to a smaller
number of customers since it is for a specific application.
Ex for ASSP: The ADE7760 Energy Meter ASIC developed by Analog Devices for Energy
metering applications.
Advantages of PLD
Programmable Logic Devices offer a number of important advantages over fixed logic devices,
including:
PLDs offer customers much more flexibility during the design cycle because design
iterations are simply a matter of changing the programming file and the results of design changes
can be seen immediately in working parts.
PLDs do not require long lead times for prototypes or production parts-the PLDs are
already on a distributor’s shelf and ready for shipment.
PLDs do not require customers to pay for large NRE costs and purchase expensive mask
sets + PLD suppliers incur those costs when they design their programmable devices and are able
to amortize those costs over the multi-year lifespan of a given line of PLDs.
PLDs allow customers to order just the number of parts they need, when they need them,
allowing them to control inventory. Customers who use fixed logic devices often end up with
excess inventory which must be scrapped, or if demand for their product surges, they may be
caught short of parts and face production delays.
PLDs can be reprogrammed even after a piece of equipment is shipped to a customer. In
fact, thanks to programmable logic devices, a number of equipment manufacturers now tout the
ability to add new features or upgrade products that already are in the field. To do this, they
simply upload a new programming file to the PLD, via the Internet, creating new hardware logic
in the system.
Over the last few years programmable logic suppliers have made such phenomenal technical
advances that PLDs are now seen as the logic solution of choice from many designers.
One reason for this is that PLD suppliers such as Xilinx are “fabless” companies instead of
owning chip manufacturing foundries, Xilinx outsource that job to partners like Toshiba and
UMC, whose chief occupation is making chips.
This strategy allows Xilinx to focus on designing new product architectures, software tools, and
intellectual property cores while having access to the most advanced semiconductor process
technologies.
Advanced process technologies help PLDs in a number of key areas like faster performance,
integration of more features, reduced power consumption, and lower cost.
FPGAs are especially popular for prototyping ASIC designs where the designer can test his
design by downloading the design file into an FPGA device.
Once the design is set, hardwired chips are produced for faster performance.
Just a few years ago, for example, the largest FPGA was measured in tens of thousands of system
gates and operated at 40 MHz.
Older FPGAs also were relatively expensive, costing often more than $150 for the most advanced
parts at the time.
Today, however, FPGAs with advanced features offer millions of gates of logic capacity, operate
at 300 MHz, can cost less than $10, and offer a new level of integrated functions such as
processors and memory.
2.2 MEMORY
Memory is an important part of a processor/controller based embedded systems.
Some of the processors/controllers contain built in memory and this memory is referred as on-
chip memory.
Others do not contain any memory inside the chip and requires external memory to be connected
with the controller/processor to store the control algorithm.
It is called off-chip memory.
Also some working memory is required for holding data temporarily during certain operations.
This section deals with the different types of memory used in embedded system applications.
The code memory retains its contents even after the power to it is turned off.
It is generally known as non-volatile storage memory.
Depending on the fabrication, erasing and programming techniques they are classified into the
following types.
3.2.1.1 Masked ROM (MROM)
Masked ROM is a one-time programmable device.
Masked ROM makes use of the hardwired technology for storing data.
The device is factory programmed by masking and metallization process at the time of
production itself, according to the data provided by the end user, the primary advantage of this is
low cost for high volume production.
They are the least expensive type of solid state memory.
Different mechanisms are used for the masking process of the ROM, like:
3.2.1.5 FLASH
FLASH is the latest ROM technology and is the most popular ROM technology used in today’s
embedded designs.
FLASH memory is a variation of EEPROM technology.
It combines the re-programmability of EEPROM and the high capacity of standard ROM.
FLASH memory is organized as sectors (blocks) or pages.
FLASH memory stores information in an array of floating gate MOSFET transistors.
The erasing of memory can be done at sector level or page level without affecting the other
sectors or pages.
Each sector/page should be erased before re-programming.
The typical erasable capacity of FLASH is 1000 cycles.
W27C512 from WINBOND is an example of 64KB FLASH memory.
3.2.1.6 NVRAM
Non-volatile RAM is a random access memory with battery backup.
It contains static RAM based memory and a minute battery for providing supply to the memory
in the absence of external power supply.
The memory and battery are packed together in a single package.
The life span of NVRAM is expected to be around 10 years.
DS-644 from Maxim/Dallas is an example of 32KB NVRAM.
3.2.2 Read-Write Memory/ Random Access Memory (RAM)
RAM is the data memory or working memory of the controller/processor.
Controller/processor can read from it and write to it.
RAM is volatile, meaning when the power is turned off, all the contents are destroyed.
RAM is a direct access memory, meaning we can access the desired memory location, directly
without the need for traversing through the entire memory locations to reach the desired memory
position.
This is in contrast to the Sequential Access Memory (SAM), where the desired memory location
is accessed by either traversing through the entire memory or through a ‘seek’ method.
Examples of sequential access memory: Magnetic tapes, CD ROMS etc.
RAM generally falls into three categories: Static RAM (SRAM), dynamic RAM (DRAM) and
non-volatile RAM (NVRAM).
This implementation in its simpler form can be visualized as two cross coupled inverters with
read/ write control through transistors.
The four transistors in the middle form the cross-coupled inverters.
This can be visualized as shown in Fig 9.
From the SRAM implementation diagram, it is clear that access to the memory cell is controlled
by the Word Line, which controls the access transistors (MOSFETs) M5 and M6.
The access transistors control the connection to bit lines B & B\.
In order to write a value to the memory cell, apply the desired value to the bit control lines (For
writing 1, make B = 1 and B =0; for writing 0, make B = 0 and B\ =1) and assert the Word Line
(Make Word line high).
This operation latches the bit written in the flip-flop.
For reading the content of the memory cell, assert both B and B\ bit lines to l and set the Word
line to 1.
The major limitations of SRAM are low capacity and high cost.
Since a minimum of six transistors are required to build a single memory cell, imagine how many
memory cells we can fabricate on a silicon wafer.
Fast in operation. Typical access time is10 ns. Slow in operation due to
refresh requirements. Typical access time is 60 ns.
Write operation is faster than read operation.
3.2.2.3 NVRAM
Non-volatile RAM is a random access memory with battery backup.
It contains static RAM based memory and a minute battery for providing supply to the memory
in the absence of external power supply.
The memory and battery are packed together in a single package.
The life span of NVRAM is expected to be around 10 years.
DS-1744 from Maxim/Dallas is an example of 32KB NVRAM.
3.3.1 Sensors
Sensor is a transducer device that converts energy from one form to another for any measurement
or control purpose.
It is an input device.
The “Smart” running shoe example given in Chapter 1, has the sensor which measures the
distance between the cushion and magnet in the smart running shoe is a magnetic Hall Effect
sensor.
3.3.2 Actuators
Actuator is a form of transducer device (mechanical or electrical) which converts signals to
corresponding physical action (motion).
Actuator acts as an output device.
In “Smart” running shoe example given in Chapter 1, the actuator was used for adjusting the
position of the cushioning element is a micro stepper motor.
Fig 12: common anode and cathode configurations of a 7-segment LED Display
3.3.3.3 Opto-coupler
Opto-coupler is a solid state device to isolate two parts of a circuit.
Optocoupler combines an LED and a photo-transistor in a single housing (package).
Fig 13 shows Optocoupler device illustrates the functioning of an Optocoupler device.
3.3.3.5 Relay
Relay is an electro-mechanical device.
In embedded application, the relay unit acts as dynamic path selectors for signals and power.
The relay unit contains a relay coil made up of insulated wire on a metal core and metal
armature with one or more contacts.
‘Relay’ works on electromagnetic principle.
When a voltage is applied to the relay coil, current flows through the coil, which in turn generates
a magnetic field.
The magnetic field attracts the armature core and moves the contact point.
The movement of the contact point changes the power/signal flow path.
Relays are available in different configurations.
Fig 15 given below illustrates the widely used relay configurations for embedded applications.
Vcc
Freewheeling Diode
Relay Coil
Load
Port Pin
Relay Unit
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
MISO
SCL
MOSI MOSI Slave 1
SCL SPI Device
Master
MISO (Eg: Serial
(Microprocessor/
SS\ EEPROM)
Controller)
SS1\
SS2\
MOSI
Slave 2
SCL
SPI Device
MISO
(Eg: LCD)
SS\
SPI Bus
TXD TXD
UART UART
RXD RXD
4.7K
DQ Slave 1
Port Pin
1-Wire Device
(Eg: DS2760 Battery
GND
monitor IC )
Master
(Microprocessor/
Controller) DQ Slave 2
1-Wire Device
(Eg: DS2431 1024
GND GND
Bit EEPROM )
D0 to Data Bus
Dx-1 Peripheral Device
RD\ RD\ (Eg: ADC)
WR\ WR\
Host Control Signals CS\
(Microprocessor/
Controller) Chip Select
Peripheral
Device 2
USB Host
(Hub)
Peripheral Peripheral
Device 4 Device 5
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 USB 2.0 interface.
The 1394 hardware implementation is much costlier than USB implementation.
3.4.2.6 WI-FI
Wi-Fi or Wireless Fidelity is the popular wireless communication technique for networked
communication of devices.
Wi-Fi follows the IEEE 802.11 standard.
Wi-Fi 1s intended for network communication and it supports Internet Protocol (IP) based
communication.
It is essential to have device identities in a multipoint communication to address specific devices
for data communication.
In an IP based communication each device is identified by an IP address, which is unique to
each device on the network.
Wi-Fi based communications require an intermediate agent called Wi-Fi router/Wireless Access
point to manage the communications.
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.
The hardware part of it is known as Wi-Fi Radio.
Wi-Fi operates at 2.4GHz or 5GHz of radio spectrum and they co-exist with other ISM band
devices like Bluetooth.
Fig 25 illustrates the typical interfacing of devices in a Wi-Fi network.
Wi-Fi Router
Device 1
Device 2 Device 3
3.4.2.7 ZigBee
ZigBee is a low power, low cost, wireless network communication protocol based on the IEEE
802.15.4-2006 standard.
ZigBee is targeted for low power, low data rate and secure applications for Wireless Personal
Area Networking (WPAN).
The ZigBee specifications support a robust mesh network containing multiple nodes.
This networking strategy makes the network reliable by permitting messages to travel through a
number of different paths to get from one node to another.
ZigBee operates worldwide at the unlicensed bands of Radio spectrum, mainly at 2.400 to 2.484
GHZ, 902 to 928 MHz and 868.0 to 868.6MHz.
ZigBee Supports an operating distance of up to 100 meters and a data rate of 20 to 250kbps.
ZED ZED
ZED
ZR ZC ZR
ZED ZED
ZigBee Coordinator (ZC)/Network 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 (ZR)/Full function Device (FFD): Responsible for passing information from
device to another device or to another ZR.
ZigBee End Device (ZED)/Reduced Function Device (RFD): 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 is primarily targeting application areas like Home & Industrial Automation, Energy
Management, Home control/security, Medical/Patient tracking, Logistics & Asset tracking and
sensor networks & active RFID.
Automatic Meter Reading (AMR), smoke and detectors, wireless telemetry, HVAC control,
heating control, Lighting controls, Environmental controls, etc are examples for applications
which can make use of the ZigBee technology.
Vcc
R1
V BE
R2
Q
Reset Pulse
DZ Active Low
Vz
R3
GND
Microcontroller Microprocessor
C : Capacitor
Y : Resonator
Crystal Oscillator
Oscillator
Unit
Quartz Crystal Clock Input Pin
Resonator C C
Y Oscillator
Unit
Fig 29: Oscillator circuitry using quartz crystal and quartz crystal oscillator
3.6.4. Real-Time Clock (RTC)
Real-Time Clock (RTC) is a system component responsible for keeping track of time.
RTC holds information like current time (In hours, minutes and seconds) in 12 hour/24 hour
format, date, month, year, day of the week etc and supplies timing reference to the system.
RTC is intended to function even in the absence of power.
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 1C package.
The RTC Chip is interfaced to the processor or controller of the embedded system.
For Operating System based embedded devices, a timing reference is essential for synchronizing
the operations of the OS kernel.
The RTC can interrupt the OS kernel by asserting the interrupt line of the processor/controller
to which the RTC interrupt line is connected.
The OS kernel identifies the interrupt in terms of the Interrupt Request (IRQ) number
generated by an interrupt controller.
One IRQ can be assigned to the RTC interrupt and the kernel can perform necessary Operations
like system date/time updating, managing software timers etc when an RTC timer tick interrupt
occurs.
The RTC can be configured to interrupt the processor at predefined intervals or to interrupt the
processor when the RTC register reaches a specified value (used as alarm interrupt).