Anda di halaman 1dari 13

Subject Code: 3361105 Subject Name: EMBEDDED SYSTEM

UNIT – I OVERVIEW OF EMBEDDED SYSTEM


1.1 Embedded system: Embedded System Characteristics
1.2 Examples: Washing Machine, Chocolate Vending Machine, Room Temperature Controller
1.3 Operating System(OS): Types of OS, Types of Mobile OS
1.4 Characteristics of Real Time Operating System

System
A system is an arrangement in which all its unit assemble work together according to a set of rules.
It can also be defined as a way of working, organizing or doing one or many tasks according to a
fixed plan. For example, a watch is a time displaying system. Its components follow a set of rules
to show time. If one of its parts fails, the watch will stop working. So we can say, in a system, all
its subcomponents depend on each other.

Embedded System
As its name suggests, Embedded means something that is attached to another thing. An embedded
system can be thought of as a computer hardware system having software embedded in it. An
embedded system can be an independent system or it can be a part of a large system. An embedded
system is a microcontroller or microprocessor based system, which is designed to perform a
specific task. For example, a fire alarm is an embedded system; it will sense only smoke.

An embedded system has three components:


1. It has hardware.
2. It has application software.
3. It has Real Time Operating system (RTOS) that supervises the application software and provide
mechanism to let the processor run a process as per scheduling by following a plan to control the
latencies. RTOS defines the way the system works. It sets the rules during the execution of
application program. A small-scale embedded system may not have RTOS.

So we can define an embedded system as a Microcontroller based, software driven, reliable, real-
time control system.

Characteristics of an Embedded System


1. Single-functioned: An embedded system usually performs a specialized operation and does the
same repeatedly. For example: A pager always functions as a pager.

2. Tightly constrained: All computing systems have constraints on design metrics, but those on
an embedded system can be especially tight. Design metrics is a measure of an implementation's
features such as its cost, size, power, and performance. It must be of a size to fit on a single chip,
must perform fast enough to process data in real time and consume minimum power to extend
battery life.

Prepared by: Mr. Jigar M. Patel, Lecturer, ECE, 604 – BBIT, V. V. Nagar – 388120. 1
Subject Code: 3361105 Subject Name: EMBEDDED SYSTEM

3. Reactive and Real time: Many embedded systems must continually react to changes in the
system's environment and must compute certain results in real time without any delay. Consider
an example of a car cruise controller; it continually monitors and reacts to speed and brake sensors.
It must compute acceleration or de-accelerations repeatedly within a limited time; a delayed
computation can result in failure to control of the car.

4. Microprocessors based: It must be microprocessor or microcontroller based.

5. Memory: It must have a memory, as its software usually embeds in ROM. It does not need any
secondary memories in the computer.

6. Connected: It must have connected peripherals to connect input and output devices.

7. HW-SW systems: Software is used for more features and flexibility. Hardware is used for
performance and security.

Advantages
 Easily Customizable
 Low power consumption
 Low cost
 Enhanced performance
Disadvantages
 High development effort
 Larger time to market

Prepared by: Mr. Jigar M. Patel, Lecturer, ECE, 604 – BBIT, V. V. Nagar – 388120. 2
Subject Code: 3361105 Subject Name: EMBEDDED SYSTEM

Basic Structure of an Embedded System


The following illustration shows the basic structure of an embedded system:

Embedded Systems Structure

Sensor: It measures the physical quantity and converts it to an electrical signal which can be read
by an observer or by any electronic instrument like an A2D converter. A sensor stores the measured
quantity to the memory.

A-D Converter: An analog-to-digital converter converts the analog signal sent by the sensor into
a digital signal.

Processor & ASICs: Processors process the data to measure the output and store it to the memory.

D-A Converter: A digital-to-analog converter converts the digital data fed by the processor to
analog data.

Actuator: An actuator compares the output given by the D-A Converter to the actual (expected)
output stored in it and stores the approved output.

Prepared by: Mr. Jigar M. Patel, Lecturer, ECE, 604 – BBIT, V. V. Nagar – 388120. 3
Subject Code: 3361105 Subject Name: EMBEDDED SYSTEM

UNIT– II 8-BIT MICROCONTROLLERS ARCHITECTURE (ATMEGA 8,AVR)


