SlideShare une entreprise Scribd logo
1  sur  41
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 1
CHAPTER-1
IntroductionTo Embedded System
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 2
Introduction To Embedded System
1.1 Introduction
Microcontroller are widely used in Embedded System products. An Embedded product uses
the microprocessor(or microcontroller) to do one task & one task only. A printer is an
example of Embedded system since the processor inside it perform one task only namely
getting the data and printing it. Although microcontroller are preferred choice for many
Embedded systems, There are times that a microcontroller is inadequate for the task. For this
reason in recent years many manufactures of general purpose microprocessors such as
INTEL, Motorolla, AMD & Cyrix have targeted their microprocessors for the high end of
Embedded market.One of the most critical needs of the embedded system is to decrease
power consumptions and space. This can be achieved by integrating more functions into the
CPU chips. All the embedded processors have low power consumptions in additions to some
forms of I/O,ROM all on a single chip. In higher performance Embedded system the trend is
to integrate more & more function on the CPU chip & let the designer decide which feature
he/she wants to use.
1.2 Embedded System
An Embedded System employs a combination of hardware & software to perform a specific
function. Software is used for providing features and flexibility hardware(Processors,
Memory...) is used for performance & sometimes security.An embedded system is a special
purpose system in which the computer is completely encapsulated by the device it controls.
Unlike a general purpose computer, such as a PC, an embedded system performs predefined
task’s usually with very specific tasks design engineers can optimize it reducing the size and
cost of the product. Embedded systems are often mass produced, so the cost savings may be
multiplied by millions of items.The core of any embedded system is formed by one or several
microprocessor or micro controller programmed to perform a small number of tasks. In
contrast to a general purpose computer, which can run any software application, the user
chooses, the software on an embedded system is semi-permanent, so it is often called
firmware.
1.3 Examples of Embedded System
1. Automated tiller machines (ATMS).
2. Integrated system in aircraft and missile.
3.Cellular telephones and telephonic switches.
4. Computer network equipment, including routers timeservers and firewalls
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 3
5. Computer printers, Copiers.
6. Disk drives (floppy disk drive and hard disk drive)
7. Engine controllers and antilock brake controllers for automobiles.
8. Home automation products like thermostat, air conditioners sprinkles and security
monitoring system.
9. House hold appliances including microwave ovens, washing machines, TV sets DVD
players/recorders.
10. Medical equipment.
11. Measurement equipment such as digital storage oscilloscopes, logic analyzers and
spectrum analyzers.
12. Multimedia appliances: internet radio receivers, TV set top boxes.
13. Small hand held computer with P1M5 and other applications.
14. Programmable logic controllers (PLC’s) for industrial automation and monitoring.
15. Stationary video game controllers.
1.4 Microprocessor (MPU)
A microprocessor is a general-purpose digital computer central processing unit(CPU).
Although popularly known as a ―computer on a chip‖ is in no sense a complete digital
computer. The block diagram of a microprocessor CPU is shown, which contains an
arithmetic and logical unit (ALU), a program counter (PC), a stack pointer (SP),some
working registers, a clock timing circuit, and interrupt circuits.
Figure1.1:Block Diagram Of a Microprocessor
1.5 Microcontroller (MCU)
Figure shows the block diagram of a typical microcontroller. The design incorporates all of
the features found in micro-processor CPU: ALU, PC, SP, and registers. It also added the
other features needed to make a complete computer: ROM, RAM, parallel I/O, serial I/O,
counters, and clock circuit.
RAM
CPU
GeneralMICR
OCONTROL
LERS
(MCU)-
Purpose
ROM I/O
Port
Timer
Serial
COM
Port
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 4
Figure1.2:Block Diagram Ofa Microcontroller
1.6 Comparision Between Microprocessor And Microcontroller
The microprocessor must have many additional parts to be operational as a computer whereas
microcontroller requires no additional external digital parts.
1. The prime use of microprocessor is to read data, perform extensive calculations on that
data and store them in the mass storage device or display it. The prime functions of
microcontroller is to read data, perform limited calculations on it, control its environment
based on these data. Thus the microprocessor is said to be general-purpose digital computers
whereas the microcontroller are intend to be special purpose digital controller.
2. Microprocessor need many opcodes for moving data from the external memory to the
CPU, microcontroller may require just one or two, also microprocessor may have one or two
types of bit handling instructions whereas microcontrollers have many.
3. Thus microprocessor is concerned with the rapid movement of the code and data from the
external addresses to the chip, microcontroller is concerned with the rapid movement of the
bits within the chip.
4. Lastly, the microprocessor design accomplishes the goal of flexibility in the hardware
configuration by enabling large amounts of memory and I/O that could be connected to the
address and data pins on the IC package. The microcontroller design uses much more limited.
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 5
CHAPTER-2
THE 8051 ARCHITECTURE
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 6
THE 8051 ARCHITECTURE
2.1About the 8051
The Intel 8051 is an 8-bit microcontroller which means that most available operations are
limited to 8 bits. There are 3 basic "sizes" of the 8051: Short, Standard, and Extended. The
Short and Standard chips are often available in DIP (dual in-line package) form, but the
Extended 8051 models often have a different form factor, and are not "drop-in compatible".
2.2Block Diagram
Figure 2.1:Block Diagram of 8051
All these things are called 8051 because they can all be programmed using 8051 assembly
language, and they all share certain features (although the different models all have their own
special features).Some of the features that have made the 8051 popular are:
4 KB on chip program memory.
128 bytes on chip data memory(RAM).
4 register banks.
8-bit data bus
16-bit address bus
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 7
32 general purpose registers each of 8 bits
16 bit timers (usually 2, but may have more, or less).
3 internal and 2 external interrupts.
Bit as well as byte addressable RAM area of 16 bytes.
Four 8-bit ports, (short models have two 8-bit ports).
16-bit program counter and data pointer.
1 Microsecond instruction cycle with 12 MHz Crystal.
8051 models may also have a number of special, model-specific features, such as
UARTs, ADC, OpAmps, etc...
2.3Typical applications
8051 chips are used in a wide variety of control systems, telecom applications, and robotics
as well as in the automotive industry. By some estimation, 8051 family chips make up over
50% of the embedded chip market.The 8051 has been in use in a wide number of devices,
mainly because it is easy to integrate into a project or build a device around. The following
are the main areas of focus:
1.Energy Management:Efficient metering systems help in controlling energy usage in homes
and industrial applications. These metering systems are made capable by incorporating
microcontrollers.
2.Touch screens:A high number of microcontroller providers incorporate touch-sensing
capabilities in their designs. Portable electronics such as cell phones, media players and
gaming devices are examples of microcontroller-based touch screens.
3.Automobiles: The 8051 finds wide acceptance in providing automobile solutions. They are
widely used in hybrid vehicles to manage engine variants. Additionally, functions such as
cruise control and anti-brake system have been made more efficient with the use of
microcontrollers. So the microcontroller 8051 has great advantage in the field of the
automobiles.
4. Medical Devices: Portable medical devices such as blood pressure and glucose monitors
use microcontrollers will to display data, thus providing higher reliability in providing
medical results.
2.4Pinout Description
Pin 1-8(Port 1): Each of these pins can be configured as an input or an output.
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 8
Pin 9(RST): A logic one on this pin disables the microcontroller and clears the contents
ofmost registers. In other words, the positive voltage on this pin resets the microcontroller.
By
Figure 2.2:Pin diagram of the 8051 DIP
applying logic zero to this pin, the program starts execution from the beginning. Pin 9 is the
RESET pin. It is an input and is active high. Upon applying a high pulse to this pin the
microcontroller well reset and terminate all activities. This is often referred to as a power on
reset .Activating a power on reset will cause all values the registers to be lost. It will set
program counter to all 0s.In order for the RESET input to be effective it must have a
minimum duration of two machine cycles. In other words the high pulse must be high for a
minimum of two machine cycles before it is allowed to go low.
Pin 10-17(Port 3): Similar to port 1, each of these pins can serve as general input or output.
Besides, all of them have alternative functions:
Pin 10(RXD):Serial asynchronous communication input or Serial synchronous
communication output.
Pin 11(TXD):Serial asynchronous communication output or Serial synchronous
communication clock output.
Pin 12(INT0):Interrupt 0 input.
Pin 13(INT1):Interrupt 1 input.
Pin 14(T0):Counter 0 clock input.
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 9
Pin 15(T1):Counter 1 clock input.
Pin 16(WR):Write to external (additional) RAM.
Pin 17(RD):Read from external RAM.
Pin 18, 19(X2,X1):Internal oscillator input and output. The 8051 has an on chip oscillator but
requires an external clock to run it. Most often a quartz crystal oscillator is connected to
inputs XTAL1 (pin 19) and XTAL2 (pin 18). The quartz crystal oscillator connected to
XTAL1 and XTAL2 also needs two capacitors of 30 pf value. One side of each capacitor is
connected to the ground. Speed refers to the maximum oscillator frequency connected to
XTAL
Figure2.3:Oscillator Circuit and Timing
Pin 20(GND):Ground.
Pin 21-28(Port 2):If there is no intention to use external memory then these port pins are
configured as general inputs/outputs. In case external memory is used, the higher address
byte, i.e. addresses A8-A15 will appear on this port. Even though memory with capacity of
64Kb is not used, which means that not all eight port bits are used for its addressing, the rest
of them are not available as inputs/outputs.
Pin 29(PSEN):This is an output pin. PSEN stands for ―program store enable‖. If external
ROM is used for storing program then a logic zero (0) appears on it every time the
microcontroller reads a byte from memory.
Pin 30(ALE):ALE stands for ―address latch enable. It is an output pin and is active high.
When connecting an 8031 to external memory, port 0 provides both address and data. In
other words the 8031 multiplexes address and data through port 0 to save pins. The ALE pin
is used for de-multiplexing the address and data.
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 10
Prior to reading from external memory, the microcontroller puts the lower address byte (A0-
A7) on P0. In other words, this port is used for both data and address transmission.
Pin 31(EA):EA which stands for ―external access‖ is pin number 31 in the DIP packages. It is
an input pin and must be connected to either Vcc or GND. In other words it cannot be
unconnected. By applying logic zero to this pin, P2 and P3 are used for data and address
transmission with no regard to whether there is internal memory or not. It means that even
there is a program written to the microcontroller, it will not be executed. Instead, the program
writtento external ROM will be executed. By applying logic one to the EA pin, the
microcontroller will use both memories, first internal then external (if exists).
Pin 32-39(Port 0): Similar to P2, if external memory is not used, these pins can be used as
general inputs/outputs. Otherwise, P0 is configured as address output (A0-A7) when the ALE
pin is driven high (1) or as data output (Data Bus) when the ALE pin is driven low (0).
Pin 40(Vcc):+5V power supply.
2.5PORTS 0,1,2,3:
All the ports upon RESET are configured as input, since P0-P3 have value FFH on them. The
following is a summary of features of P0-P3.
PORT 0:
Port 0 is also designated as AD0-AD7 allowing it to be used for both address and data. When
connecting an 8051/31 to an external memory, port 0 provides both address and data. The
8051 multiplexes address and data through port 0 to save pins. ALE indicates if p0 has
address A0-A7.in the 8051 based systems where there is no external memory connection the
pins of P0 must be connected externally to 10k-ohm pull-up resistor. This is due to the fact
that P0 is an open drain, unlike P1, P2 and P3. Open drain is a term used for MOS chips in
the same way that open collector is used for TTL chips. In many systems using the 8751,
89c51 or DS89c4*0 chips we normally connect P0 to pull up resistors.
PORT 1, PORT 2:
In 8051 based systems with no external memory connection both P1 and P2 are used as
simple I/O. however in 8031/51 based systems with external memory connections P2 must be
used along with P0 to provide the 16-bit address for the external memory. P2 is also
designated as A8-A15 indicating its dual function. Since an 8031/51 is capable of accessing
64k bytes of external memory it needs a path for the 16 bits of address. While P0 provides the
lower 8 bits via A0-a7 it is the job P2 to provide bits A8-A15 of the address. In other words
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 11
when the 8031/51 is connected to external memory P2 is used for the upper 8 bits of the 16
bit address and it cannot be used for I/O.
PORT 3:
Port 3 occupies a total of 8 pins 10 through 17. It can be used as input or output. P3 does not
need any pull-up resistors the same as P1 and P2 did not. Although port 3 is configured as
input port upon reset this is not the way it is most commonly used. Port 3 has the additional
function of providing some extremely important signals such as interrupts.
P3 BitFunction Pin
P3.0 RXD 10
P3.1 TXD 11
P3.2 INT0 12
P3.3 INT1 13
P3.4 T0 14
P3.5 T1 15
P3.6 WR 16
P3.7 RD 17
Table 2.1:Port 3 Alternate function
2.6 Programming Model Of 8051
In programming model of 8051 we have different types of registers are available and these
registers are used to store temporarily data is then the information could be a byte of data to
be processed or an address pointing to the data to be fetched the majority of registers is 8051
are 8-bikt registers.
2.7 Accumulator (Register A)
Accumulator is a mathematical register where all the arithmetic and logical operations are
done is this register and after execution of instructions the outpour data is stored in the
register is bit addressable near. We can access any of the single bit of this register.A register
is a general-purpose register used for storing intermediate results obtained during operation.
Prior to executing an instruction upon any number or operand it is necessary to store it in the
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 12
accumulator first. All results obtained from arithmetical operations performed by the ALU
are stored in the accumulator. Data to be moved from one register to another must go through
the accumulator. In other words, the A register is the most commonly used register and it is
impossible to imagine a microcontroller without it. More than half instructions used by the
8051 microcontroller use somehow the accumulator.
Figure2.4:Accumulator Register
2.8 B Register:
B register is same as that of accumulator of. It is also an 8 bit register and every bit of this is
accessible. This is also a mathematical register B which is used mostly for multiplication and
division.
Figure2.5:B register
2.9PSW (Program Status Word) Register
Program status word register is an 8 bit register. It is also referred to as the flag register.
Although the PSW register is 8 bits wide, only 6 bits of it are used by the 8051. The unused
bits are user-definable flags. Four of the flags are called conditional flags, meaning that they
Indicate some conditions that result after an instruction is executed. These four are CY
(carry), AC (auxiliary carry), P (parity) and OV (overflow).
CY PSW.7 Carry Flag
AC PSW.6 Auxiliary Carry Flag
F0 PSW.5 Available to the user for
General Purpose
RS1 PSW.4 Register Bank Selector Bit 1
RS0 PSW.3 Register Bank Selector
Bit 0
OV PSW.2 Overflow Flag
-- PSW.1 User Definable Bit
P PSW.0 Parity Flag.
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 13
Figure2.6: Program Status Word Register
PSW register is one of the most important SFRs. It contains several status bits that reflect the
current state of the CPU. Besides, this register contains Carry bit, Auxiliary Carry, two
register bank select bits, Overflow flag, parity bit and user-definable status flag.
RS1 (PSW.4) RS0 (PSW.3)
Bank 0 0 0
Bank 1 0 1
Bank 2 1 0
Bank 3 1 1
Table 2.2: PSW Bit Bank selection
P (Parity bit): If a number stored in the accumulator is even then this bit will be automatically
set (1), otherwise it will be cleared (0). It is mainly used during data transmit and receive via
serial communication.
Bit 1: This bit is intended to be used in the future versions of microcontrollers.
OV( Overflow): Occurs when the result of an arithmetical operation is larger than 255 and
cannot be stored in one register. Overflow condition causes the OV bit to be set (1).
Otherwise, it will be cleared (0).
1RS0, RS1 (Register bank select bits): These two bits are used to select one of four register
banks of RAM. By setting and clearing these bits, registers R0-R7 are stored in one of four
banks of RAM.
F0 (Flag 0): This is a general-purpose bit available for use.
AC (Auxiliary Carry Flag):This is used for BCD operations only.
CY (Carry Flag):This is the (ninth) auxiliary bit used for all arithmetical operations and shift
instructions.
2.10Data Pointer Register (DPTR)
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 14
DPTR register is not a true one because it doesn't physically exist. It consists of two separate
registers: DPH (Data Pointer High) and (Data Pointer Low). For this reason it may be treated
as a 16-bit register or as two independent 8-bit registers. Their 16 bits are primarly used for
external memory addressing. Besides, the DPTR Register is usually used for storing data and
intermediate results.
Figure 2.7:Data Pointer Register
2.11 Stack Pointer (SP) Register
Figure2.8:Stack Pointer Register
A value stored in the Stack Pointer points to the first free stack address and permits stack
availability. Stack pushes increment the value in the Stack Pointer by 1. Likewise, stack pops
decrement its value by 1. Upon any reset and power-on, the value 7 is stored in the Stack
Pointer, which means that the space of RAM reserved for the stack starts at this location. If
another value is written to this register, the entire Stack is moved to the new memory
location.
2.12Internal Memory
The 8051 has two types of memory and these are Program Memory and Data Memory.
Program Memory (ROM) is used to permanently save the program being executed, while
Data Memory (RAM) is used for temporarily storing data and intermediate results created
and used during the operation of the microcontroller. 128 or 256 bytes of RAM is used.
2.12.1 Internal RAM
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 15
As already mentioned, Data Memory is used for temporarily storing data and intermediate
results created and used during the operation of the microcontroller. Besides, RAM memory
built in the 8051 family includes many registers such as hardware counters and timers,
input/output ports, serial data buffers etc. The previous models had 256 RAM locations,
while for the later models this number was incremented by additional 128 registers. However,
the first 256 memory locations (addresses 0-FFh) are the heart of memory common to all the
models belonging to the 8051 family. Locations available to the user occupy memory space
with addresses 0-7Fh, i.e. first 128 registers. This part of RAM is divided in several blocks.
The first block consists of 4 banks each including 8 registers denoted by R0-R7. Prior to
accessing any of these registers, it is necessary to select the bank containing it. The next
memory block (address 20h-2Fh) is bit- addressable, which means that each bit has its own
address (0-7Fh). Since there are 16 such registers, this block contains in total of 128 bits with
separate addresses (address of bit 0 of the 20h byte is 0, while address of bit 7 of the 2Fh byte
is 7Fh). The third group of registers occupy addresses 2Fh-7Fh, i.e. 80 locations, and does not
have any special functions or features.
Figure2.9: RAMMemory Space Allocation
2.12.2 Additional RAM
In order to satisfy the programmers’ constant hunger for Data Memory, the manufacturers
decided to embed an additional memory block of 128 locations into the latest versions of the
8051 microcontrollers. However, it’s not as simple as it seems to be… The problem is that
electronics performing addressing has 1 byte (8 bits) on disposal and is capable of reaching
only the first 256 locations, therefore. In order to keep already existing 8-bit architecture and
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 16
compatibility with other existing models a small trick was done.What does it mean? It means
that additional memory block shares the same addresses with locations intended for the SFRs
(80h- FFh). In order to differentiate between these two physically separated memory spaces,
different ways of addressing are used. The SFRs memory locations are accessed by direct
addressing, while additional RAM memory locations are accessed by indirect addressing.
2.12.3 Internal ROM
The first models of the 8051 microcontroller family did not have internal program memory. It
was added as an external separate chip. These models are recognizable by their label
beginning with 803 (for example 8031 or 8032). All later models have a few Kbyte ROM
embedded. Even though such an amount of memory is sufficient for writing most of the
programs, there are situations when it is necessary to use additional memory as well. A
typical example are so called lookup tables. They are used in cases when equations
describing some processes are too complicated or when there is no time for solving them. In
such cases all necessary estimates and approximates are executed in advance and the final
results are put in the tables (similar to logarithmic tables).EA=0In this case, the
microcontroller completely ignores internal program memory and executes only the program
stored in external memory.EA=1In this case, the microcontroller executes first the program
from built-in ROM, then the program stored in external memory.In both cases, P0 and P2 are
not available for use since being used for data and address transmission. Besides, the ALE
and PSEN pins are also used.
2.12.4 Memory Expansion
In case memory (RAM or ROM) built in the microcontroller is not sufficient, it is possible to
add two external memory chips with capacity of 64Kb each. P2 and P3 I/O ports are used for
their addressing and data transmission.From the user’s point of view, everything works quite
simply when properly connected because most operations are performed by the
microcontroller itself. The 8051 microcontroller has two pins for data read RD(P3.7) and
PSEN. The first one is used for reading data from external data memory (RAM), while the
other is used for reading data from external program memory (ROM). Both pins are active
low.Even though additional memory is rarely used with the latest versions of the
microcontrollers, we will describe in short what happens when memory chips are connected
according to the previous schematic. The whole process described below is performed
automatically.Similar occurs when it is necessary to read location from external RAM.
Addressing is performed in the same way, while read and write are performed via signals
appearing on the control outputs RD (is short for read) or WR (is short for write).
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 17
2.13Special Function Registers (SFRs)
Special Function Registers (SFRs) are a sort of control table used for running and monitoring
the operation of the microcontroller. Each of these registers as well as each bit they include,
has its name, address in the scope of RAM and precisely defined purpose such as timer
control, interrupt control, serial communication control etc. Even though there are 128
memory locations intended to be occupied by them, the basic core, shared by all types of
8051 microcontrollers, has only 21 such registers. Rests of locations are intentionally left
unoccupied in order to enable the manufacturers to further develop microcontrollers keeping
them compatible with the previous versions.
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 18
CHAPTER-3
Counters and Timers
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 19
Counters and Timers
As you already know, the microcontroller oscillator uses quartz crystal for its operation. As
the frequency of this oscillator is precisely defined and very stable, pulses it generates are
always of the same width, which makes them ideal for time measurement. Such crystals are
also used in quartz watches. In order to measure time between two events it is sufficient to
count up pulses coming from this oscillator. That is exactly what the timer does. If the timer
is properly programmed, the value stored in its register will be incremented (or decremented)
with each coming pulse, i.e. once per each machine cycle. A single machine-cycle instruction
lasts for 12 quartz oscillator periods, which means that by embedding quartz with oscillator
frequency of 12MHz, a number stored in the timer register will be changed million times per
second, i.e. each microsecond. The 8051 microcontroller has 2 timers/counters called T0 and
T1. As their names suggest, their main purpose is to measure time and count external events.
Besides, they can be used for generating clock pulses to be used in serial communication,
called Baud Rate.
3.1Timer T0
As seen in figure below, the timer T0 consists of two registers – TH0 and TL0 representing a
low and a high byte of one 16-digit binary number. Accordingly, if the content of the timer
T0 is equal to 0 (T0=0) then both registers it consists of will contain 0. If the timer contains
for example number 1000 (decimal), then the TH0 register (high byte) will contain the
number 3, while the TL0 register (low byte) will contain decimal number 232.
Figure 3.1: Timer 0
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 20
Since the timer T0 is virtually 16-bit register, the largest value it can store is 65 535. In case
Of exceeding this value, the timer will be automatically cleared and counting starts from 0.
This condition is called an overflow. Two registers TMOD and TCON are closely connected
to this timer and control its operation.
3.1.1 TMOD Register (Timer Mode)
The TMOD register selects the operational mode of the timers T0 and T1. As seen in figure
below, the low 4 bits (bit0 - bit3) refer to the timer 0, while the high 4 bits (bit4 - bit7) refer
to the timer 1. There are 4 operational modes and each of them is described herein.
GATE C/T M1 M0 GATE C/T M1 M0
TIMER 1 TIMER 0
Figure3.2-TMOD register
Bits of this register have the following function:
GATE1: enables and disables Timer 1 by means of a signal brought to the INT1 pin (P3.3):
1: Timer 1 operates only if the INT1 bit is set.
0:Timer 1 operates regardless of the logic state of the INT1 bit.
C/T1: selects pulses to be counted up by the timer/counter 1:
1: Timer counts pulses brought to the T1 pin (P3.5).
0 1:Timer counts pulses from internal oscillator.
T1M1, T1M0: These two bits select the operational mode of the Timer 1.
GATE0: enables and disables Timer 1 using a signal brought to the INT0 pin (P3.2).
1 :Timer 0 operates only if the INT0 bit is set.
T1M1 T1M0 Mode Description
0 0 0 13-bit timer
0 1 1 16-bit timer
1 0 2 8-bit auto reload
1 1 3 Split mode
Table 3.1:Timer 1
0: Timer 0 operates regardless of the logic state of the INT0 bit.
C/T0:selects pulses to be counted up by the timer/counter 0:
1: Timer counts pulses brought to the T0 pin (P3.4).
0: Timer counts pulses from internal oscillator.
Tom1 T0m0 Mode Description
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 21
0 0 0 13-Bit Timer
0 1 1 16-Bit Timer
1 0 2 8-Bitauto Reload
1 1 3 Split Mode
Table 3.2:Timer 0
T0M1, T0M0: These two bits select the operational mode of the Timer 0.
Timer 0 in mode 0 (13-bit timer)
This is one of the rarities being kept only for the purpose of compatibility with the previuos
versions of microcontrollers. This mode configures timer 0 as a 13-bit timer which consists of
all 8 bits of TH0 and the lower 5 bits of TL0. As a result, the Timer 0 uses only 13 of 16 bits.
How does it operate? Each coming pulse causes the lower register bits to change their states.
After receiving 32 pulses, this register is loaded and automatically cleared, while the higher
byte (TH0) is incremented by 1. This process is repeated until registers count up 8192 pulses.
After that, both registers are cleared and counting starts from 0.
Timer 0 in mode 1 (16-bit timer)
Mode 1 configures timer 0 as a 16-bit timer comprising all the bits of both registers TH0 and
TL0. That's why this is one of the most commonly used modes. Timer operates in the same
way as in mode 0, with difference that the registers count up to 65 536 as allowable by the 16
bits.
Timer 0 in mode 2 (Auto-Reload Timer)
Mode 2 configures timer 0 as an 8-bit timer. Actually, timer 0 uses only one 8-bit register for
counting and never counts from 0, but from an arbitrary value (0-255) stored in another
(TH0) register.If mode 1 or mode 0 is used, It is necessary to write the number 200 to the
timer registers and constantly check whether an overflow has occured, i.e. whether they
reached the value 255. When it happens, it is necessary to rewrite the number 200 and repeat
the whole procedure. The same procedure is automatically performed by the microcontroller
if set in mode 2. In fact, only the TL0 register operates as a timer, while another (TH0)
register stores the value from which the counting starts. When the TL0 register is loaded,
instead of being cleared, the contents of TH0 will be reloaded to it. Referring to the previous
example, in order to register each 55th pulse, the best solution is to write the number 200 to
the TH0 register and configure the timer to operate in mode 2.
Timer 0 in Mode 3 (Split Timer)
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 22
Mode 3 configures timer 0 so that registers TL0 and TH0 operate as separate 8-bit timers. In
other words, the 16-bit timer consisting of two registers TH0 and TL0 is split into two
independent 8-bit timers. This mode is provided for applications requiring an additional 8-bit
timer or counter. The TL0 timer turns into timer 0, while the TH0 timer turns into timer 1. In
addition, all the control bits of 16-bit Timer 1 (consisting of the TH1 and TL1 register), now
control the 8-bit Timer 1. Even though the 16-bit Timer 1 can still be configured to operate in
any of modes (mode 1, 2 or 3), it is no longer possible to disable it as there is no control bit to
do it. Thus, its operation is restricted when timer 0 is in mode 3.
3.1.2 Timer Control (TCON) Register:
TCON register is also one of the registers whose bits are directly in control of timer
operation. Only 4 bits of this register are used for this purpose, while rest of them is used for
interrupt control to be discussed later.
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 23
Figure 3.3:Timer1 and Timer0 Operation Modes
TF1: bit is automatically set on the Timer 1 overflow.
TR1: bit enables the Timer 1.
1:Timer 1 is enabled.
Figure 3.4: TCON Register
0:Timer 1 is disabled.
TF0: bit is automatically set on the Timer 0 overflow.
TR0: bit enables the timer 0.
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 24
1:Timer 0 is enabled.
0:Timer 0 is disabled.
3.2 Timer 1
Timer 1 is identical to timer 0, except for mode 3 which is a hold-count mode. It means that
they have the same function, their operation is controlled by the same registers TMOD and
TCON and both of them can operate in one out of 4 different modes.
Figure 3.5:Timer 1
Figure 3.6: TH1 and TL1
3.2.1UART (Universal Asynchronous Receiver and Transmitter)
One of the microcontroller features making it so powerful is an integrated UART, better
known as a serial port. It is a full-duplex port, thus being able to transmit and receive data
simultaneously and at different baud rates. Without it, serial data send and receive would be
an enormously complicated part of the program in which the pin state is constantly changed
and checked at regular intervals. When using UART, all the programmer has to do is to
simply select serial port mode and baud rate. Whenit’s done, serial data transmit is nothing
but writing to the SBUF register, while data receive represents reading the same register. The
microcontroller takes care of not making any error during data transmission. In other words,
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 25
Figure 3.7: SBUF Register
it is necessary to determine how many bits is contained in one serial ―word‖, baud rate and
synchronization clock source. The whole process is in control of the bits of the SCON
register (Serial Control).
3.2.2 Serial Port Control (SCON) Register
Figure 3.8:SCON Register
SM0:Serial port mode bit 0 is used for serial port mode selection.
SM1: Serial port mode bit 1.
SM2:Serial port mode 2 bit, also known as multiprocessor communication enable bit. When
set, it enables multiprocessor communication in mode 2 and 3, and eventually mode 1. It
should be cleared in mode 0.
REN:Reception Enable bit enables serial reception when set. When cleared, serial reception
is disabled.
TB8:Transmitter bit 8. Since all registers are 8-bit wide, this bit solves the problem of
transmitting the 9th bit in modes 2 and 3. It is set to transmit a logic 1 in the 9th bit.
RB8:Receiver bit 8 or the 9th bit received in modes 2 and 3. Cleared by hardware if 9th bit
received is logic 0. Set by hardware if 9th bit received is a logic 1.
TI: Transmit Interrupt flag is automatically set at the moment the last bit of one byte is sent.
It's a signal to the processor that the line is available for a new byte transmite. It must be
cleared from within the software.
RI:Receive Interrupt flag is automatically set upon one byte receive. It signals that byte is
received and should be read quickly prior to being replaced by a new data. This bit is also
cleared from within the software.
As seen, serial port mode is selected by combining the SM0 and SM2 bits:
SM0 SM1 MODE Description Baud Rate
0 0 0 8-bit shift register 1/12 the quartz
frequency
0 1 1 8-bit UART Determined by
timer 1
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 26
1 0 2 9-bit UART 1/32 the quartz
frequency
1 1 3 9-bit UART Determined by
timer 1
Table 3.3:SCON Register
In mode 0, serial data are transmitted and received through the RXD pin, while the TXD pin
output clocks. The bout rate is fixed at 1/12 the oscillator frequency. On transmit, the least
significant bit (LSB bit) is sent/received first.
Transmit - Data transmit is initiated by writing data to the SBUF register. In fact, this process
starts after any instruction being performed upon this register. When all 8 bits have been sent,
the TI bit of the SCON register is automatically set.
Receive - Data receive through the RXD pin starts upon the two following conditions are
met: bit REN=1 and RI=0 (both of them are stored in the SCON register). When all 8 bits
have been received, the RI bit of the SCON register is automatically set indicating that one
byte receive is complete.
3.2.3 Baud Rate
Baud Rate is a number of sent/received bits per second. In case the UART is used, baud rate
depends on: selected mode, oscillator frequency and in some cases on the state of the SMOD
bit of the SCON register. All the necessary formulas are specified in the table:
BAUD RATE BIT SMOD
Mode 0 Fosc/12 -
Mode 1 256-TH1 Bit SMOD
Mode 2 Fosc/32
Fosc/64
1
0
Mode 3 256-TH1 -
Table 3.4:Timer 1 as a clock generator
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 27
CHAPTER-4
8051 Microcontroller Interrupts
8051 Microcontroller Interrupts
There are five interrupt sources for the 8051, which means that they can recognize 5 different
events that can interrupt regular program execution. Each interrupt can be enabled or disabled
by setting bits of the IE register.
1. INT0
2. INT1
3. TF0
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 28
4. TF1
5. RI/TI
Now, it is necessary to explain a few details referring to external interrupts- INT0 and INT1.
If the IT0 and IT1 bits of the TCON register are set, an interrupt will be generated on high to
low transition, i.e. on the falling pulse edge (only in that moment). If these bits are cleared, an
interrupt will be continuously executed as far as the pins are held low.
4.1 IE Register (Interrupt Enable)
7 6 5 4 3 2 1 0
EA ET2 ES ET1 EX1 ET0 EX0
Figure 4.1: IE Register (Interrupt Enable)
EA: global interrupt enable/disable:
0: disables all interrupt requests.
1: enables all individual interrupt requests.
ES:enablesor disables serial interrupt:
Figure 4.2:8051 Interrupt Details
0: UART system cannot generate an interrupt.
1: UART system enables an interrupt.
ET1: bit enables or disables Timer 1 interrupt:
0: Timer 1 cannot generate an interrupt.
1: Timer 1 enables an interrupt.
EX1: bit enables or disables external 1 interrupt:
0: change of the pin INT0 logic state cannot generate an interrupt.
1: enables an external interrupt on the pin INT0 state change.
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 29
ET0:bit enables or disables timer 0 interrupt:
0:Timer 0 cannot generate an interrupt.
1: enables timer 0 interrupt.
EX0: bit enables or disables external 0 interrupt:
0:change of the INT1 pin logic state cannot generate an interrupt.
1: enables an external interrupt on the pin INT1 state change.
4.1.1 Interrupt Priorities
If several interrupts are enabled, it may happen that while one of them is in progress, another
one is requested. In order that the microcontroller knows whether to continue operation or
meet a new interrupt request, there is a priority list instructing it what to do.
The priority list offers 3 levels of interrupt priority:
1. Resettheabsolute master. When a reset request arrives, everything is stopped and the
microcontroller restarts.
2. Interrupt priority 1 can be disabled by Reset only.
3. Interrupt priority 0 can be disabled by both Reset and interrupt priority 1.
The IP Register (Interrupt Priority Register) specifies which one of existing interrupt sources
have higher and which one has lower priority. Interrupt priority is usually specified at the
beginning of the program. According to that, there are several possibilities: If an interrupt of
higher priority arrives while an interrupt is in progress, it will be immediately stopped and the
higher priority interrupt will be executed first. If two interrupt requests, at different priority
levels, arrive at the same time then the higher priority interrupt is serviced first. If the both
interrupt requests, at the same priority level, occur one after another, the one which came
later has to wait until routine being in progress ends. If two interrupt requests of equal
priority arrive at the same time then the interrupt to be serviced is selected according to the
following priority list:
1.External interrupt INT0
2.Timer 0 interrupt
3.External Interrupt INT1
4.Timer 1 interrupt
5.Serial Communication Interrupt
4.2 IP Register (Interrupt Priority)
The IP register bits specify the priority level of each interrupt (high or low priority).
7 6 5 4 3 2 1 0
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 30
PT2 PS PT1 PX1 PT0 PX0
Figure 4.3: IP Register (Interrupt Priority)
PS: Serial Port Interrupt priority bit
(Priority 0,Priority 1)
PT1: Timer 1 interruptspriority
(Priority 0,Priority 1)
PX1:External Interrupt INT1 priority
(Priority 0,Priority 1)
PT0: Timer 0 Interrupt Priority
(Priority 0,Priority 1)
PX0: External Interrupt INT0 Priority
(Priority 0,Priority 1)
4.3 Handling Interrupt
When an interrupt request arrives the following occurs:
1.Instruction in progress is ended.
2.The address of the next instruction to execute is pushed on the stack.
3.These addresses store appropriate subroutines processing interrupts. Instead of them, there are
usually jump instructions specifying locations on which these subroutines reside.
4.When an interrupt routine is executed, the address of the next instruction to execute is poped from
the stack to the program counter and interrupted program resumes operation from where it left off.
Table 4.1: All Address Are In Hexadecimal Form
4.4 Reset
Reset occurs when the RS pin is supplied with a positive pulse in duration of at least 2
machine cycles (24 clock cycles of crystal oscillator). After that, the microcontroller
generates an internal reset signal which clears all SFRs, except SBUF registers, Stack Pointer
and ports (the state of the first two ports is not defined, while FF value is written to the ports
configuring all their pins as inputs). Depending on surrounding and purpose of device, the RS
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 31
pin is usually connected to a power-on reset push button or circuit or to both of them. Figure
below illustrates one of the simplestcircuits providing safe power-on reset.
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 32
CHAPTER-5
Interfacing
Interfacing
5.1 LED interfacing
Like a normal diode, an LED consists of a chip of semiconducting material impregnated, or
doped, with impurities to create a p-n junction. As in other diodes, current flows easily from
the p-side, or anode, to the n-side, or cathode, but not in the reverse direction. Charge-
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 33
carriers—electrons and holes—flow into the junction from electrodes with different voltages.
When an electron meets a hole, it falls into a lower energy level, and releases energy in the
form of a photon. The wavelength of the light emitted, and therefore its color, depends on the
band gap energy of the materials forming the p-n junction. In silicon or germanium diodes, the
electrons and holes recombine by a non-radiativetransition which produces no optical
emission, because these are indirect band gap materials. The materials used for an LED have a
direct band gap with energies corresponding to near-infrared, visible or near-ultraviolet light.
LED development began with infrared and red devices made with gallium arsenide. Advances
in materials science have made possible the production of devices with ever-shorter
wavelengths, producing light in a variety ofcolors.Conventional LEDs are made from a
variety of inorganic semiconductor materials, producing the following colors:
Aluminium gallium arsenide (AlGaAs) — red and infrared
Aluminium gallium phosphide (AlGaP) — green
Aluminium gallium indium phosphide (AlGaInP) — high-brightness
orange-red, orange, yellow, and green
Gallium arsenide phosphide (GaAsP) — red, orange-red, orange, and yellow
Gallium phosphide (GaP) — red, yellow and green
Gallium nitride (GaN) — green, pure green (or emerald green), and blue
also white (if it has an AlGaN Quantum Barrier)
/* PROGRAM TO GLOW LED*/
#include<reg51.h>
void delay()
{
int a;
for(a=0;a<=30000;a++);
}
void main()
{
while(1)
{
P2=0x00;
delay();
P2=0xFF;
delay();
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 34
}
5.2 Seven segment display interfacing
Seven Segment
The seven-segment LED display has four individual digits, each with a decimal point. Each
of the seven segments (and the decimal point) in a given digit contains an individual LED.
When a suitable voltage is applied to a given segment LED, current flows through and
illuminates that segment LED. By choosing which segments to illuminate, any of the nine
digits can be shown. For example, as shown in the figure below, a 2 can be displayed by
illuminating segments a, b, d, e, and g.seven segment displays come in two varieties -
common anode (CA) and common cathode (CC). In a CA display, the anodes for the seven
segments and the decimal point are joined into a single circuit node. To illuminate a segment
in a CA display, the voltage on a cathode must be at a suitably lower voltage (about .7V) than
the anode. In a CC display, the cathodes are joined together, and the segments are illuminated
by bringing the anode voltage higher than the cathode node (again, by about .7V). The Dig
labboard uses CA displays.
The seven LEDs in each digit are labeled a-g. Since the
Digilab board usesCA displays, the anodes for each of the
four digits are connected in a common node, so that four
separate anode circuit nodes exist (one per digit).Similar
cathode leads from each digit have also been tied together to
form seven common circuit nodes, so that one node exists for
each segment type. These four anode and seven cathode
circuit nodes are available at the J2connector pins labeled A1-A4 and CA-CG. With this
scheme, any segment of any digit can be driven individually. For example, to illuminate
segments and c in the second digit, the b and c cathode nodes would be brought to a suitable
low voltage (by connecting the corresponding circuit node available at the J2 connector to
ground), and anode 2 would be brought to a suitablehigh voltage (by connecting the
corresponding circuit node available at theJ2 connector to Vdd).
/* PROGRAM TO SWITCH ON SEVEN SEGMENT DISPLAY MOVING FROM LSB TO
MSB */
#include<reg51.h>
void delay()
{
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 35
int a;
for(a=0;a<=30000;a++);
}
void main()
{
P2=0x3F;
delay();
P2=0x30;
delay();
P2=0x5B;
delay();
P2=0x1F;
delay();
P2=0x66;
delay();
P2=0x6D;
delay();
P2=0x7C;
delay();
P2=0x07;
delay();
P2=0x7F;
delay();
P2=0x3F;
delay();
}
5.3Stepper motor interfacing
STEPPER MOTOR
EMotion Control, in electronic terms, means to accurately control the movement of an object
based on either speed, distance, load, inertia or a combination of all these factors. There are
numerous types of motion control systems, including; Stepper Motor, Linear Step Motor, DC
Brush, Brushless, Servo, Brushless Servo and more.stepper motor is an electromechanical
device which converts electrical pulses into discrete mechanical movements. Stepper motor is
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 36
a form of ac. motor .The shaft or spindle of a stepper motor rotates in discrete step increments
when electrical command pulses are applied to it in the proper sequence. The motors rotation
has several direct relationships to these applied input pulses. The sequence of the applied
pulses is directly related to the direction of motor shafts rotation. The speed of the motor
shafts rotation is directly related to the frequency of the input pulses and the length of rotation
is directly related to the number of input pulses applied. For every input pulse, the motor
shaft turns through a specified number of degrees, called a step. Its working principle is one
step rotation for one input pulse. The range of step size mayvary from 0.72 degree to 90
degree. In position control application, if the number of input pulsessent to the motor is
known, the actual position of the driven job can be obtained.A stepper motor differs from a
conventional motor (CM) as under:
Figure 5.1-stepper motor
a. Input to SM is in the form of electric pulses whereas input to a CM is invariably from a
constant voltage source.
b. A CM has a free running shaft whereas shaft of SM moves through angular steps.
5.3.1 Step Angle & Steps per Revolution
Movement associated with a single step, depends on the internal construction of the motor,
inParticular the number of teeth on the stator and the rotor. The step angle is the minimum
degree of rotation associated with a single step. Step per revolution is the total number of
steps needed to rotate one complete rotation or 360degrees (e.g., 180 steps * 2 degree = 360)
Since the stepper motor is not ordinary motor and has four separate coils, which have tobe
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 37
energized one by one in a stepwise fashion. We term them as coil A, B, C and D. At a
particular instant the coil A should get supply and then after some delay the coil B should get
supply and then coil C and then coil D and so on the cycle continues. The more the delay is
introduced between the energizing of the coils the lesser is the speed of the stepper motor
advice versa.
/* PROGRAM USING STEPPER MOTOR*/
#include<reg51.h>
void delay()
{
int a;
for(a=0;a<=6000;a++);
}
void main()
{
P2=0x00;
delay( );
P2=0xff;
delay();
P2=0x00;
delay( );
P2=0xff;
delay();
P2=0x00;
delay( );
P2=0xff;
delay( );
}
5.4 Relay interfacing
The electromagnetic relay consists of a multi-turn coil, wound on an iron core, to form an
electromagnet. When the coil is energized, by passing current through it, the core becomes
temporarilymagnetized. The magnetized core attracts the iron armature. The armature is
pivoted which causes it to operate one or more sets of contacts. When the coil is de-energized
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 38
the armature and contacts are released. The coil can reenergized from a low power source
such as a transistor while the contacts can switch high powers such as the mains supply. The
relay can also be situated remotely from the control source. Relays can generate a very high
voltage across the coil when switched off.This can damage other components in the circuit.
To prevent this a diode is connected across the coil.As there are always some chances of high
voltage spikes back from the switching circuit i.e. heater so an opt coupler/isolator MCT2e is
used. It provides and electrical isolation between the microcontroller and the heater. MCT2e
is a 6-pin IC with a combination of optical transmitter LED and an optical receiver as
phototransistor. Microcontroller is connected to pin no 2 ofMCT2e through a 470-ohm
resistor. Pin no.1 is given +5V supply and pin no.4 is grounded. To handle the current drawn
by the heater a power transistor BC-369 is used as a current driver. Pin no.5 of opt coupler is
connected to the base of transistor. It takes all its output to Vandactivates the heater through
relay circuit. The electromagnetic relay consists of a multi-turn coil, wound on an iron core,
to form an electromagnet. When the coil is energized, by passing current through it, the core
becomes temporarily magnetized. The magnetized core attracts the iron armature. The
armature is pivoted which causes it to operate one or more sets of contacts. When the coil is
de-energized the armature and contacts are released. Relays can generate a very high voltage
across the coil when switched off. This can damage other components in the circuit. To
preventthis diode is connected across the coil. Relay has five points. Out of the 2 operating
points one is permanently connected to the ground and the other point is connected to
thecollector side of the power transistor. When Vreaches the collector side i.e. signal is given
to the operating points the coil gets magnetized and attracts the iron armature. The iron plate
moves from normally connected (NC) position to normally open (NO) position. Thus the
heater gets the phase signal and is ON. To remove the base leakage voltage when no signal is
present a 470-ohmresistance is used.
/* PROGRAM USING RELAY */
#include<reg51.h>
void delay()
{
int a;
for(a=0;a<=6000;a++);
}
sbit relay=P1^1;
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 39
void main()
{
while(1)
{
relay =0;
delay();
delay();
delay();
delay();
delay();
relay=1;
delay();
delay();
delay();
delay();
delay();
}
}
CONCLUSION
The basic architecture and function of a microcontroller is discussed. With examples, the
need for low power microcontroller is illustrated.
Microcontrollers are of prime importance for electronic control and communication of any
modern appliance. Any household appliance e.g. washing machine, refrigerator, air-
conditioner or office appliances e.g. electronic printer, Photostat copier, fax machine contains
one or more microcontrollers. Because of its bulk usage a marginal saving in power for one
8051 results to enormous saving as a whole.
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 40
In any device design, when one feature is optimized another feature degrades. When low
power is achieved the speed or performance may go down. Though this microcontroller
consumes negligible power its other features are comparable to the existing microcontrollers
available in the market.
BIBLOGRAPHY
Sources:
[1] Chris and Dawn Schur’s Robotics and Artificial Life Forms,
http://www.schursastrophotography.com
[2] Wallace, David N., Line Following Robot http://www.lifekludger.net/category/weekly-
links/page/2/
[3] DenmarksTechniskeUniversitethttp://www.sweeper.org
TRAINING REPORT EMBEDDED SYSTEM
DEPARTMENT OF ELECTRONICS AND COMMUNICATION 41
[4], [9] Mike’s Line Following Robot, Central Illinois Robotics Club,
http://www.circ.mtco.com
[5] http://www.leang.com
[6] http://www.cs.umn.edu
[7], [8] Jackson, Ben, http://www.ben.com
[10] http://www.ece.unm.edu
[11] David Cook’s Jet http://www.robotroom.com/jet.html
[12] http://blog.makezine.com
[13] The CBA Line Following Module http://www.budgetbot.com
[14] http://www.james.vroman.com/tecbot1a.htm james@vroman.com
[15] http://www.james.vroman.com/javbot1a.htm

Contenu connexe

Tendances

BLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATION
BLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATIONBLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATION
BLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATIONVarun Divekar
 
Temperature based fan speed control & monitoring using
Temperature based fan speed control & monitoring usingTemperature based fan speed control & monitoring using
Temperature based fan speed control & monitoring usingJagannath Dutta
 
training report on embedded system and AVR
training report on embedded system and AVRtraining report on embedded system and AVR
training report on embedded system and AVRUrvashi Khandelwal
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051Muthu Manickam
 
Programming logic controllers (plc)
Programming  logic controllers (plc)Programming  logic controllers (plc)
Programming logic controllers (plc)Sudhir Reddy
 
What Is a Programmable Logic Controller (PLC)
What Is a Programmable Logic Controller (PLC)What Is a Programmable Logic Controller (PLC)
What Is a Programmable Logic Controller (PLC)yogesh8418
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051Rashmi
 
Electronic Bicycle Lock Mini Project Analog Electronics
Electronic Bicycle Lock Mini Project Analog ElectronicsElectronic Bicycle Lock Mini Project Analog Electronics
Electronic Bicycle Lock Mini Project Analog ElectronicsOmkar Rane
 
Project Report on Embedded Systems
Project Report on Embedded Systems Project Report on Embedded Systems
Project Report on Embedded Systems Suhani Singh
 
Automatic railway gate control
Automatic railway gate controlAutomatic railway gate control
Automatic railway gate controlAtchyuth Sonti
 
Microprocessor & Micro-controller
Microprocessor & Micro-controllerMicroprocessor & Micro-controller
Microprocessor & Micro-controllerOm Bheda
 
Introduction To Embedded Systems
Introduction To Embedded SystemsIntroduction To Embedded Systems
Introduction To Embedded Systemsanishgoel
 
Microgrids : an indian perspective.
Microgrids : an indian perspective.Microgrids : an indian perspective.
Microgrids : an indian perspective.Sumit Raturi
 
Microcontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingMicrocontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingNilesh Bhaskarrao Bahadure
 
Direct Digital Control
Direct Digital ControlDirect Digital Control
Direct Digital ControlIOSR Journals
 

Tendances (20)

BLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATION
BLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATIONBLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATION
BLUETOOTH CONTROL ROBOT WITH ANDROID APPLICATION
 
Temperature based fan speed control & monitoring using
Temperature based fan speed control & monitoring usingTemperature based fan speed control & monitoring using
Temperature based fan speed control & monitoring using
 
Embedded system.ppt
Embedded system.pptEmbedded system.ppt
Embedded system.ppt
 
training report on embedded system and AVR
training report on embedded system and AVRtraining report on embedded system and AVR
training report on embedded system and AVR
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
 
Programming logic controllers (plc)
Programming  logic controllers (plc)Programming  logic controllers (plc)
Programming logic controllers (plc)
 
What Is a Programmable Logic Controller (PLC)
What Is a Programmable Logic Controller (PLC)What Is a Programmable Logic Controller (PLC)
What Is a Programmable Logic Controller (PLC)
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
Microcontroller
MicrocontrollerMicrocontroller
Microcontroller
 
Electronic Bicycle Lock Mini Project Analog Electronics
Electronic Bicycle Lock Mini Project Analog ElectronicsElectronic Bicycle Lock Mini Project Analog Electronics
Electronic Bicycle Lock Mini Project Analog Electronics
 
embedded system and AVR
embedded system and AVRembedded system and AVR
embedded system and AVR
 
Project Report on Embedded Systems
Project Report on Embedded Systems Project Report on Embedded Systems
Project Report on Embedded Systems
 
Automatic railway gate control
Automatic railway gate controlAutomatic railway gate control
Automatic railway gate control
 
Embedded system seminar
Embedded system seminarEmbedded system seminar
Embedded system seminar
 
Microprocessor & Micro-controller
Microprocessor & Micro-controllerMicroprocessor & Micro-controller
Microprocessor & Micro-controller
 
Introduction To Embedded Systems
Introduction To Embedded SystemsIntroduction To Embedded Systems
Introduction To Embedded Systems
 
Microgrids : an indian perspective.
Microgrids : an indian perspective.Microgrids : an indian perspective.
Microgrids : an indian perspective.
 
Microcontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingMicrocontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programming
 
ATmega 16
ATmega 16ATmega 16
ATmega 16
 
Direct Digital Control
Direct Digital ControlDirect Digital Control
Direct Digital Control
 

Similaire à Project Report On Micro-controller Embedded System

INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxMeghdeepSingh
 
Microcontroller presentation
Microcontroller presentationMicrocontroller presentation
Microcontroller presentationxavierpaulino
 
Introduction to embedded systems using the msp430 6. 1 Enumerate the.pdf
Introduction to embedded systems using the msp430 6. 1 Enumerate the.pdfIntroduction to embedded systems using the msp430 6. 1 Enumerate the.pdf
Introduction to embedded systems using the msp430 6. 1 Enumerate the.pdfaienterpresses
 
Introduction to embedded systems using the msp430 6.1 Enumerate the .pdf
Introduction to embedded systems using the msp430 6.1 Enumerate the .pdfIntroduction to embedded systems using the msp430 6.1 Enumerate the .pdf
Introduction to embedded systems using the msp430 6.1 Enumerate the .pdfaienterpresses
 
MergeResult_2023_04_02_05_26_56.pptx
MergeResult_2023_04_02_05_26_56.pptxMergeResult_2023_04_02_05_26_56.pptx
MergeResult_2023_04_02_05_26_56.pptxbhaveshagrawal35
 
Embedded systems class notes
Embedded systems  class notes Embedded systems  class notes
Embedded systems class notes Dr.YNM
 
Module 5 embedded systems,8051
Module 5 embedded systems,8051Module 5 embedded systems,8051
Module 5 embedded systems,8051Deepak John
 
Microcontoller and Embedded System
Microcontoller and Embedded SystemMicrocontoller and Embedded System
Microcontoller and Embedded SystemKaran Thakkar
 
Appliances control through sms
Appliances control through smsAppliances control through sms
Appliances control through smsAbhay Pratap
 
8051 microcontroller Microcontroller _2024.pptx
8051 microcontroller Microcontroller _2024.pptx8051 microcontroller Microcontroller _2024.pptx
8051 microcontroller Microcontroller _2024.pptxrohithansaliya2
 
Embedded system 8051 Microcontroller
Embedded system 8051 MicrocontrollerEmbedded system 8051 Microcontroller
Embedded system 8051 Microcontrollerankitsharmaj
 
Wireless energy meter monitoring with automated tariff calculation
Wireless energy meter monitoring with automated tariff calculationWireless energy meter monitoring with automated tariff calculation
Wireless energy meter monitoring with automated tariff calculationUdayalakshmi JK
 
Microcontroller 8051 timer 274 P$
Microcontroller 8051 timer 274 P$Microcontroller 8051 timer 274 P$
Microcontroller 8051 timer 274 P$PusHkar SaIni
 
Embedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - MtechEmbedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - Mtechsangeetha rakhi
 
Solution manual the 8051 microcontroller based embedded systems
Solution manual the 8051 microcontroller based embedded systemsSolution manual the 8051 microcontroller based embedded systems
Solution manual the 8051 microcontroller based embedded systemsmanishpatel_79
 
The 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsThe 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsmanishpatel_79
 

Similaire à Project Report On Micro-controller Embedded System (20)

INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
 
Microcontroller presentation
Microcontroller presentationMicrocontroller presentation
Microcontroller presentation
 
Introduction to embedded systems using the msp430 6. 1 Enumerate the.pdf
Introduction to embedded systems using the msp430 6. 1 Enumerate the.pdfIntroduction to embedded systems using the msp430 6. 1 Enumerate the.pdf
Introduction to embedded systems using the msp430 6. 1 Enumerate the.pdf
 
Introduction to embedded systems using the msp430 6.1 Enumerate the .pdf
Introduction to embedded systems using the msp430 6.1 Enumerate the .pdfIntroduction to embedded systems using the msp430 6.1 Enumerate the .pdf
Introduction to embedded systems using the msp430 6.1 Enumerate the .pdf
 
MergeResult_2023_04_02_05_26_56.pptx
MergeResult_2023_04_02_05_26_56.pptxMergeResult_2023_04_02_05_26_56.pptx
MergeResult_2023_04_02_05_26_56.pptx
 
Vinod ppt on es31 08 15
Vinod ppt on es31 08 15Vinod ppt on es31 08 15
Vinod ppt on es31 08 15
 
LECT 2.pptx
LECT 2.pptxLECT 2.pptx
LECT 2.pptx
 
Embedded systems class notes
Embedded systems  class notes Embedded systems  class notes
Embedded systems class notes
 
Module 5 embedded systems,8051
Module 5 embedded systems,8051Module 5 embedded systems,8051
Module 5 embedded systems,8051
 
Microcontoller and Embedded System
Microcontoller and Embedded SystemMicrocontoller and Embedded System
Microcontoller and Embedded System
 
Appliances control through sms
Appliances control through smsAppliances control through sms
Appliances control through sms
 
8051 microcontroller Microcontroller _2024.pptx
8051 microcontroller Microcontroller _2024.pptx8051 microcontroller Microcontroller _2024.pptx
8051 microcontroller Microcontroller _2024.pptx
 
Embedded system 8051 Microcontroller
Embedded system 8051 MicrocontrollerEmbedded system 8051 Microcontroller
Embedded system 8051 Microcontroller
 
Embedded System Basics
Embedded System BasicsEmbedded System Basics
Embedded System Basics
 
Wireless energy meter monitoring with automated tariff calculation
Wireless energy meter monitoring with automated tariff calculationWireless energy meter monitoring with automated tariff calculation
Wireless energy meter monitoring with automated tariff calculation
 
AT89 S52
AT89 S52AT89 S52
AT89 S52
 
Microcontroller 8051 timer 274 P$
Microcontroller 8051 timer 274 P$Microcontroller 8051 timer 274 P$
Microcontroller 8051 timer 274 P$
 
Embedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - MtechEmbedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - Mtech
 
Solution manual the 8051 microcontroller based embedded systems
Solution manual the 8051 microcontroller based embedded systemsSolution manual the 8051 microcontroller based embedded systems
Solution manual the 8051 microcontroller based embedded systems
 
The 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsThe 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systems
 

Plus de Rkrishna Mishra

Plus de Rkrishna Mishra (6)

Speed checker on highway using 8051
Speed checker on highway using 8051Speed checker on highway using 8051
Speed checker on highway using 8051
 
Introduction of Cloud computing
Introduction of Cloud computingIntroduction of Cloud computing
Introduction of Cloud computing
 
Java Basics
Java BasicsJava Basics
Java Basics
 
Java Programming Basics
Java Programming BasicsJava Programming Basics
Java Programming Basics
 
Traffic light controller
Traffic light controllerTraffic light controller
Traffic light controller
 
Programs of VHDL
Programs of VHDLPrograms of VHDL
Programs of VHDL
 

Dernier

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 

Dernier (20)

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 

Project Report On Micro-controller Embedded System

  • 1. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 1 CHAPTER-1 IntroductionTo Embedded System
  • 2. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 2 Introduction To Embedded System 1.1 Introduction Microcontroller are widely used in Embedded System products. An Embedded product uses the microprocessor(or microcontroller) to do one task & one task only. A printer is an example of Embedded system since the processor inside it perform one task only namely getting the data and printing it. Although microcontroller are preferred choice for many Embedded systems, There are times that a microcontroller is inadequate for the task. For this reason in recent years many manufactures of general purpose microprocessors such as INTEL, Motorolla, AMD & Cyrix have targeted their microprocessors for the high end of Embedded market.One of the most critical needs of the embedded system is to decrease power consumptions and space. This can be achieved by integrating more functions into the CPU chips. All the embedded processors have low power consumptions in additions to some forms of I/O,ROM all on a single chip. In higher performance Embedded system the trend is to integrate more & more function on the CPU chip & let the designer decide which feature he/she wants to use. 1.2 Embedded System An Embedded System employs a combination of hardware & software to perform a specific function. Software is used for providing features and flexibility hardware(Processors, Memory...) is used for performance & sometimes security.An embedded system is a special purpose system in which the computer is completely encapsulated by the device it controls. Unlike a general purpose computer, such as a PC, an embedded system performs predefined task’s usually with very specific tasks design engineers can optimize it reducing the size and cost of the product. Embedded systems are often mass produced, so the cost savings may be multiplied by millions of items.The core of any embedded system is formed by one or several microprocessor or micro controller programmed to perform a small number of tasks. In contrast to a general purpose computer, which can run any software application, the user chooses, the software on an embedded system is semi-permanent, so it is often called firmware. 1.3 Examples of Embedded System 1. Automated tiller machines (ATMS). 2. Integrated system in aircraft and missile. 3.Cellular telephones and telephonic switches. 4. Computer network equipment, including routers timeservers and firewalls
  • 3. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 3 5. Computer printers, Copiers. 6. Disk drives (floppy disk drive and hard disk drive) 7. Engine controllers and antilock brake controllers for automobiles. 8. Home automation products like thermostat, air conditioners sprinkles and security monitoring system. 9. House hold appliances including microwave ovens, washing machines, TV sets DVD players/recorders. 10. Medical equipment. 11. Measurement equipment such as digital storage oscilloscopes, logic analyzers and spectrum analyzers. 12. Multimedia appliances: internet radio receivers, TV set top boxes. 13. Small hand held computer with P1M5 and other applications. 14. Programmable logic controllers (PLC’s) for industrial automation and monitoring. 15. Stationary video game controllers. 1.4 Microprocessor (MPU) A microprocessor is a general-purpose digital computer central processing unit(CPU). Although popularly known as a ―computer on a chip‖ is in no sense a complete digital computer. The block diagram of a microprocessor CPU is shown, which contains an arithmetic and logical unit (ALU), a program counter (PC), a stack pointer (SP),some working registers, a clock timing circuit, and interrupt circuits. Figure1.1:Block Diagram Of a Microprocessor 1.5 Microcontroller (MCU) Figure shows the block diagram of a typical microcontroller. The design incorporates all of the features found in micro-processor CPU: ALU, PC, SP, and registers. It also added the other features needed to make a complete computer: ROM, RAM, parallel I/O, serial I/O, counters, and clock circuit. RAM CPU GeneralMICR OCONTROL LERS (MCU)- Purpose ROM I/O Port Timer Serial COM Port
  • 4. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 4 Figure1.2:Block Diagram Ofa Microcontroller 1.6 Comparision Between Microprocessor And Microcontroller The microprocessor must have many additional parts to be operational as a computer whereas microcontroller requires no additional external digital parts. 1. The prime use of microprocessor is to read data, perform extensive calculations on that data and store them in the mass storage device or display it. The prime functions of microcontroller is to read data, perform limited calculations on it, control its environment based on these data. Thus the microprocessor is said to be general-purpose digital computers whereas the microcontroller are intend to be special purpose digital controller. 2. Microprocessor need many opcodes for moving data from the external memory to the CPU, microcontroller may require just one or two, also microprocessor may have one or two types of bit handling instructions whereas microcontrollers have many. 3. Thus microprocessor is concerned with the rapid movement of the code and data from the external addresses to the chip, microcontroller is concerned with the rapid movement of the bits within the chip. 4. Lastly, the microprocessor design accomplishes the goal of flexibility in the hardware configuration by enabling large amounts of memory and I/O that could be connected to the address and data pins on the IC package. The microcontroller design uses much more limited.
  • 5. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 5 CHAPTER-2 THE 8051 ARCHITECTURE
  • 6. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 6 THE 8051 ARCHITECTURE 2.1About the 8051 The Intel 8051 is an 8-bit microcontroller which means that most available operations are limited to 8 bits. There are 3 basic "sizes" of the 8051: Short, Standard, and Extended. The Short and Standard chips are often available in DIP (dual in-line package) form, but the Extended 8051 models often have a different form factor, and are not "drop-in compatible". 2.2Block Diagram Figure 2.1:Block Diagram of 8051 All these things are called 8051 because they can all be programmed using 8051 assembly language, and they all share certain features (although the different models all have their own special features).Some of the features that have made the 8051 popular are: 4 KB on chip program memory. 128 bytes on chip data memory(RAM). 4 register banks. 8-bit data bus 16-bit address bus
  • 7. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 7 32 general purpose registers each of 8 bits 16 bit timers (usually 2, but may have more, or less). 3 internal and 2 external interrupts. Bit as well as byte addressable RAM area of 16 bytes. Four 8-bit ports, (short models have two 8-bit ports). 16-bit program counter and data pointer. 1 Microsecond instruction cycle with 12 MHz Crystal. 8051 models may also have a number of special, model-specific features, such as UARTs, ADC, OpAmps, etc... 2.3Typical applications 8051 chips are used in a wide variety of control systems, telecom applications, and robotics as well as in the automotive industry. By some estimation, 8051 family chips make up over 50% of the embedded chip market.The 8051 has been in use in a wide number of devices, mainly because it is easy to integrate into a project or build a device around. The following are the main areas of focus: 1.Energy Management:Efficient metering systems help in controlling energy usage in homes and industrial applications. These metering systems are made capable by incorporating microcontrollers. 2.Touch screens:A high number of microcontroller providers incorporate touch-sensing capabilities in their designs. Portable electronics such as cell phones, media players and gaming devices are examples of microcontroller-based touch screens. 3.Automobiles: The 8051 finds wide acceptance in providing automobile solutions. They are widely used in hybrid vehicles to manage engine variants. Additionally, functions such as cruise control and anti-brake system have been made more efficient with the use of microcontrollers. So the microcontroller 8051 has great advantage in the field of the automobiles. 4. Medical Devices: Portable medical devices such as blood pressure and glucose monitors use microcontrollers will to display data, thus providing higher reliability in providing medical results. 2.4Pinout Description Pin 1-8(Port 1): Each of these pins can be configured as an input or an output.
  • 8. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 8 Pin 9(RST): A logic one on this pin disables the microcontroller and clears the contents ofmost registers. In other words, the positive voltage on this pin resets the microcontroller. By Figure 2.2:Pin diagram of the 8051 DIP applying logic zero to this pin, the program starts execution from the beginning. Pin 9 is the RESET pin. It is an input and is active high. Upon applying a high pulse to this pin the microcontroller well reset and terminate all activities. This is often referred to as a power on reset .Activating a power on reset will cause all values the registers to be lost. It will set program counter to all 0s.In order for the RESET input to be effective it must have a minimum duration of two machine cycles. In other words the high pulse must be high for a minimum of two machine cycles before it is allowed to go low. Pin 10-17(Port 3): Similar to port 1, each of these pins can serve as general input or output. Besides, all of them have alternative functions: Pin 10(RXD):Serial asynchronous communication input or Serial synchronous communication output. Pin 11(TXD):Serial asynchronous communication output or Serial synchronous communication clock output. Pin 12(INT0):Interrupt 0 input. Pin 13(INT1):Interrupt 1 input. Pin 14(T0):Counter 0 clock input.
  • 9. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 9 Pin 15(T1):Counter 1 clock input. Pin 16(WR):Write to external (additional) RAM. Pin 17(RD):Read from external RAM. Pin 18, 19(X2,X1):Internal oscillator input and output. The 8051 has an on chip oscillator but requires an external clock to run it. Most often a quartz crystal oscillator is connected to inputs XTAL1 (pin 19) and XTAL2 (pin 18). The quartz crystal oscillator connected to XTAL1 and XTAL2 also needs two capacitors of 30 pf value. One side of each capacitor is connected to the ground. Speed refers to the maximum oscillator frequency connected to XTAL Figure2.3:Oscillator Circuit and Timing Pin 20(GND):Ground. Pin 21-28(Port 2):If there is no intention to use external memory then these port pins are configured as general inputs/outputs. In case external memory is used, the higher address byte, i.e. addresses A8-A15 will appear on this port. Even though memory with capacity of 64Kb is not used, which means that not all eight port bits are used for its addressing, the rest of them are not available as inputs/outputs. Pin 29(PSEN):This is an output pin. PSEN stands for ―program store enable‖. If external ROM is used for storing program then a logic zero (0) appears on it every time the microcontroller reads a byte from memory. Pin 30(ALE):ALE stands for ―address latch enable. It is an output pin and is active high. When connecting an 8031 to external memory, port 0 provides both address and data. In other words the 8031 multiplexes address and data through port 0 to save pins. The ALE pin is used for de-multiplexing the address and data.
  • 10. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 10 Prior to reading from external memory, the microcontroller puts the lower address byte (A0- A7) on P0. In other words, this port is used for both data and address transmission. Pin 31(EA):EA which stands for ―external access‖ is pin number 31 in the DIP packages. It is an input pin and must be connected to either Vcc or GND. In other words it cannot be unconnected. By applying logic zero to this pin, P2 and P3 are used for data and address transmission with no regard to whether there is internal memory or not. It means that even there is a program written to the microcontroller, it will not be executed. Instead, the program writtento external ROM will be executed. By applying logic one to the EA pin, the microcontroller will use both memories, first internal then external (if exists). Pin 32-39(Port 0): Similar to P2, if external memory is not used, these pins can be used as general inputs/outputs. Otherwise, P0 is configured as address output (A0-A7) when the ALE pin is driven high (1) or as data output (Data Bus) when the ALE pin is driven low (0). Pin 40(Vcc):+5V power supply. 2.5PORTS 0,1,2,3: All the ports upon RESET are configured as input, since P0-P3 have value FFH on them. The following is a summary of features of P0-P3. PORT 0: Port 0 is also designated as AD0-AD7 allowing it to be used for both address and data. When connecting an 8051/31 to an external memory, port 0 provides both address and data. The 8051 multiplexes address and data through port 0 to save pins. ALE indicates if p0 has address A0-A7.in the 8051 based systems where there is no external memory connection the pins of P0 must be connected externally to 10k-ohm pull-up resistor. This is due to the fact that P0 is an open drain, unlike P1, P2 and P3. Open drain is a term used for MOS chips in the same way that open collector is used for TTL chips. In many systems using the 8751, 89c51 or DS89c4*0 chips we normally connect P0 to pull up resistors. PORT 1, PORT 2: In 8051 based systems with no external memory connection both P1 and P2 are used as simple I/O. however in 8031/51 based systems with external memory connections P2 must be used along with P0 to provide the 16-bit address for the external memory. P2 is also designated as A8-A15 indicating its dual function. Since an 8031/51 is capable of accessing 64k bytes of external memory it needs a path for the 16 bits of address. While P0 provides the lower 8 bits via A0-a7 it is the job P2 to provide bits A8-A15 of the address. In other words
  • 11. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 11 when the 8031/51 is connected to external memory P2 is used for the upper 8 bits of the 16 bit address and it cannot be used for I/O. PORT 3: Port 3 occupies a total of 8 pins 10 through 17. It can be used as input or output. P3 does not need any pull-up resistors the same as P1 and P2 did not. Although port 3 is configured as input port upon reset this is not the way it is most commonly used. Port 3 has the additional function of providing some extremely important signals such as interrupts. P3 BitFunction Pin P3.0 RXD 10 P3.1 TXD 11 P3.2 INT0 12 P3.3 INT1 13 P3.4 T0 14 P3.5 T1 15 P3.6 WR 16 P3.7 RD 17 Table 2.1:Port 3 Alternate function 2.6 Programming Model Of 8051 In programming model of 8051 we have different types of registers are available and these registers are used to store temporarily data is then the information could be a byte of data to be processed or an address pointing to the data to be fetched the majority of registers is 8051 are 8-bikt registers. 2.7 Accumulator (Register A) Accumulator is a mathematical register where all the arithmetic and logical operations are done is this register and after execution of instructions the outpour data is stored in the register is bit addressable near. We can access any of the single bit of this register.A register is a general-purpose register used for storing intermediate results obtained during operation. Prior to executing an instruction upon any number or operand it is necessary to store it in the
  • 12. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 12 accumulator first. All results obtained from arithmetical operations performed by the ALU are stored in the accumulator. Data to be moved from one register to another must go through the accumulator. In other words, the A register is the most commonly used register and it is impossible to imagine a microcontroller without it. More than half instructions used by the 8051 microcontroller use somehow the accumulator. Figure2.4:Accumulator Register 2.8 B Register: B register is same as that of accumulator of. It is also an 8 bit register and every bit of this is accessible. This is also a mathematical register B which is used mostly for multiplication and division. Figure2.5:B register 2.9PSW (Program Status Word) Register Program status word register is an 8 bit register. It is also referred to as the flag register. Although the PSW register is 8 bits wide, only 6 bits of it are used by the 8051. The unused bits are user-definable flags. Four of the flags are called conditional flags, meaning that they Indicate some conditions that result after an instruction is executed. These four are CY (carry), AC (auxiliary carry), P (parity) and OV (overflow). CY PSW.7 Carry Flag AC PSW.6 Auxiliary Carry Flag F0 PSW.5 Available to the user for General Purpose RS1 PSW.4 Register Bank Selector Bit 1 RS0 PSW.3 Register Bank Selector Bit 0 OV PSW.2 Overflow Flag -- PSW.1 User Definable Bit P PSW.0 Parity Flag.
  • 13. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 13 Figure2.6: Program Status Word Register PSW register is one of the most important SFRs. It contains several status bits that reflect the current state of the CPU. Besides, this register contains Carry bit, Auxiliary Carry, two register bank select bits, Overflow flag, parity bit and user-definable status flag. RS1 (PSW.4) RS0 (PSW.3) Bank 0 0 0 Bank 1 0 1 Bank 2 1 0 Bank 3 1 1 Table 2.2: PSW Bit Bank selection P (Parity bit): If a number stored in the accumulator is even then this bit will be automatically set (1), otherwise it will be cleared (0). It is mainly used during data transmit and receive via serial communication. Bit 1: This bit is intended to be used in the future versions of microcontrollers. OV( Overflow): Occurs when the result of an arithmetical operation is larger than 255 and cannot be stored in one register. Overflow condition causes the OV bit to be set (1). Otherwise, it will be cleared (0). 1RS0, RS1 (Register bank select bits): These two bits are used to select one of four register banks of RAM. By setting and clearing these bits, registers R0-R7 are stored in one of four banks of RAM. F0 (Flag 0): This is a general-purpose bit available for use. AC (Auxiliary Carry Flag):This is used for BCD operations only. CY (Carry Flag):This is the (ninth) auxiliary bit used for all arithmetical operations and shift instructions. 2.10Data Pointer Register (DPTR)
  • 14. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 14 DPTR register is not a true one because it doesn't physically exist. It consists of two separate registers: DPH (Data Pointer High) and (Data Pointer Low). For this reason it may be treated as a 16-bit register or as two independent 8-bit registers. Their 16 bits are primarly used for external memory addressing. Besides, the DPTR Register is usually used for storing data and intermediate results. Figure 2.7:Data Pointer Register 2.11 Stack Pointer (SP) Register Figure2.8:Stack Pointer Register A value stored in the Stack Pointer points to the first free stack address and permits stack availability. Stack pushes increment the value in the Stack Pointer by 1. Likewise, stack pops decrement its value by 1. Upon any reset and power-on, the value 7 is stored in the Stack Pointer, which means that the space of RAM reserved for the stack starts at this location. If another value is written to this register, the entire Stack is moved to the new memory location. 2.12Internal Memory The 8051 has two types of memory and these are Program Memory and Data Memory. Program Memory (ROM) is used to permanently save the program being executed, while Data Memory (RAM) is used for temporarily storing data and intermediate results created and used during the operation of the microcontroller. 128 or 256 bytes of RAM is used. 2.12.1 Internal RAM
  • 15. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 15 As already mentioned, Data Memory is used for temporarily storing data and intermediate results created and used during the operation of the microcontroller. Besides, RAM memory built in the 8051 family includes many registers such as hardware counters and timers, input/output ports, serial data buffers etc. The previous models had 256 RAM locations, while for the later models this number was incremented by additional 128 registers. However, the first 256 memory locations (addresses 0-FFh) are the heart of memory common to all the models belonging to the 8051 family. Locations available to the user occupy memory space with addresses 0-7Fh, i.e. first 128 registers. This part of RAM is divided in several blocks. The first block consists of 4 banks each including 8 registers denoted by R0-R7. Prior to accessing any of these registers, it is necessary to select the bank containing it. The next memory block (address 20h-2Fh) is bit- addressable, which means that each bit has its own address (0-7Fh). Since there are 16 such registers, this block contains in total of 128 bits with separate addresses (address of bit 0 of the 20h byte is 0, while address of bit 7 of the 2Fh byte is 7Fh). The third group of registers occupy addresses 2Fh-7Fh, i.e. 80 locations, and does not have any special functions or features. Figure2.9: RAMMemory Space Allocation 2.12.2 Additional RAM In order to satisfy the programmers’ constant hunger for Data Memory, the manufacturers decided to embed an additional memory block of 128 locations into the latest versions of the 8051 microcontrollers. However, it’s not as simple as it seems to be… The problem is that electronics performing addressing has 1 byte (8 bits) on disposal and is capable of reaching only the first 256 locations, therefore. In order to keep already existing 8-bit architecture and
  • 16. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 16 compatibility with other existing models a small trick was done.What does it mean? It means that additional memory block shares the same addresses with locations intended for the SFRs (80h- FFh). In order to differentiate between these two physically separated memory spaces, different ways of addressing are used. The SFRs memory locations are accessed by direct addressing, while additional RAM memory locations are accessed by indirect addressing. 2.12.3 Internal ROM The first models of the 8051 microcontroller family did not have internal program memory. It was added as an external separate chip. These models are recognizable by their label beginning with 803 (for example 8031 or 8032). All later models have a few Kbyte ROM embedded. Even though such an amount of memory is sufficient for writing most of the programs, there are situations when it is necessary to use additional memory as well. A typical example are so called lookup tables. They are used in cases when equations describing some processes are too complicated or when there is no time for solving them. In such cases all necessary estimates and approximates are executed in advance and the final results are put in the tables (similar to logarithmic tables).EA=0In this case, the microcontroller completely ignores internal program memory and executes only the program stored in external memory.EA=1In this case, the microcontroller executes first the program from built-in ROM, then the program stored in external memory.In both cases, P0 and P2 are not available for use since being used for data and address transmission. Besides, the ALE and PSEN pins are also used. 2.12.4 Memory Expansion In case memory (RAM or ROM) built in the microcontroller is not sufficient, it is possible to add two external memory chips with capacity of 64Kb each. P2 and P3 I/O ports are used for their addressing and data transmission.From the user’s point of view, everything works quite simply when properly connected because most operations are performed by the microcontroller itself. The 8051 microcontroller has two pins for data read RD(P3.7) and PSEN. The first one is used for reading data from external data memory (RAM), while the other is used for reading data from external program memory (ROM). Both pins are active low.Even though additional memory is rarely used with the latest versions of the microcontrollers, we will describe in short what happens when memory chips are connected according to the previous schematic. The whole process described below is performed automatically.Similar occurs when it is necessary to read location from external RAM. Addressing is performed in the same way, while read and write are performed via signals appearing on the control outputs RD (is short for read) or WR (is short for write).
  • 17. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 17 2.13Special Function Registers (SFRs) Special Function Registers (SFRs) are a sort of control table used for running and monitoring the operation of the microcontroller. Each of these registers as well as each bit they include, has its name, address in the scope of RAM and precisely defined purpose such as timer control, interrupt control, serial communication control etc. Even though there are 128 memory locations intended to be occupied by them, the basic core, shared by all types of 8051 microcontrollers, has only 21 such registers. Rests of locations are intentionally left unoccupied in order to enable the manufacturers to further develop microcontrollers keeping them compatible with the previous versions.
  • 18. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 18 CHAPTER-3 Counters and Timers
  • 19. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 19 Counters and Timers As you already know, the microcontroller oscillator uses quartz crystal for its operation. As the frequency of this oscillator is precisely defined and very stable, pulses it generates are always of the same width, which makes them ideal for time measurement. Such crystals are also used in quartz watches. In order to measure time between two events it is sufficient to count up pulses coming from this oscillator. That is exactly what the timer does. If the timer is properly programmed, the value stored in its register will be incremented (or decremented) with each coming pulse, i.e. once per each machine cycle. A single machine-cycle instruction lasts for 12 quartz oscillator periods, which means that by embedding quartz with oscillator frequency of 12MHz, a number stored in the timer register will be changed million times per second, i.e. each microsecond. The 8051 microcontroller has 2 timers/counters called T0 and T1. As their names suggest, their main purpose is to measure time and count external events. Besides, they can be used for generating clock pulses to be used in serial communication, called Baud Rate. 3.1Timer T0 As seen in figure below, the timer T0 consists of two registers – TH0 and TL0 representing a low and a high byte of one 16-digit binary number. Accordingly, if the content of the timer T0 is equal to 0 (T0=0) then both registers it consists of will contain 0. If the timer contains for example number 1000 (decimal), then the TH0 register (high byte) will contain the number 3, while the TL0 register (low byte) will contain decimal number 232. Figure 3.1: Timer 0
  • 20. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 20 Since the timer T0 is virtually 16-bit register, the largest value it can store is 65 535. In case Of exceeding this value, the timer will be automatically cleared and counting starts from 0. This condition is called an overflow. Two registers TMOD and TCON are closely connected to this timer and control its operation. 3.1.1 TMOD Register (Timer Mode) The TMOD register selects the operational mode of the timers T0 and T1. As seen in figure below, the low 4 bits (bit0 - bit3) refer to the timer 0, while the high 4 bits (bit4 - bit7) refer to the timer 1. There are 4 operational modes and each of them is described herein. GATE C/T M1 M0 GATE C/T M1 M0 TIMER 1 TIMER 0 Figure3.2-TMOD register Bits of this register have the following function: GATE1: enables and disables Timer 1 by means of a signal brought to the INT1 pin (P3.3): 1: Timer 1 operates only if the INT1 bit is set. 0:Timer 1 operates regardless of the logic state of the INT1 bit. C/T1: selects pulses to be counted up by the timer/counter 1: 1: Timer counts pulses brought to the T1 pin (P3.5). 0 1:Timer counts pulses from internal oscillator. T1M1, T1M0: These two bits select the operational mode of the Timer 1. GATE0: enables and disables Timer 1 using a signal brought to the INT0 pin (P3.2). 1 :Timer 0 operates only if the INT0 bit is set. T1M1 T1M0 Mode Description 0 0 0 13-bit timer 0 1 1 16-bit timer 1 0 2 8-bit auto reload 1 1 3 Split mode Table 3.1:Timer 1 0: Timer 0 operates regardless of the logic state of the INT0 bit. C/T0:selects pulses to be counted up by the timer/counter 0: 1: Timer counts pulses brought to the T0 pin (P3.4). 0: Timer counts pulses from internal oscillator. Tom1 T0m0 Mode Description
  • 21. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 21 0 0 0 13-Bit Timer 0 1 1 16-Bit Timer 1 0 2 8-Bitauto Reload 1 1 3 Split Mode Table 3.2:Timer 0 T0M1, T0M0: These two bits select the operational mode of the Timer 0. Timer 0 in mode 0 (13-bit timer) This is one of the rarities being kept only for the purpose of compatibility with the previuos versions of microcontrollers. This mode configures timer 0 as a 13-bit timer which consists of all 8 bits of TH0 and the lower 5 bits of TL0. As a result, the Timer 0 uses only 13 of 16 bits. How does it operate? Each coming pulse causes the lower register bits to change their states. After receiving 32 pulses, this register is loaded and automatically cleared, while the higher byte (TH0) is incremented by 1. This process is repeated until registers count up 8192 pulses. After that, both registers are cleared and counting starts from 0. Timer 0 in mode 1 (16-bit timer) Mode 1 configures timer 0 as a 16-bit timer comprising all the bits of both registers TH0 and TL0. That's why this is one of the most commonly used modes. Timer operates in the same way as in mode 0, with difference that the registers count up to 65 536 as allowable by the 16 bits. Timer 0 in mode 2 (Auto-Reload Timer) Mode 2 configures timer 0 as an 8-bit timer. Actually, timer 0 uses only one 8-bit register for counting and never counts from 0, but from an arbitrary value (0-255) stored in another (TH0) register.If mode 1 or mode 0 is used, It is necessary to write the number 200 to the timer registers and constantly check whether an overflow has occured, i.e. whether they reached the value 255. When it happens, it is necessary to rewrite the number 200 and repeat the whole procedure. The same procedure is automatically performed by the microcontroller if set in mode 2. In fact, only the TL0 register operates as a timer, while another (TH0) register stores the value from which the counting starts. When the TL0 register is loaded, instead of being cleared, the contents of TH0 will be reloaded to it. Referring to the previous example, in order to register each 55th pulse, the best solution is to write the number 200 to the TH0 register and configure the timer to operate in mode 2. Timer 0 in Mode 3 (Split Timer)
  • 22. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 22 Mode 3 configures timer 0 so that registers TL0 and TH0 operate as separate 8-bit timers. In other words, the 16-bit timer consisting of two registers TH0 and TL0 is split into two independent 8-bit timers. This mode is provided for applications requiring an additional 8-bit timer or counter. The TL0 timer turns into timer 0, while the TH0 timer turns into timer 1. In addition, all the control bits of 16-bit Timer 1 (consisting of the TH1 and TL1 register), now control the 8-bit Timer 1. Even though the 16-bit Timer 1 can still be configured to operate in any of modes (mode 1, 2 or 3), it is no longer possible to disable it as there is no control bit to do it. Thus, its operation is restricted when timer 0 is in mode 3. 3.1.2 Timer Control (TCON) Register: TCON register is also one of the registers whose bits are directly in control of timer operation. Only 4 bits of this register are used for this purpose, while rest of them is used for interrupt control to be discussed later.
  • 23. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 23 Figure 3.3:Timer1 and Timer0 Operation Modes TF1: bit is automatically set on the Timer 1 overflow. TR1: bit enables the Timer 1. 1:Timer 1 is enabled. Figure 3.4: TCON Register 0:Timer 1 is disabled. TF0: bit is automatically set on the Timer 0 overflow. TR0: bit enables the timer 0.
  • 24. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 24 1:Timer 0 is enabled. 0:Timer 0 is disabled. 3.2 Timer 1 Timer 1 is identical to timer 0, except for mode 3 which is a hold-count mode. It means that they have the same function, their operation is controlled by the same registers TMOD and TCON and both of them can operate in one out of 4 different modes. Figure 3.5:Timer 1 Figure 3.6: TH1 and TL1 3.2.1UART (Universal Asynchronous Receiver and Transmitter) One of the microcontroller features making it so powerful is an integrated UART, better known as a serial port. It is a full-duplex port, thus being able to transmit and receive data simultaneously and at different baud rates. Without it, serial data send and receive would be an enormously complicated part of the program in which the pin state is constantly changed and checked at regular intervals. When using UART, all the programmer has to do is to simply select serial port mode and baud rate. Whenit’s done, serial data transmit is nothing but writing to the SBUF register, while data receive represents reading the same register. The microcontroller takes care of not making any error during data transmission. In other words,
  • 25. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 25 Figure 3.7: SBUF Register it is necessary to determine how many bits is contained in one serial ―word‖, baud rate and synchronization clock source. The whole process is in control of the bits of the SCON register (Serial Control). 3.2.2 Serial Port Control (SCON) Register Figure 3.8:SCON Register SM0:Serial port mode bit 0 is used for serial port mode selection. SM1: Serial port mode bit 1. SM2:Serial port mode 2 bit, also known as multiprocessor communication enable bit. When set, it enables multiprocessor communication in mode 2 and 3, and eventually mode 1. It should be cleared in mode 0. REN:Reception Enable bit enables serial reception when set. When cleared, serial reception is disabled. TB8:Transmitter bit 8. Since all registers are 8-bit wide, this bit solves the problem of transmitting the 9th bit in modes 2 and 3. It is set to transmit a logic 1 in the 9th bit. RB8:Receiver bit 8 or the 9th bit received in modes 2 and 3. Cleared by hardware if 9th bit received is logic 0. Set by hardware if 9th bit received is a logic 1. TI: Transmit Interrupt flag is automatically set at the moment the last bit of one byte is sent. It's a signal to the processor that the line is available for a new byte transmite. It must be cleared from within the software. RI:Receive Interrupt flag is automatically set upon one byte receive. It signals that byte is received and should be read quickly prior to being replaced by a new data. This bit is also cleared from within the software. As seen, serial port mode is selected by combining the SM0 and SM2 bits: SM0 SM1 MODE Description Baud Rate 0 0 0 8-bit shift register 1/12 the quartz frequency 0 1 1 8-bit UART Determined by timer 1
  • 26. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 26 1 0 2 9-bit UART 1/32 the quartz frequency 1 1 3 9-bit UART Determined by timer 1 Table 3.3:SCON Register In mode 0, serial data are transmitted and received through the RXD pin, while the TXD pin output clocks. The bout rate is fixed at 1/12 the oscillator frequency. On transmit, the least significant bit (LSB bit) is sent/received first. Transmit - Data transmit is initiated by writing data to the SBUF register. In fact, this process starts after any instruction being performed upon this register. When all 8 bits have been sent, the TI bit of the SCON register is automatically set. Receive - Data receive through the RXD pin starts upon the two following conditions are met: bit REN=1 and RI=0 (both of them are stored in the SCON register). When all 8 bits have been received, the RI bit of the SCON register is automatically set indicating that one byte receive is complete. 3.2.3 Baud Rate Baud Rate is a number of sent/received bits per second. In case the UART is used, baud rate depends on: selected mode, oscillator frequency and in some cases on the state of the SMOD bit of the SCON register. All the necessary formulas are specified in the table: BAUD RATE BIT SMOD Mode 0 Fosc/12 - Mode 1 256-TH1 Bit SMOD Mode 2 Fosc/32 Fosc/64 1 0 Mode 3 256-TH1 - Table 3.4:Timer 1 as a clock generator
  • 27. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 27 CHAPTER-4 8051 Microcontroller Interrupts 8051 Microcontroller Interrupts There are five interrupt sources for the 8051, which means that they can recognize 5 different events that can interrupt regular program execution. Each interrupt can be enabled or disabled by setting bits of the IE register. 1. INT0 2. INT1 3. TF0
  • 28. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 28 4. TF1 5. RI/TI Now, it is necessary to explain a few details referring to external interrupts- INT0 and INT1. If the IT0 and IT1 bits of the TCON register are set, an interrupt will be generated on high to low transition, i.e. on the falling pulse edge (only in that moment). If these bits are cleared, an interrupt will be continuously executed as far as the pins are held low. 4.1 IE Register (Interrupt Enable) 7 6 5 4 3 2 1 0 EA ET2 ES ET1 EX1 ET0 EX0 Figure 4.1: IE Register (Interrupt Enable) EA: global interrupt enable/disable: 0: disables all interrupt requests. 1: enables all individual interrupt requests. ES:enablesor disables serial interrupt: Figure 4.2:8051 Interrupt Details 0: UART system cannot generate an interrupt. 1: UART system enables an interrupt. ET1: bit enables or disables Timer 1 interrupt: 0: Timer 1 cannot generate an interrupt. 1: Timer 1 enables an interrupt. EX1: bit enables or disables external 1 interrupt: 0: change of the pin INT0 logic state cannot generate an interrupt. 1: enables an external interrupt on the pin INT0 state change.
  • 29. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 29 ET0:bit enables or disables timer 0 interrupt: 0:Timer 0 cannot generate an interrupt. 1: enables timer 0 interrupt. EX0: bit enables or disables external 0 interrupt: 0:change of the INT1 pin logic state cannot generate an interrupt. 1: enables an external interrupt on the pin INT1 state change. 4.1.1 Interrupt Priorities If several interrupts are enabled, it may happen that while one of them is in progress, another one is requested. In order that the microcontroller knows whether to continue operation or meet a new interrupt request, there is a priority list instructing it what to do. The priority list offers 3 levels of interrupt priority: 1. Resettheabsolute master. When a reset request arrives, everything is stopped and the microcontroller restarts. 2. Interrupt priority 1 can be disabled by Reset only. 3. Interrupt priority 0 can be disabled by both Reset and interrupt priority 1. The IP Register (Interrupt Priority Register) specifies which one of existing interrupt sources have higher and which one has lower priority. Interrupt priority is usually specified at the beginning of the program. According to that, there are several possibilities: If an interrupt of higher priority arrives while an interrupt is in progress, it will be immediately stopped and the higher priority interrupt will be executed first. If two interrupt requests, at different priority levels, arrive at the same time then the higher priority interrupt is serviced first. If the both interrupt requests, at the same priority level, occur one after another, the one which came later has to wait until routine being in progress ends. If two interrupt requests of equal priority arrive at the same time then the interrupt to be serviced is selected according to the following priority list: 1.External interrupt INT0 2.Timer 0 interrupt 3.External Interrupt INT1 4.Timer 1 interrupt 5.Serial Communication Interrupt 4.2 IP Register (Interrupt Priority) The IP register bits specify the priority level of each interrupt (high or low priority). 7 6 5 4 3 2 1 0
  • 30. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 30 PT2 PS PT1 PX1 PT0 PX0 Figure 4.3: IP Register (Interrupt Priority) PS: Serial Port Interrupt priority bit (Priority 0,Priority 1) PT1: Timer 1 interruptspriority (Priority 0,Priority 1) PX1:External Interrupt INT1 priority (Priority 0,Priority 1) PT0: Timer 0 Interrupt Priority (Priority 0,Priority 1) PX0: External Interrupt INT0 Priority (Priority 0,Priority 1) 4.3 Handling Interrupt When an interrupt request arrives the following occurs: 1.Instruction in progress is ended. 2.The address of the next instruction to execute is pushed on the stack. 3.These addresses store appropriate subroutines processing interrupts. Instead of them, there are usually jump instructions specifying locations on which these subroutines reside. 4.When an interrupt routine is executed, the address of the next instruction to execute is poped from the stack to the program counter and interrupted program resumes operation from where it left off. Table 4.1: All Address Are In Hexadecimal Form 4.4 Reset Reset occurs when the RS pin is supplied with a positive pulse in duration of at least 2 machine cycles (24 clock cycles of crystal oscillator). After that, the microcontroller generates an internal reset signal which clears all SFRs, except SBUF registers, Stack Pointer and ports (the state of the first two ports is not defined, while FF value is written to the ports configuring all their pins as inputs). Depending on surrounding and purpose of device, the RS
  • 31. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 31 pin is usually connected to a power-on reset push button or circuit or to both of them. Figure below illustrates one of the simplestcircuits providing safe power-on reset.
  • 32. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 32 CHAPTER-5 Interfacing Interfacing 5.1 LED interfacing Like a normal diode, an LED consists of a chip of semiconducting material impregnated, or doped, with impurities to create a p-n junction. As in other diodes, current flows easily from the p-side, or anode, to the n-side, or cathode, but not in the reverse direction. Charge-
  • 33. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 33 carriers—electrons and holes—flow into the junction from electrodes with different voltages. When an electron meets a hole, it falls into a lower energy level, and releases energy in the form of a photon. The wavelength of the light emitted, and therefore its color, depends on the band gap energy of the materials forming the p-n junction. In silicon or germanium diodes, the electrons and holes recombine by a non-radiativetransition which produces no optical emission, because these are indirect band gap materials. The materials used for an LED have a direct band gap with energies corresponding to near-infrared, visible or near-ultraviolet light. LED development began with infrared and red devices made with gallium arsenide. Advances in materials science have made possible the production of devices with ever-shorter wavelengths, producing light in a variety ofcolors.Conventional LEDs are made from a variety of inorganic semiconductor materials, producing the following colors: Aluminium gallium arsenide (AlGaAs) — red and infrared Aluminium gallium phosphide (AlGaP) — green Aluminium gallium indium phosphide (AlGaInP) — high-brightness orange-red, orange, yellow, and green Gallium arsenide phosphide (GaAsP) — red, orange-red, orange, and yellow Gallium phosphide (GaP) — red, yellow and green Gallium nitride (GaN) — green, pure green (or emerald green), and blue also white (if it has an AlGaN Quantum Barrier) /* PROGRAM TO GLOW LED*/ #include<reg51.h> void delay() { int a; for(a=0;a<=30000;a++); } void main() { while(1) { P2=0x00; delay(); P2=0xFF; delay();
  • 34. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 34 } 5.2 Seven segment display interfacing Seven Segment The seven-segment LED display has four individual digits, each with a decimal point. Each of the seven segments (and the decimal point) in a given digit contains an individual LED. When a suitable voltage is applied to a given segment LED, current flows through and illuminates that segment LED. By choosing which segments to illuminate, any of the nine digits can be shown. For example, as shown in the figure below, a 2 can be displayed by illuminating segments a, b, d, e, and g.seven segment displays come in two varieties - common anode (CA) and common cathode (CC). In a CA display, the anodes for the seven segments and the decimal point are joined into a single circuit node. To illuminate a segment in a CA display, the voltage on a cathode must be at a suitably lower voltage (about .7V) than the anode. In a CC display, the cathodes are joined together, and the segments are illuminated by bringing the anode voltage higher than the cathode node (again, by about .7V). The Dig labboard uses CA displays. The seven LEDs in each digit are labeled a-g. Since the Digilab board usesCA displays, the anodes for each of the four digits are connected in a common node, so that four separate anode circuit nodes exist (one per digit).Similar cathode leads from each digit have also been tied together to form seven common circuit nodes, so that one node exists for each segment type. These four anode and seven cathode circuit nodes are available at the J2connector pins labeled A1-A4 and CA-CG. With this scheme, any segment of any digit can be driven individually. For example, to illuminate segments and c in the second digit, the b and c cathode nodes would be brought to a suitable low voltage (by connecting the corresponding circuit node available at the J2 connector to ground), and anode 2 would be brought to a suitablehigh voltage (by connecting the corresponding circuit node available at theJ2 connector to Vdd). /* PROGRAM TO SWITCH ON SEVEN SEGMENT DISPLAY MOVING FROM LSB TO MSB */ #include<reg51.h> void delay() {
  • 35. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 35 int a; for(a=0;a<=30000;a++); } void main() { P2=0x3F; delay(); P2=0x30; delay(); P2=0x5B; delay(); P2=0x1F; delay(); P2=0x66; delay(); P2=0x6D; delay(); P2=0x7C; delay(); P2=0x07; delay(); P2=0x7F; delay(); P2=0x3F; delay(); } 5.3Stepper motor interfacing STEPPER MOTOR EMotion Control, in electronic terms, means to accurately control the movement of an object based on either speed, distance, load, inertia or a combination of all these factors. There are numerous types of motion control systems, including; Stepper Motor, Linear Step Motor, DC Brush, Brushless, Servo, Brushless Servo and more.stepper motor is an electromechanical device which converts electrical pulses into discrete mechanical movements. Stepper motor is
  • 36. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 36 a form of ac. motor .The shaft or spindle of a stepper motor rotates in discrete step increments when electrical command pulses are applied to it in the proper sequence. The motors rotation has several direct relationships to these applied input pulses. The sequence of the applied pulses is directly related to the direction of motor shafts rotation. The speed of the motor shafts rotation is directly related to the frequency of the input pulses and the length of rotation is directly related to the number of input pulses applied. For every input pulse, the motor shaft turns through a specified number of degrees, called a step. Its working principle is one step rotation for one input pulse. The range of step size mayvary from 0.72 degree to 90 degree. In position control application, if the number of input pulsessent to the motor is known, the actual position of the driven job can be obtained.A stepper motor differs from a conventional motor (CM) as under: Figure 5.1-stepper motor a. Input to SM is in the form of electric pulses whereas input to a CM is invariably from a constant voltage source. b. A CM has a free running shaft whereas shaft of SM moves through angular steps. 5.3.1 Step Angle & Steps per Revolution Movement associated with a single step, depends on the internal construction of the motor, inParticular the number of teeth on the stator and the rotor. The step angle is the minimum degree of rotation associated with a single step. Step per revolution is the total number of steps needed to rotate one complete rotation or 360degrees (e.g., 180 steps * 2 degree = 360) Since the stepper motor is not ordinary motor and has four separate coils, which have tobe
  • 37. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 37 energized one by one in a stepwise fashion. We term them as coil A, B, C and D. At a particular instant the coil A should get supply and then after some delay the coil B should get supply and then coil C and then coil D and so on the cycle continues. The more the delay is introduced between the energizing of the coils the lesser is the speed of the stepper motor advice versa. /* PROGRAM USING STEPPER MOTOR*/ #include<reg51.h> void delay() { int a; for(a=0;a<=6000;a++); } void main() { P2=0x00; delay( ); P2=0xff; delay(); P2=0x00; delay( ); P2=0xff; delay(); P2=0x00; delay( ); P2=0xff; delay( ); } 5.4 Relay interfacing The electromagnetic relay consists of a multi-turn coil, wound on an iron core, to form an electromagnet. When the coil is energized, by passing current through it, the core becomes temporarilymagnetized. The magnetized core attracts the iron armature. The armature is pivoted which causes it to operate one or more sets of contacts. When the coil is de-energized
  • 38. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 38 the armature and contacts are released. The coil can reenergized from a low power source such as a transistor while the contacts can switch high powers such as the mains supply. The relay can also be situated remotely from the control source. Relays can generate a very high voltage across the coil when switched off.This can damage other components in the circuit. To prevent this a diode is connected across the coil.As there are always some chances of high voltage spikes back from the switching circuit i.e. heater so an opt coupler/isolator MCT2e is used. It provides and electrical isolation between the microcontroller and the heater. MCT2e is a 6-pin IC with a combination of optical transmitter LED and an optical receiver as phototransistor. Microcontroller is connected to pin no 2 ofMCT2e through a 470-ohm resistor. Pin no.1 is given +5V supply and pin no.4 is grounded. To handle the current drawn by the heater a power transistor BC-369 is used as a current driver. Pin no.5 of opt coupler is connected to the base of transistor. It takes all its output to Vandactivates the heater through relay circuit. The electromagnetic relay consists of a multi-turn coil, wound on an iron core, to form an electromagnet. When the coil is energized, by passing current through it, the core becomes temporarily magnetized. The magnetized core attracts the iron armature. The armature is pivoted which causes it to operate one or more sets of contacts. When the coil is de-energized the armature and contacts are released. Relays can generate a very high voltage across the coil when switched off. This can damage other components in the circuit. To preventthis diode is connected across the coil. Relay has five points. Out of the 2 operating points one is permanently connected to the ground and the other point is connected to thecollector side of the power transistor. When Vreaches the collector side i.e. signal is given to the operating points the coil gets magnetized and attracts the iron armature. The iron plate moves from normally connected (NC) position to normally open (NO) position. Thus the heater gets the phase signal and is ON. To remove the base leakage voltage when no signal is present a 470-ohmresistance is used. /* PROGRAM USING RELAY */ #include<reg51.h> void delay() { int a; for(a=0;a<=6000;a++); } sbit relay=P1^1;
  • 39. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 39 void main() { while(1) { relay =0; delay(); delay(); delay(); delay(); delay(); relay=1; delay(); delay(); delay(); delay(); delay(); } } CONCLUSION The basic architecture and function of a microcontroller is discussed. With examples, the need for low power microcontroller is illustrated. Microcontrollers are of prime importance for electronic control and communication of any modern appliance. Any household appliance e.g. washing machine, refrigerator, air- conditioner or office appliances e.g. electronic printer, Photostat copier, fax machine contains one or more microcontrollers. Because of its bulk usage a marginal saving in power for one 8051 results to enormous saving as a whole.
  • 40. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 40 In any device design, when one feature is optimized another feature degrades. When low power is achieved the speed or performance may go down. Though this microcontroller consumes negligible power its other features are comparable to the existing microcontrollers available in the market. BIBLOGRAPHY Sources: [1] Chris and Dawn Schur’s Robotics and Artificial Life Forms, http://www.schursastrophotography.com [2] Wallace, David N., Line Following Robot http://www.lifekludger.net/category/weekly- links/page/2/ [3] DenmarksTechniskeUniversitethttp://www.sweeper.org
  • 41. TRAINING REPORT EMBEDDED SYSTEM DEPARTMENT OF ELECTRONICS AND COMMUNICATION 41 [4], [9] Mike’s Line Following Robot, Central Illinois Robotics Club, http://www.circ.mtco.com [5] http://www.leang.com [6] http://www.cs.umn.edu [7], [8] Jackson, Ben, http://www.ben.com [10] http://www.ece.unm.edu [11] David Cook’s Jet http://www.robotroom.com/jet.html [12] http://blog.makezine.com [13] The CBA Line Following Module http://www.budgetbot.com [14] http://www.james.vroman.com/tecbot1a.htm james@vroman.com [15] http://www.james.vroman.com/javbot1a.htm