Nothing Special   »   [go: up one dir, main page]

Unit 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

EMBEDDED SYSTEMS AND APPLICATIONS

INTRODUCTION TO EMBEDDED SYSTEMS:


Embedded systems are controllers with on chip control. They consist
of microprocessors, input and output devices, memories etc. A small computer
designed in a single chip is called a single chip microcomputer. A single chip
microcomputer typically includes a microprocessor, RAM, ROM, timer, interrupt
controller and peripheral controller in a single chip. This single chip microcomputer is
also called as microcontroller. These microcontrollers are used for variety of
applications where it replaces the computer. The usage of these microcomputers for a
specific application, in which the microcontroller is a part of application, is called
EMBEDDED SYSTEMS.

Embedded systems are used for real time applications with high reliability
accuracy and precision. Embedded systems are operated with real time operating
systems (RTOS).

APPLICATIONS OF EMBEDDED SYSTEMS:


Embedded systems are used in the following areas:
(1) Robotics (6) Military application
(2) Aviation (7) Medical instruments
(3) Telecommunication and broadcasting (8) Toy industries
(4) Wireless applications (9) Electronic sensors
(5) Satellite communications (10) Home appliances
(11) Blue tooth

ROLE OF EMBEDDED SYSTEMS:


Embedded systems are compact, smart, efficient, economical and user
friendly. They are closed systems and respond to the real world situation very fast.
Closed system means, everything required for a specific application is embedded on the
chip and hence, they do not call for external requirement for their functioning.
---------------------------------------------------------------------------------------------------------------------
ADC @PKL DEPARTMENT OF ELECTRONICS
SEGMENTS OF EMBEDDED SYSTEMS:
Embedded systems basically consist of the following four segments:
Embedded controllers(8 bit, 16 bit, 32 bit, 64 bit, 128 bit)
Embedded software’s
Embedded memories
Embedded boards
GENERAL FEATURES OF MICROCONTROLLER:

Microcontrollers consists of the following functional blocks as shown below figure

MICROPROCESSOR

A/D CONVERTER USART

PWM
TIMER
MICROCONTROLLER

ETHERNET

I/O PORTS

USB
DMA CONTROLLER

MEMORY

MICROCONTROLLERS VERSUS MICROPROCESSORS:


Microcontrollers differ from a microprocessor in many ways. First and
the most important is its functionality. In order for a microprocessor to be used, other
components for receiving and sending data must be added to it. In short that means
that microprocessor is the very heart of the computer. On the other hand,
microcontroller is designed to be all of that in one. No other external components are
needed for its application because all necessary peripherals are already built into it.

MICROPROCESSOR MICROCONTOLLER
1. Contains ALU, GP registers, SP, PC ,clock 1. In addition , it contains inbuilt ROM, RAM, I/O
Timing circuits and interrupts Devices, timer/counters.
2. Many instructions are required to move 2. One or more instructions are required to move
Data between memory and CPU Data between memory and CPU
3. One or two bit handling instructions are 3. More number of bit handling instructions are
Available Available
4. Access time for memory and I/O devices 4. Access time for memory and I/O devices
Are more. Are less.
5. require more hardware, increase in PCB 5. require less hardware, reduce in PCB
Size Size
6. few pins are multifunctional 6. more pins are multifunctional
7. microprocessor based computers are normally 7. microcontroller based systems are normally
Operated with general purpose operating systems Operated with real time operating systems

-------------------------------------------------------------------------------------------------------------------
ADC @ PKL DEPARTMENT OF ELECTRONICS

ARCHITECTURE OF 8051 MICROCONTROLLER:


EXTERNAL INTERRUPT

INTERNAL INTERRUPT

4 KB 128 BYTES OF
TIMER 1
INTERRUPT
ROM RAM TIMER 0
CONTROL

CPU

BUS CONTROL SERIAL CONTROL


OSCILLATOR 4 I/O PORTS

P0 P1 P2 P3 TxD RxD

FEATURES OF 8051 MICROCONTROLLER :

The main features of the 8051 microcontroller:

operates with a single power supply of +5v


8-bit CPU optimized for control applications
16-bit program counter (pc) and 16-bit data pointer(DPTR)
8-bit program status word(PSW)
8-bit stack pointer(SP)
4KB Bytes of On chip program memory (internal ROM)
128 bytes of on chip data memory(internal RAM)
Four register banks, each bank contains 8 registers(r0 to r7)
16 bytes of bit addressable memory
80 bytes of general purpose data memory(scratch pad area)
-------------------------------------------------------------------------------------------------------------------
ADC @ PKL DEPARTMENT OF ELECTRONICS
Special function registers(SFR) to configure/operate microcontroller
32 bi directional I/O lines(4 ports with 8 lines)
Two 16 bit timers/counters (t0 and t1)
Full duplex UART (universal asynchronous receiver/transmitter)
5 interrupts (2 external and 3 internal) with priority level
On chip oscillator and clock circuit
PIN CONFIGURATION OF 8051 MICROCONTROLLER :
8051 is basically a 40 pin IC. All the pins are grouped into different
functionalities as follows
Power
Ports
Clock
Reset
External memory access signals