2.1 Microcontroller Types: PIC, AVR, ARM: features and applications
2.2 AVR microcontroller: Types, Architecture
2.3 Internal Architectural, Block diagram of controller (Atmega 8)
2.4 Functions of each pins of ATmega 8
2.5 Configuration of Two 8-bit and One 16-bit Timers and Counters
2.6 6-channel ADC Working
2.7 Essential Peripheral circuits: Crystal Circuit, Power supply, Oscillator Circuit
2.8 Initial programming configurations of Atmega8: port, counter, timer
2.9 Bootloader Circuit
2.10 ISP of Atmega 8
2.11 Tmega8 and ATmea328

Microcontroller Types:
The microcontrollers are characterized regarding bus-width, instruction set, and memory structure.
For the same family, there may be different forms with different sources.

A. Classification according to number of bits


1) The 8-bit microcontroller: Means CPU or ALU can process 8-bit data at a time. The examples
of 8-bit microcontrollers are Intel 8031/8051. These are used in position control, speed control
applications.
2) The 16-bit microcontroller: It performs greater precision and performance as compared to 8
bit. These are developed for the purpose of high-speed applications such as servo control system,
Robotics etc. Some examples of 16-bit microcontroller are 16-bit MCUs are extended Intel 8096
and Motorola MC68HC12 families.
3) 32-bit microcontroller: It uses the 32-bit instructions to perform the arithmetic and logic
operations These are developed for the purpose of very high speed application in Image processing,
Telecommunications , Intelligent control system etc.
Some examples are Intel/Atmel 251 family, PIC3x, ARM.

B. Classification according to memory devices


1) Embedded memory microcontroller: When an embedded system has a microcontroller unit
that has all the functional blocks available on a chip is called an embedded microcontroller. For
example, 8051 having program & data memory, I/O ports, serial communication, counters and
timers and interrupts on the chip is an embedded microcontroller.
2) External Memory Microcontroller: When an embedded system has a microcontroller unit
that has not all the functional blocks available on a chip is called an external memory
microcontroller. For example, 8031 has no program memory on the chip is an external memory
microcontroller.

Prepared by: Mr. Jigar M. Patel, Lecturer, ECE, 604 – BBIT, V. V. Nagar – 388120. 4
Subject Code: 3361105 Subject Name: EMBEDDED SYSTEM

C. Classification according to instruction set


1) CISC architecture: CISC means complex instruction set computer, it allows the user to apply
1 instruction as an alternative to many simple instructions.

Fig.: CISC architecture


2) RISC architecture: RISC means Reduced Instruction Set Computers. RISC reduces the
operation time by shortening the clock cycle per instruction. The RISC gives a better execution
than the CISC.

Fig.: RISC architecture

D. Classification according to memory architecture


1) Harvard Memory Architecture Microcontroller: The point when a microcontroller unit has
a dissimilar memory address space for the program and data memory, the microcontroller has
Harvard memory architecture in the processor. The RISC gives a better execution than the CISC.

Prepared by: Mr. Jigar M. Patel, Lecturer, ECE, 604 – BBIT, V. V. Nagar – 388120. 5
Subject Code: 3361105 Subject Name: EMBEDDED SYSTEM

Fig.: Harvard architecture


2) Princeton Memory Architecture Microcontroller: The point when a microcontroller has a
common memory address for the program memory and data memory, the microcontroller has
Princeton memory architecture in the processor.

Fig.: Princeton architecture

TYPES OF MICROCONTROLLER
A. 8051 Microcontroller
8051 microcontroller is an 8-bit microcontroller invented in 1981 by Intel Corporation. It is
available in 40 pin DIP i.e. dual in line package. This is the basic Microcontroller but still many
companies are manufacturing such types of Microcontroller. The older types of 8051 have 12
clocks per instruction that make it sluggish whereas the recent 8051 have 6 clocks per instruction.
The 8051 microcontroller does not have an in built memory bus and A/D converters and such
Microcontrollers are CISC processors, also 8051 uses Von Neuman architecture.

Fig.: Intel 8051 Microcontroller

Prepared by: Mr. Jigar M. Patel, Lecturer, ECE, 604 – BBIT, V. V. Nagar – 388120. 6
Subject Code: 3361105 Subject Name: EMBEDDED SYSTEM

Various features of 8051 microcontroller are given as follows.


1) 8-bit CPU
2) 16-bit Program Counter
3) 8-bit Processor Status Word (PSW)
4) 8-bit Stack Pointer
5) 4K bytes internal ROM (program memory).
6) 128 bytes internal RAM (data memory).
7) Special Function Registers (SFRs) of 128 bytes
8) 32 I/O pins arranged as four 8-bit ports (P0 – P3)
9) Two 16-bit timer/counters: T0 and T1
10) Two external and three internal vectored interrupts
11) One full duplex serial I/O.

B. PIC Microcontroller
Peripheral interface controller is a family of Microcontrollers by Microchip technology USA with
Havard architecture. Originally, this was developed as supporting device for PDP (program data
processor) computers to support for its peripheral devices and therefore named as PIC. PIC
Microcontrollers are RISC processors. An interesting thing about PIC is that its machine cycle
consists of only 4 clock pulses in contrast with 12 clock pulses in Intel 8051 Microcontroller. PIC
microcontrollers are finding their way into new applications like smart phones, audio accessories,
video gaming peripherals and advanced medical devices.

Fig.: PIC 16F877

Various features of PIC 16F877 microcontroller are given as follows


1) High-performance RISC CPU
2) Up to 8K x 14 words of FLASH program memory
3) 35 Instructions (fixed length encoding-14-bit)
4) 368×8 static RAM based data memory
5) Up to 256 x 8 bytes of EEPROM data memory
6) Interrupt capability (up to 14 sources)
7) Three addressing modes (direct, indirect, relative)
8) Power-on reset (POR)
9) Harvard architecture memory
10) Power saving SLEEP mode
11) Wide operating voltage range: 2.0V to 5.5V

Prepared by: Mr. Jigar M. Patel, Lecturer, ECE, 604 – BBIT, V. V. Nagar – 388120. 7
Subject Code: 3361105 Subject Name: EMBEDDED SYSTEM

12) High sink / source current: 25mA


13) Accumulator based machine.

C. ARM Microcontroller
ARM is 32 bit Microcontroller whose core is designed by ARM Limited with RISC architecture.
ARM has von Neumann architecture (program and RAM in the same space). ARM
Microcontrollers are extremely used in power saving and operate in very low power consumption.
ARM Microcontrollers widely used in modern handset for mobile communications. These are also
used in various other embedded system likes iPOD, hand held gaming unit, disk driver and so on.
8051 and PIC need multiple clock cycles per instruction. AVR and ARM execute most instructions
in a single clock cycle.

Fig.: ARM microcontroller


Various features of ARM microcontroller are given as follows
1) Maximum single cycle functioning
2) Constant 16×32 bit register file.
3) Load or store architecture.
4) Preset instruction width of 32 bits to simplify pipelining and decoding, at minimized code
density.
5) For misaligned memory access there is no support.

D. AVR Microcontroller
The AVR is a modified Harvard RISC architecture 8-bit RISC single-chip microcontroller, which
is developed by Atmel in 1996. The AVR is stands for Alf-Egil Bogen and Vegard Wollan’s RISC
processor. AVR takes only one clock per instruction.

1) AVR Microcontrollers are classified into three types


a) TinyAVR: Less memory, small size, suitable only for simpler applications.

b) MegaAVR: These are the most popular ones having good amount of memory (up to 256 KB),
higher number of inbuilt peripherals and suitable for moderate to complex applications.

c) XmegaAVR: Used commercially for complex applications, which require large program
memory and high speed.

Prepared by: Mr. Jigar M. Patel, Lecturer, ECE, 604 – BBIT, V. V. Nagar – 388120. 8
Subject Code: 3361105 Subject Name: EMBEDDED SYSTEM

Fig.: ATMEGA 16
Some of the features of Atmega16 are:
a) 16KB of Flash memory
b) 1KB of SRAM
c) 512 Bytes of EEPROM
d) Available in 40-Pin DIP
e) 8-Channel 10-bit ADC
f) Two 8-bit Timers/Counters
g) One 16-bit Timer/Counter
h) 4 PWM Channels
i) In System Programmer (ISP)
j) Serial USART
k) SPI Interface
l) Digital to Analog Comparator.

Main Difference between AVR, ARM, 8051 and PIC Microcontrollers:

8051 PIC AVR ARM


Bus width 8-bit for standard 8/16/32-bit 8/32-bit 32-bit mostly
core also available
in 64-bit
Communication UART, SART, PIC, UART, UART, UART,
Protocols SPI, I2C USART, LIN, USART, SPI, USART, LIN,
CAN, Ethernet, I2C, (special I2C, SPI, CAN,
SPI, I2S purpose AVR USB, Ethernet,
support CAN, I2S, DSP, SAI
USB, (serial audio
Ethernet) interface), IrDA