PIN CONFIGURATION OF 8051 MICROCONTROLLER

POWER:
8051 operates with single power supply voltage of +5 volts, which is applied
through pin 40. The circuit ground is at pin 20 of the microcontroller chip.
PORTS :
Ports are essential to connect a microcontroller to the outside world. The
primary function of a microcontroller is to accept data from input devices such as
keyboards and A/D converters, read instructions from memory, process data according
to the instructions and send the result to output devices. This input and output devices
are called either peripherals or I/O devices.
8051 I/O ports structure is extremely versatile. It has four parallel
ports via p0, p1, p2 and p3 each port of 8 bits. These constitute (8x4) 32 I/O lines and all
ports are bi-directional. Each pin may be serving as input, output or both under software
control.
Port 0: port 0 is an 8 bit port with 8 I/O lines. Port 0 pin serve as

Input or output pins(I/O)


Address/data bus
Port 0 occupies a total of 8 pins. It can be used for input or output. To use the
pins of port 0 as both input and output ports, each pin must be connected externally to
a 10k-ohm pull-up resistor. This is due to the fact that p0 is an open drain. Open drain is
a term used for MOS chip. In any system using 8051chip we normally connect p0 to pull
up resistors.
Port 0 also designed as AD0-AD7, allowing it to be used for both address and
data. When connecting an 8051 to an external memory, port 0 provides both address
and data.

PORT 1 :
Port 1 occupies a total of 8 pins. It can be used as input or output. In contrast to
port 0, this port does not need any pull-up resistors since it already has pull-up resistors
internally. Upon reset, port 1 is configured as an input port

----------------------------------------------------------------------------------------------------------------------
ADC @ PKL DEPARTMENT OF ELECTRONICS

Port 2: port 2 is an 8 bit port with 8 I/O lines. Port 2 pin serve as
Input or output pins(I/O)
Address bus
Port 2 can be used as I/O port, when address bus is not required to
access external memory. External pull-up resistors are required for port2 during I/O
mode, internal pull-up resistors are off. When the port 2 pins are assigned as address
bus the output pins are connected through internal pull-up resistors
Note: I/O mode (pull-up resistors), Address bus (no pull-up resistors)
Port 3 :
Port 3 is used for dual functions as
I/O port
Alternate I/O functions
Port 3 occupies total of 8 pins, it can be used as input or output.p3 does
not need any pull-up resistors, port 3 has the additional function of providing some
extremely important signals such as interrupts. Port 3 can be used for alternate
functions, in which few are input and few are output. The functions of each port pin as
an alternate function is indicated below

P3.0 RXD (SERIAL INPUT PORT)

P3.1 TXD(SERIAL OUTPUT PORT)

P3.2 INT0(EXTERNAL INTERRUPT 0)

P3.4 INT1(EXTERNAL INTERRUPT 1)

P3.4 T0(TIMER/COUNTER 0 EXTERNAL INPUT)

P3.5 T1(TIMER/COUNTER 1 EXTERNAL INPUT)


--------------------------------------------------------------------------------------------------------------------------
ADC @ PKL DEPARTMENT OF ELECTRONICS

P3.6 WR(WRITE FOR EXTERNAL DATA MEMORY)


P3.7 RD(READ FOR EXTERNAL DATA MEMORY)

CLOCK: The 8051 has an on-chip oscillator but requires an external clock to run it. A
quartz crustal oscillator is connected to inputs XTAL1 and XTAL2.
Oscillator (clock) is the driving force, which synchronizes the internal
operations of the microcontroller. 8051 contains in built clock circuit that contains an on
chip inverter to control crystal, when a crystal is used at frequency above 10 MHz c1 and
c2 should be in the range of 10pf to 12pf. Oscillator formed by the crystal, capacitors
and inverter generates a pulse train at the frequency of the crystal.
Machine cycle: it is defined as the minimum amount of time taken to execute a simple
instruction of the microcontroller. A single machine cycle consists of 12 pulses.

RESET :
To reset the microcontroller the RST pin should be held high for at least 2
machine cycles (24 oscillator periods). When the system is reset all the SFR’S are
initialized to 00H except the stack pointer. The reset circuit for 8051 is shown below. R
and C values should be adjusted such that, the RST pin is high for at least 24 clock
periods.

VCC

10MF

8.2 K

--------------------------------------------------------------------------------------------------------------------

ADC @ PKL DEPARTMENT OF ELECTRONICS


PSEN (PROGRAM STORE ENABLE) : This pin must be connected to output enable
pin of program memory. This is used only for accessing instructions.
EA (EXTERNAL ACCESS): If the application code is present in the internal code
memory then this pin should be connect to VCC else it should be ground.
ALE ( ADDRESS LATCH ENABLE) :

If we want to access 16 bit address line from outside then when to


access data and when to access address is done by ALE
If ALE=0, Then it act as data lines
If ALE=1, Then it act as address lines
ALE usually used for multiplexing and Demultiplexing of address lines and
data lines.
---------------------------------------------------------------------------------------------------------------------
ADC @ PKL DEPARTMENT OF ELECTRONICS

You might also like