Prepared by: Mr. Jigar M. Patel, Lecturer, ECE, 604 – BBIT, V. V. Nagar – 388120. 9
Subject Code: 3361105 Subject Name: EMBEDDED SYSTEM

Speed 12 4 Clock/instruction 1 clock/ 1 clock/


Clock/instruction cycle instruction instruction
cycle cycle cycle
Memory ROM, SRAM, SRAM, FLASH Flash, SRAM, Flash,
FLASH EEPROM SDRAM,
EEPROM
ISA CISC Some feature of RISC RISC
RISC
Von Neumann Harvard Modified Modified
Memory
architecture architecture Harvard
Architecture architecture
Average Low Low Low
Power
Consumption
8051 variants PIC16,PIC17, Tiny, Atmega, ARMv4,5,6,7
Families
PIC18, PIC24, Xmega, and series
PIC32 special
purpose AVR
Vast Very Good Very Good Vast
Community
NXP, Atmel, Microchip Atmel Apple, Nvidia,
Manufacturer
Silicon Labs, Average Qualcomm,
Dallas, Cyprus, Samsung
Infineon, etc. Electronics, and
TI etc.
Cost (as Very Low Average Average Low
compared to
features
provide)
Known for its Cheap Cheap, High speed
Other Feature
Standard effective operation
Vast

AT89C51, PIC18fXX8, Atmega8, 16, LPC2148,


Popular
P89v51, etc. PIC16f88X, 32, Arduino ARM Cortex-
Microcontrollers PIC32MXX Community M0 to ARM
Cortex-M7, etc.

Prepared by: Mr. Jigar M. Patel, Lecturer, ECE, 604 – BBIT, V. V. Nagar – 388120. 1
0
Subject Code: 3361105 Subject Name: EMBEDDED SYSTEM

AVR MICROCONTROLLER:
AVR stands for Advanced Virtual RISC. so, this is founders are Alf Egil Bogen and Vegard
Wollan RISC.

UNIT– III OPEN SOURCE EMBEDDED DEVELOPMENT BOARD (ARDUINO)


3.1 Arduino: Birth, Open Source community
3.2 Functional Block Diagram of Arduino.
3.3 Functions of each Pin of Arduino
3.4 Arduino Development Board diagram (including different blocks only): IDE, I/O Functions,
Looping Techniques, Decision Making Techniques
3.5 Designing of 1st sketch
3.6 Programming of an Arduino (Arduino ISP)
3.7 Arduino Boot loader
3.8 Serial Protocol (serial port Interfacing)
3.9 Initialization of Serial Port using Functions
3.10 Basic Circuit For Arduino

Prepared by: Mr. Jigar M. Patel, Lecturer, ECE, 604 – BBIT, V. V. Nagar – 388120. 1
1
Subject Code: 3361105 Subject Name: EMBEDDED SYSTEM

UNIT–IV INTERFACE DIGITAL AND ANALOG I/O DEVICES (ARDUINO


INTERFACING)
4.1 Basic Interfacing and I/O Concept
4.2 Interfacing LED,Switch,7seg LED its and Code
4.3 Interfacing POT,LM35,Acelerometer (ADXL3C5C) and its Code
4.4 Interfacing keypad and Code for it
4.5 Initialization for serial port and code for it
4.6 Interfacing DC motor and its Code
4.7 Interfacing 16x2 LCD and its code

Prepared by: Mr. Jigar M. Patel, Lecturer, ECE, 604 – BBIT, V. V. Nagar – 388120. 1
2
Subject Code: 3361105 Subject Name: EMBEDDED SYSTEM

UNIT-V EMBEDDED SYSTEM APPLICATIONS (ARDUINO)


5.1 Motor Driver L293D, IR Sensor
5.2 Interfacing L293D with Arduino
5.3 Code for Line Follower Robot
5.4 Interfacing Accelerometer with Arduino
5.5 Record Gestures, Code For Accelerometer based Robot
5.6 Interfacing of RF Tx/RF Rx with Arduino
5.7 Interfacing of Relay Driver ULN2803 with Arduino
5.8 Code for Home automation and its Control
5.9 Basic ATmega8 Circuit
5.10 Upload Bootcode for ATmega8
5.11 Interfacing of USB-UART

Prepared by: Mr. Jigar M. Patel, Lecturer, ECE, 604 – BBIT, V. V. Nagar – 388120. 1
3

Anda mungkin juga menyukai