SlideShare a Scribd company logo
1 of 35
Download to read offline
Singaperumal Thayar Thunai
INNOVATIVE ELECTRICAL TECHNOLOGIES
Shaping Quality Engineers
____________________________________________________________________________
EMBEDDED
1. OVER VIEW OF EMBEDED SYSTEM
1.1System
1.2Embedded System
1.3Components of Embedded System
1.4Embedded System Hardware
1.5Developing Embedded System
2. HARDWARE DESIGN
2.1 Microcontroller
2.2 Processor
2.3 Controller and Processor Comparison
2.4 Popular Microcontrollers
2.5 Power Supply Section Designing
2.6 Signal Generation with Speed of Frequency
3. MICROCONTROLLER 8051
3.1 Basic Components of 8051
3.2 Features of 8051
3.3 Pin diagram
4. PIC MICROCONTROLLER
4.1 Features of PIC
Singaperumal Thayar Thunai
4.2 Pin Diagram
4.3 Pin Description
5. EMBEDDED C
5.1 Introduction of Embedded C
5.2 Failing of Hardware
5.3 Avoiding the Failure
5.4 Common Aim of Coding Standard
5.5 Sample Rules of Coding Standard
5.6 Example Programs
5.7 Exercise Programs
Singaperumal Thayar Thunai
Chapter 1: OVER VIEW OF EMBEDDED SYSTEM
1.1 SYSTEM
A system is a way of working, organizing or doing one or many tasks according to a
fixed plan, program or set of rules. A system is also an arrangement in which all its units
assemble and work together according to the plan or program.
Example:
1. WATCH
It is a time display SYSTEM
Parts: Hardware, Needles, Battery, Dial, Chassis and Strap.
Rules
 All needles move clockwise only
 A thin needle rotates every second
 A long needle rotates every minute
 A short needle rotates every hour
 All needles return to the original position after 12 hours.
2. WASHING MACHINE
It is an automatic clothes washing SYSTEM
Parts: Status display panel, Switches & Dials, Motor, Power supply & control unit, Inner water
level sensor and solenoid valve.
Rules
 Wash by spinning
Singaperumal Thayar Thunai
 Rinse
 Drying
 Wash over by blinking
 Each step display the process stage
 In case interruption, execute only the remaining
1.2 EMBEDDED SYSTEM
An embedded system is a special purpose system that is used to perform one or few
dedicated functions. Simply, we can call any electronic device that has a computer system
embedded inside it an embedded system.
An Embedded System is one that has computer hardware with software embedded in it as
one of its important components.
Some examples of embedded systems are:
1. Alarm / security system
2. Automobile cruise control
3. Heating / air conditioning thermostat
4. Microwave oven
5. Anti-skid braking controller
6. Traffic light controller
7. Vending machine
8. Gas pump
9. Handheld Sudoku game
Singaperumal Thayar Thunai
10. Irrigation system controller
11. Singing wall fish (or this gift season’s equivalent)
12. Mars Rover
Embedded systems are made to perform few tasks only, after implementation you can’t
use them for another purposes.
Ex: You can’t watch movies using the microprocessor of your microwave oven!!
1.3 COMPONENTS OF EMBEDDED SYSTEM
 It has Hardware
They are processor, Timers, Interrupt controller, I/O Devices, Memories, Ports,
etc.
 It has main Application Software
That may perform concurrently the series of tasks or multiple tasks.
 It has Real Time Operating System (RTOS)
RTOS defines the way the system work which supervise the application software.
It sets the rules during the execution of the application program. A small scale
embedded system may not need an RTOS.
Singaperumal Thayar Thunai
1.4 EMBEDDED SYSTEM HARDWARE
1.5 DEVELOPING EMBEDDED SYSTEMS
Embedded System
Development
Software
Development
Hardware
Development
Singaperumal Thayar Thunai
Chapter 2: HARDWARE DESIGN
2.1 MICROCONTROLLER
It’s a full computer system on a chip, even if its resources are far more limited than of a
desktop personal computer designed for standalone operations. So.. What’s the difference
between a microcontroller and a microprocessor system?
A microcontroller has a processor and many peripherals integrated with it on the same chip, like a
flash memory, RAM, I/O ports, serial communication ports, ADC, Etc.
Singaperumal Thayar Thunai
 A timer module to allow the MCU to perform tasks for certain time periods.
 A serial I/O port to allow data to flow between the MCU and other devices such as a PC or
another MCU.
 An ADC to allow the MCU to accept analog inputs for processing.
 But a microprocessor can’t do all the functions of a computer system on its own, and
needs another circuits to support it like: I/O devices, RAM, ROM, DMA controllers,
Timers, ADC, LCD drivers.. Etc.
2.2 PROCESSOR
Program Flow and data path Control Unit (CU):
That includes a fetch unit for fetching instructions from the memory.
Execution Unit (EU):
Includes circuits for arithmetic and logical unit (ALU), and for instructions for a program
control task, say, data transfer instructions, halt, interrupt, or jump to another set of instructions
or call to another routine or sleep or reset.
Singaperumal Thayar Thunai
2.3 CONTROLLER AND PROCESSOR COMPARISION
2.4 POPULAR MICROCONTROLLERS
 8051 (Intel and others)
 80386 EX (Intel)
 PIC (Microchip)
 68HC05 (Motorola)
 Z8 (Zilog)
COMPARISION
Microcontroller General purpose Microprocessor
Depend mainly on its peripherals like:
Program memory, I/O ports, timers, interrupt
circuitry, ADC, Etc.
Depend mainly on other devices like:
I/O devices, memory, DMA controllers, Etc.
Used for a few dedicated functions determined by
the system designer.
Used in many applications, according to the
program running on it
Usually used as a part of a larger system It’s in the heart of our PC’s
Singaperumal Thayar Thunai
2.5 POWER SUPPLY SECTION DESIGNING
You need to hook up 5V and GND to your micro. Your house outlet runs at 220V AC
and is very bad for 5V DC (direct current) micros. So you'll need to convert the 220V AC from
your outlet to a useable 5V DC.
If you reverse the connection on your micro - bad things happen. Always make sure your
5V power supply is connected to the VCC pins and GND to GND. If you reverse this and
connect 5V to GND on the micro and GND to VCC on the micro, things won't explode, probably
no smoke, things will probably heat up like crazy.
Before the regulator circuit, the 220V AC converted to 9V DC by using adapter. Then the
9V converted to 5V DC by the regulator circuit. The most common regulator is called the
LM7805.
We can simply connect the terminals of the regulator LM7805 like in above circuit but
there is some noise in the input pin. That noise may affect the output voltage so we should use
filtering capacitors to get better output voltage.
Singaperumal Thayar Thunai
Another thing is, while designing the circuit as a beginner there may be a chance of
making mistakes in designing so if any things heat up/smoke/spark, just unplug or turn off the
system. So we need an on/off power switch/relay. Now the circuit modified as below.
Remember all the warning about reversing VCC and GND and how that is bad? Well if
you connect your power supply backwards, that's bad. So let's protect ourselves!
Note that the diodes are polarized. Hence the diode can avoid reverse current.
Let us see how to connect the LED with this regulator circuit. If you connect the LED
like in above circuit the LED will glow much brighter but burn out. The LED is a diode it can
withstand only 20mA. So here we should use ohms law (V=IR) to calculate the resistance value
to drop voltage and maintain the current 20mA. The calculation as follows,
V = IR (this is Ohm's law)
If we have 5V, and we only want 20mA flowing through the LED:
5V = 0.02 * R
R = 250 Ohm
Now this is not completely true because the LED has a forward voltage drop. But don’t
worry about that we can use 220 ohm, 330ohm and 1k.The final proper circuit is given below,
Singaperumal Thayar Thunai
2.6 SIGNAL GENERATION WITH SPEED OF FREQUENCY
Calculation of Machine Cycle for 8051:
The formula for calculating the machine cycle is given by,
Machine cycle=1/(Fosc/12).
Find the machine cycle for
Fosc = 11.0592 MHz
Fosc = 16 MHz
Solution:
1). 11.0592 MHz / 12 = 921.6 kHz;
Machine cycle = 1 / 921.6 kHz = 1.085 s
2). 16 MHz / 12 = 1.333 MHz;
Machine cycle = 1 / 1.333 MHz = 0.75 s
Singaperumal Thayar Thunai
Calculation of Machine Cycle for PIC16f877A:
The formula for calculating the machine cycle is given by,
Machine cycle=1/(Fosc/4).
Singaperumal Thayar Thunai
Chapter 3: MICROCONTROLLER 8051
3.1 BASIC COMPONENTS OF 8051
 4K bytes internal ROM
 128 bytes internal RAM
 Four 8-bit I/O ports (P0 - P3).
 Two 16-bit timers/counters
 One serial interface.
3.2 FEATURES OF 8051
 only 1 On chip oscillator (external crystal)
 6 interrupt sources (2 external , 3 internal, Reset)
 64K external code (program) memory(only read)PSEN
 64K external data memory(can be read and write) by RD,WR
 Code memory is selectable by EA (internal or external)
 We may have External memory as data and code.
Singaperumal Thayar Thunai
3.3 PIN DIAGRAM
One of the most useful features of the 8051 is that it contains four I/O ports (P0 - P3)
 Port 0 (pins 32-39):P0(P0.0~P0.7)
8-bit R/W - General Purpose I/O
Or acts as a multiplexed low byte address and data bus for external memory
design
 Port 1 (pins 1-8) :P1(P1.0~P1.7)
Only 8-bit R/W - General Purpose I/O
 Port 2 (pins 21-28):P2(P2.0~P2.7)
8-bit R/W - General Purpose I/O
Or high byte of the address bus for external memory design
 Port 3 (pins 10-17):P3(P3.0~P3.7)
General Purpose I/O
Singaperumal Thayar Thunai
If not using any of the internal peripherals (timers) or external interrupts.
 Each port can be used as input or output (bi-direction).
 The port3 has alternative functions as follows.
Singaperumal Thayar Thunai
Chapter 4: PIC MICROCONTROLLER
4.1 FEATURES OF PIC
 There are varieties of choice in PIC from 8 bit to 32 bit.
 Low Power
 Reasonable Size
 Convenient Packaging
 Through Hole (Dip)
 Surface Mount (QFN/SPDIP)
 Resources and References
 Sleep mode
 Watchdog timer (WDT)
 Code protection
 In-circuit serial programming
 In-circuit debugger
Singaperumal Thayar Thunai
4.2 PIN DIAGRAM
Pin diagram of PIC16F877A.
4.3 PIN DESCRIPTION
As seen in Figure above, the most pins are multi-functional. For example, designator
RA3/AN3/Vref+/C1IN+ for the fifth pin specifies the following functions:
 RA3 Port A third digital input/output
 AN3 Third analog input
 Vref+ Positive voltage reference
 C1IN+ Comparator C1positive input
Singaperumal Thayar Thunai
This small trick is often used because it makes the microcontroller package more
compact without affecting its functionality. These various pin functions cannot be used
simultaneously, but can be changed at any point during operation.
PIC16F877 has 5 basic input/output ports. They are usually denoted by PORT A (R A),
PORT B (RB), PORT C (RC), PORT D (RD), and PORT E (RE). These ports are used for input/
output interfacing. In this controller, “PORT A” is only 6 bits wide (RA-0 to RA-7), ”PORT B” ,
“PORT C”,”PORT D” are only 8 bits wide (RB-0 to RB-7,RC-0 to RC-7,RD-0 to RD-7),
”PORT E” has only 3 bit wide (RE-0 to RE-7).
PORT-A RA-0 to RA-5 6 bit wide
PORT-B RB-0 to RB-7 8 bit wide
PORT-C RC-0 to RC-7 8 bit wide
PORT-D RD-0 to RD-7 8 bit wide
PORT-E RE-0 to RE-2 3 bit wide
All these ports are bi-directional. The direction of the port is controlled by using TRIS(X)
registers (TRIS A used to set the direction of PORT-A, TRIS B used to set the direction for
PORT-B, etc.). Setting a TRIS(X) bit ‘1’ will set the corresponding PORT(X) bit as input.
Clearing a TRIS(X) bit ‘0’ will set the corresponding PORT(X) bit as output.
(If we want to set PORT A as an input, just set TRIS(A) bit to logical ‘1’ and want to set PORT
B as an output, just set the PORT B bits to logical ‘0’.)
 Analog input port (AN0 TO AN7) : these ports are used for interfacing analog inputs.
 TX and RX: These are the USART transmission and reception ports.
 SCK: these pins are used for giving synchronous serial clock input.
 SCL: these pins act as an output for both SPI and I2C modes.
 DT: these are synchronous data terminals.
Singaperumal Thayar Thunai
 CK: synchronous clock input.
 SD0: SPI data output (SPI Mode).
 SD1: SPI Data input (SPI mode).
 SDA: data input/output in I2C Mode.
 CCP1 and CCP2: these are capture/compare/PWM modules.
 OSC1: oscillator input/external clock.
 OSC2: oscillator output/clock out.
 MCLR: master clear pin (Active low reset).
 Vpp: programming voltage input.
 THV: High voltage test mode controlling.
 Vref (+/-): reference voltage.
 SS: Slave select for the synchronous serial port.
 T0CK1: clock input to TIMER 0.
 T1OSO: Timer 1 oscillator output.
 T1OS1: Timer 1 oscillator input.
 T1CK1: clock input to Timer 1.
 PGD: Serial programming data.
 PGC: serial programming clock.
 PGM: Low Voltage Programming input.
 INT: external interrupt.
 RD: Read control for parallel slave port.
 CS: Select control for parallel slave.
 PSP0 to PSP7: Parallel slave port.
 VDD: positive supply for logic and input pins.
 VSS: Ground reference for logic and input/output pins.
Singaperumal Thayar Thunai
Chapter 5: EMBEDDED C
5.1 INTRODUCTION OF EMBEDDED C
In embedded programming usually programmer have to be much more aware of the
resources consumed in embedded systems programming than you have to in “ordinary”
programs time, space, communication channels, files, ROM (Read-Only Memory), Flash
memory, etc..
Programmer must take the time to learn about the way your language features are
implemented for a particular platform hardware, operating system and Libraries.
A lot of this kind of programming is looking at specialized features of an RTOS (Real
Time Operating System), Using a “Non-hosted environment” (that’s one way of saying “a
language right on top of hardware without an operating system”), Involving (sometimes
complex) device driver architectures and Dealing directly with hardware device interfaces.
5.2 FAILING OF HARDWARE
In general, we cannot know how the failing happening was. In practice, we can assume
that some kinds of errors are more common than others but sometimes a memory bit just decides
to change. Why because there is more number of failure can occur,
 Power surges/failure
 The connector vibrated out of its socket
 Falling debris
 Falling computer
 X-rays
Singaperumal Thayar Thunai
The transient errors are the worst (E.g., only when the temperature exceeds 100° F. and
the cabinet door is closed) and the errors that occur away from the lab are the worst (E.g., on
Mars).
5.3 AVOIDING THE FAILURE
Replicate -> In emergency, use a spare
Self-check-> Know when the program (or hardware) is misbehaving
Have a quick way out of misbehaving code ->Make systems modular, Have some other
module, computer, part of the system responsible for serious errors, In the end, maybe a person
i.e., manual override.
Monitor (sub) systems-> In case they can’t/don’t notice problems themselves
5.4 COMMON AIM OF CODING STANDARD
 Reliability
 Portability
 Maintainability
 Testability
 Reusability
 Extensibility
 Readability
Singaperumal Thayar Thunai
5.5 SAMPLE RULES OF CODING
 No function shall have more than 200 lines (30 would be even better) that is, 200
non-comment source lines
 Each new statement starts on a new line (E.g., int a = 7; x = a+7; f(x, 9); //
violation!)
 No macros shall be used except for source control (using #ifdef and #ifndef
Identifiers should be given descriptive names)
 May contain common abbreviations and acronyms
 When used conventionally, x, y, i, j, etc., are descriptive
 Use the number_of_elements style rather than the numberOfElements style
 Type names and constants start with a capital letter(E.g., Device_driver and
Buffer_pool )
 Identifiers shall not differ only by case (E.g., Head and head // violation!)
 Identifiers in an inner scope should not be identical to identifiers in an outer scope
(E.g., int var = 9; { int var = 7; ++var; } // violation: var hides var )
 Declarations shall be declared in the smallest possible scope
 Variables shall be initialized (E.g., int var; // violation: var is not initialized)
 Casts should be used only when essential
 Code should not depend on precedence rules below the level of arithmetic
expressions (E.g., x = a*b+c; // ok)
 if( a<b || c<=d) // violation: parenthesize (a<b) and (c<=d)
 Increment and decrement operations shall not be used as sub expressions (E.g.,
int x = v[++i]; // violation (that increment might be overlooked))
Singaperumal Thayar Thunai
5.6 EXAMPLE PROGRAMS
1). Requirement: LED blinking- 8 LEDs are connected in PORTB.
Coding:
void main()
{
TRISB = 0; // set direction to be output
do
{
PORTB = 0x00; // Turn OFF LEDs on PORTB
Delay_ms(1000); // 1 second delay
PORTB = 0xFF; // Turn ON LEDs on PORTB
Delay_ms(1000); // 1 second delay
} while(1); // Endless loop
}
2).Requirement: Running glow of LEDs- 8 LEDs connected in PORTA
Coding:
char counter;
void wait()
{
Singaperumal Thayar Thunai
Delay_ms(100);
}
void main()
{
TRISA = 0x00; // set direction to be output
PORTA = 0x00; // turn OFF the LATD leds
while (1)
{
for (counter=0; counter<8; counter++)
{
PORTA |= 1 << counter;
wait();
}
counter = 0;
while (counter<8)
{
PORTA &= ~(1 << counter);
wait();
counter++;
}
}
Singaperumal Thayar Thunai
}
3).Requirement: Controlling the LEDs by using a switch. 4 LEDs are connected in PORTC
and a switch connected in PORTB.
Coding:
char oldstate; // Old state flag
void main()
{
TRISB0_bit = 1; // set RB0 pin as input
TRISC = 0x00; // Configure PORTC as output
PORTC = 0xAA; // Initial PORTC value
oldstate = 0;
do
{
if (Button(&PORTB, 0, 1, 1)) // Detect logical one
{
oldstate = 1; // Update flag
}
if (oldstate && Button(&PORTB, 0, 1, 0)) // Detect one-to-zero transition
{
PORTC = ~PORTC; // Invert PORTC
Singaperumal Thayar Thunai
oldstate = 0; // Update flag
}
} while(1); // Endless loop
}
4).Requirement: LED blinking using timer interrupt. 6 LEDs are connected in PORTB.
Coding:
unsigned char timerint=0;
void main()
{
PORTB=0;
TRISB=0xc0;
PIR1.f0=0;
PIE1.f0=1;
INTCON=0xc0;
T1CON=0x01;
while(1)
{
if(timerint)
{
PORTB=~PORTB;
Singaperumal Thayar Thunai
timerint=0;
}
}
}
void interrupt()
{
if(PIR1.f0)
{
timerint=1;
PIR1.f0=0;
TMR1L=TMR1L+176;
TMR1H=TMR1H+60;
}
}
5).Requirement: LEDs controlled by 3 switches. 4 LEDs and 3 switches connected in
PORTB. The user press the switch2 after pressing switch1 means LED will glow otherwise after
pressing switch3 means LED will off.
Coding:
// Program for controlling single LED by 3 switches
#define switch_1 PORTB.f0
Singaperumal Thayar Thunai
#define switch_2 PORTB.f1
#define switch_3 PORTB.f2
#define LED PORTB.f4
#define ON 1
#define OFF 0
#define IO_config 0x0f
#define Port_config TRISB
#define Digital_port PORTB
#define clear 0
#define set 1
#define pressed 1
#define releassed 0
#define status_1 status.f0
#define status_2 status.f1
#define status_3 status.f2
void main()
{
unsigned char status,ABC=1,GHI=1;
status_1=clear;
status_2=clear;
status_3=clear;
Singaperumal Thayar Thunai
Digital_port=clear;
Port_config=IO_config;
delay_ms(100);
while(1)
{
if(switch_1==pressed && status_1==clear)
{
status_1=set;
GHI=1;
}
if(switch_1==released && status_1==set)
{
ABC=0;
status_1=clear;
}
if(switch_2==pressed && status_2==clear )
{
if(ABC==0)
LED=ON;
if(GHI==0)
LED=OFF;
Singaperumal Thayar Thunai
status_2=set;
}
if(switch_2==released && status_2= =set)
{
status_2=clear;
ABC=1;
}
if(switch_3==pressed && status_3= =clear)
{
status_3=set;
ABC=1;
}
if(switch_3==released && status_3= =set)
{
GHI=0;
status_1=clear;
}
}
}
Singaperumal Thayar Thunai
6).Requirement: EEPROM handling. Store the value 150 in EEPROM.
Coding:
#define lcd_port PORTB
#define clear 0
#define set 1
unsigned char data=0;
void digit_disp(unsigned int digit,unsigned char row,unsigned char col,unsigned char count)
{
unsigned char temp;
if(count==3)
{
temp=digit/100;
digit=digit%100;
lcd_custom_chr(row,col,(temp+48));
col++;
}
temp=digit/10;
digit=digit%10;
lcd_custom_chr(row,col,(temp+48));
col++;
lcd_custom_chr(row,col,(digit+48));
Singaperumal Thayar Thunai
}
void init()
{
lcd_port=clear;
lcd_custom_config(&PORTB,1,2,3,4,&PORTB,7,6,5 );
lcd_custom_cmd(lcd_clear);
lcd_custom_out(1,1,"WELCOME");
delay_ms(1000);
lcd_custom_cmd(lcd_clear);
}
void EEPROM_handling()
{
soft_i2c_config(&PORTC,4,3);
soft_i2c_start();
soft_i2c_write(0xA0);
soft_i2c_write(7);
soft_i2c_write(150);
soft_i2c_stop();
delay_ms(2);
soft_i2c_start();
soft_i2c_write(0xA0);
Singaperumal Thayar Thunai
soft_i2c_write(7);
soft_i2c_start();
soft_i2c_write(0xA1);
data=soft_i2c_read(0);
soft_i2c_stop();
}
void main()
{
init();
EEPROM_handling();
lcd_custom_cmd(lcd_clear);
digit_disp(data,1,1,3);
}
5.7 EXERCISE PROGRAMS
1) Write a program to make 4 LEDs blink in alternative pins of PORTD.
2) Write a program to make running glow of LEDs in PORTA, PORTB, PORTC and
PORTD continuously.
3) Write a program to make the LED glow while pressing the switch1, off the LED while
pressing the switch2 and blink the LED while pressing switch3. PORT configuration is
your wish.
4) Write a program to blink 8 LEDs in both forward and reverse direction. The LEDs are
connected in PORTC.
5) Write a program to make LED glow after 5minites from switch pressed by using timer
Singaperumal Thayar Thunai
interrupt.
6) Write a program to handling the menu using 4 switches. Switch1, switch2, switch3 and
switch4 are used as up arrow, down arrow, select and cancel button respectively.
7) Write a program to store the password in an array using keypad.
8) Write a program to write the password into the EEPROM.
9) Write a program to display “time out” when the user didn’t give the password for
5minites.
10) Write a program to compare the password given by user and the password stored in
EEPROM.

More Related Content

What's hot

Project report on embedded system using 8051 microcontroller
Project  report on embedded system using 8051 microcontrollerProject  report on embedded system using 8051 microcontroller
Project report on embedded system using 8051 microcontrollerVandna Sambyal
 
Applications of microcontroller
Applications of microcontrollerApplications of microcontroller
Applications of microcontrollerbabak danyal
 
Industrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsIndustrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsPallavi Bharti
 
Presentation on Embedded system using micro controller by PARAS JHA
Presentation on Embedded system using micro controller  by PARAS JHAPresentation on Embedded system using micro controller  by PARAS JHA
Presentation on Embedded system using micro controller by PARAS JHAParas Jha
 
project report on embedded system
project report on embedded systemproject report on embedded system
project report on embedded systemram avtar
 
microcontroller and embedded system
microcontroller and embedded systemmicrocontroller and embedded system
microcontroller and embedded systempradeep rana
 
What is a Microcontroller ?
What is a Microcontroller ?What is a Microcontroller ?
What is a Microcontroller ?ShrutiVij4
 
Embedded and Robotics System
Embedded and Robotics SystemEmbedded and Robotics System
Embedded and Robotics SystemRK Saini
 
embedded systems and robotics on avr platform
embedded systems and robotics on avr platformembedded systems and robotics on avr platform
embedded systems and robotics on avr platformNeha Sharma
 
Door control embedded system using accelerometer sensor
Door control embedded system using accelerometer sensor Door control embedded system using accelerometer sensor
Door control embedded system using accelerometer sensor Vikrant Gupta
 
Arduino PAPER ABOUT INTRODUCTION
Arduino PAPER ABOUT INTRODUCTION  Arduino PAPER ABOUT INTRODUCTION
Arduino PAPER ABOUT INTRODUCTION NAGASAI547
 
Tutorial Arach N!D
Tutorial Arach N!DTutorial Arach N!D
Tutorial Arach N!Dkameshsept
 
Tft touch screen manufacturers
Tft touch screen manufacturersTft touch screen manufacturers
Tft touch screen manufacturersKeatonParker2
 
Robotics & Embedded Systems
Robotics & Embedded SystemsRobotics & Embedded Systems
Robotics & Embedded Systemsanishgoel
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentIJERD Editor
 
TFT LCD Module Display Manufacturer
TFT LCD Module Display ManufacturerTFT LCD Module Display Manufacturer
TFT LCD Module Display ManufacturerKeatonParker2
 

What's hot (20)

Project report on embedded system using 8051 microcontroller
Project  report on embedded system using 8051 microcontrollerProject  report on embedded system using 8051 microcontroller
Project report on embedded system using 8051 microcontroller
 
Applications of microcontroller
Applications of microcontrollerApplications of microcontroller
Applications of microcontroller
 
Industrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsIndustrial training report of embedded system and robotics
Industrial training report of embedded system and robotics
 
Presentation on Embedded system using micro controller by PARAS JHA
Presentation on Embedded system using micro controller  by PARAS JHAPresentation on Embedded system using micro controller  by PARAS JHA
Presentation on Embedded system using micro controller by PARAS JHA
 
project report on embedded system
project report on embedded systemproject report on embedded system
project report on embedded system
 
Micro controller
Micro controllerMicro controller
Micro controller
 
Embedded system apsd
Embedded system apsdEmbedded system apsd
Embedded system apsd
 
microcontroller and embedded system
microcontroller and embedded systemmicrocontroller and embedded system
microcontroller and embedded system
 
Embeded system
Embeded systemEmbeded system
Embeded system
 
What is a Microcontroller ?
What is a Microcontroller ?What is a Microcontroller ?
What is a Microcontroller ?
 
Embedded and Robotics System
Embedded and Robotics SystemEmbedded and Robotics System
Embedded and Robotics System
 
embedded systems and robotics on avr platform
embedded systems and robotics on avr platformembedded systems and robotics on avr platform
embedded systems and robotics on avr platform
 
Seminar
SeminarSeminar
Seminar
 
Door control embedded system using accelerometer sensor
Door control embedded system using accelerometer sensor Door control embedded system using accelerometer sensor
Door control embedded system using accelerometer sensor
 
Arduino PAPER ABOUT INTRODUCTION
Arduino PAPER ABOUT INTRODUCTION  Arduino PAPER ABOUT INTRODUCTION
Arduino PAPER ABOUT INTRODUCTION
 
Tutorial Arach N!D
Tutorial Arach N!DTutorial Arach N!D
Tutorial Arach N!D
 
Tft touch screen manufacturers
Tft touch screen manufacturersTft touch screen manufacturers
Tft touch screen manufacturers
 
Robotics & Embedded Systems
Robotics & Embedded SystemsRobotics & Embedded Systems
Robotics & Embedded Systems
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
TFT LCD Module Display Manufacturer
TFT LCD Module Display ManufacturerTFT LCD Module Display Manufacturer
TFT LCD Module Display Manufacturer
 

Similar to Embedded notes.iet.trichy

Embedded system 8051 Microcontroller
Embedded system 8051 MicrocontrollerEmbedded system 8051 Microcontroller
Embedded system 8051 Microcontrollerankitsharmaj
 
ACCELEROMETER BASED GESTURE ROBO CAR
ACCELEROMETER BASED GESTURE ROBO CARACCELEROMETER BASED GESTURE ROBO CAR
ACCELEROMETER BASED GESTURE ROBO CARHarshit Jain
 
IRJET- IoT based Industrial Automation
IRJET-  	  IoT based Industrial AutomationIRJET-  	  IoT based Industrial Automation
IRJET- IoT based Industrial AutomationIRJET Journal
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxMeghdeepSingh
 
Contactless digital tachometer using microcontroller
Contactless digital tachometer using microcontroller Contactless digital tachometer using microcontroller
Contactless digital tachometer using microcontroller IJECEIAES
 
Embedded System for begners and good for seminar
 Embedded System for begners and good for seminar Embedded System for begners and good for seminar
Embedded System for begners and good for seminarSwaraj Nayak
 
Chapter 4 plc programing(1) by m
Chapter 4 plc programing(1) by mChapter 4 plc programing(1) by m
Chapter 4 plc programing(1) by mGerbawYasgat
 
summer training report (2)
summer training report (2)summer training report (2)
summer training report (2)Kavya Gupta
 
Gesture based vehicle movements control and alerting system docu
Gesture based vehicle movements control and alerting system docuGesture based vehicle movements control and alerting system docu
Gesture based vehicle movements control and alerting system docuVignan Munna
 
Part 3 block diagram of PLC.
Part 3 block diagram of PLC.Part 3 block diagram of PLC.
Part 3 block diagram of PLC.KuldeepMakwana6
 
Plc example presentation
Plc example presentationPlc example presentation
Plc example presentationRoshit Kadiru
 
Intro to micro controller (Atmega16)
Intro to micro controller (Atmega16)Intro to micro controller (Atmega16)
Intro to micro controller (Atmega16)Ramadan Ramadan
 
Everything about PLC programming Practical lessons on PLC EMERSON EDUARDO ROD...
Everything about PLC programming Practical lessons on PLC EMERSON EDUARDO ROD...Everything about PLC programming Practical lessons on PLC EMERSON EDUARDO ROD...
Everything about PLC programming Practical lessons on PLC EMERSON EDUARDO ROD...EMERSON EDUARDO RODRIGUES
 
Everything about PLC programming Practical lessons on PLC EMERSON EDUARDO RO...
Everything about PLC programming Practical lessons on PLC  EMERSON EDUARDO RO...Everything about PLC programming Practical lessons on PLC  EMERSON EDUARDO RO...
Everything about PLC programming Practical lessons on PLC EMERSON EDUARDO RO...EMERSON EDUARDO RODRIGUES
 

Similar to Embedded notes.iet.trichy (20)

Embedded system 8051 Microcontroller
Embedded system 8051 MicrocontrollerEmbedded system 8051 Microcontroller
Embedded system 8051 Microcontroller
 
ACCELEROMETER BASED GESTURE ROBO CAR
ACCELEROMETER BASED GESTURE ROBO CARACCELEROMETER BASED GESTURE ROBO CAR
ACCELEROMETER BASED GESTURE ROBO CAR
 
IRJET- IoT based Industrial Automation
IRJET-  	  IoT based Industrial AutomationIRJET-  	  IoT based Industrial Automation
IRJET- IoT based Industrial Automation
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
 
Embedded system
Embedded  systemEmbedded  system
Embedded system
 
Contactless digital tachometer using microcontroller
Contactless digital tachometer using microcontroller Contactless digital tachometer using microcontroller
Contactless digital tachometer using microcontroller
 
Embedded System for begners and good for seminar
 Embedded System for begners and good for seminar Embedded System for begners and good for seminar
Embedded System for begners and good for seminar
 
Chapter 4 plc programing(1) by m
Chapter 4 plc programing(1) by mChapter 4 plc programing(1) by m
Chapter 4 plc programing(1) by m
 
Industrial Automation
Industrial AutomationIndustrial Automation
Industrial Automation
 
summer training report (2)
summer training report (2)summer training report (2)
summer training report (2)
 
Gesture based vehicle movements control and alerting system docu
Gesture based vehicle movements control and alerting system docuGesture based vehicle movements control and alerting system docu
Gesture based vehicle movements control and alerting system docu
 
Part 3 block diagram of PLC.
Part 3 block diagram of PLC.Part 3 block diagram of PLC.
Part 3 block diagram of PLC.
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Plc example presentation
Plc example presentationPlc example presentation
Plc example presentation
 
embedded system
embedded systemembedded system
embedded system
 
Intro to micro controller (Atmega16)
Intro to micro controller (Atmega16)Intro to micro controller (Atmega16)
Intro to micro controller (Atmega16)
 
Everything about PLC programming Practical lessons on PLC EMERSON EDUARDO ROD...
Everything about PLC programming Practical lessons on PLC EMERSON EDUARDO ROD...Everything about PLC programming Practical lessons on PLC EMERSON EDUARDO ROD...
Everything about PLC programming Practical lessons on PLC EMERSON EDUARDO ROD...
 
Everything about PLC programming Practical lessons on PLC EMERSON EDUARDO RO...
Everything about PLC programming Practical lessons on PLC  EMERSON EDUARDO RO...Everything about PLC programming Practical lessons on PLC  EMERSON EDUARDO RO...
Everything about PLC programming Practical lessons on PLC EMERSON EDUARDO RO...
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 

More from SankaraVinayagam (12)

Plc syllabus
Plc syllabusPlc syllabus
Plc syllabus
 
Iet profile
Iet profileIet profile
Iet profile
 
Iet trichy.profile
Iet trichy.profileIet trichy.profile
Iet trichy.profile
 
Plc syllabus
Plc syllabusPlc syllabus
Plc syllabus
 
Iet profile
Iet profileIet profile
Iet profile
 
Embedded notes.iet.trichy
Embedded notes.iet.trichyEmbedded notes.iet.trichy
Embedded notes.iet.trichy
 
Iet trichy.profile
Iet trichy.profileIet trichy.profile
Iet trichy.profile
 
Homecare.trichy
Homecare.trichyHomecare.trichy
Homecare.trichy
 
Homecare
HomecareHomecare
Homecare
 
Iet trichy.profile
Iet trichy.profileIet trichy.profile
Iet trichy.profile
 
Microgrid. iettrichy
Microgrid. iettrichyMicrogrid. iettrichy
Microgrid. iettrichy
 
Microgrid.iet
Microgrid.ietMicrogrid.iet
Microgrid.iet
 

Recently uploaded

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Recently uploaded (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

Embedded notes.iet.trichy

  • 1. Singaperumal Thayar Thunai INNOVATIVE ELECTRICAL TECHNOLOGIES Shaping Quality Engineers ____________________________________________________________________________ EMBEDDED 1. OVER VIEW OF EMBEDED SYSTEM 1.1System 1.2Embedded System 1.3Components of Embedded System 1.4Embedded System Hardware 1.5Developing Embedded System 2. HARDWARE DESIGN 2.1 Microcontroller 2.2 Processor 2.3 Controller and Processor Comparison 2.4 Popular Microcontrollers 2.5 Power Supply Section Designing 2.6 Signal Generation with Speed of Frequency 3. MICROCONTROLLER 8051 3.1 Basic Components of 8051 3.2 Features of 8051 3.3 Pin diagram 4. PIC MICROCONTROLLER 4.1 Features of PIC
  • 2. Singaperumal Thayar Thunai 4.2 Pin Diagram 4.3 Pin Description 5. EMBEDDED C 5.1 Introduction of Embedded C 5.2 Failing of Hardware 5.3 Avoiding the Failure 5.4 Common Aim of Coding Standard 5.5 Sample Rules of Coding Standard 5.6 Example Programs 5.7 Exercise Programs
  • 3. Singaperumal Thayar Thunai Chapter 1: OVER VIEW OF EMBEDDED SYSTEM 1.1 SYSTEM A system is a way of working, organizing or doing one or many tasks according to a fixed plan, program or set of rules. A system is also an arrangement in which all its units assemble and work together according to the plan or program. Example: 1. WATCH It is a time display SYSTEM Parts: Hardware, Needles, Battery, Dial, Chassis and Strap. Rules  All needles move clockwise only  A thin needle rotates every second  A long needle rotates every minute  A short needle rotates every hour  All needles return to the original position after 12 hours. 2. WASHING MACHINE It is an automatic clothes washing SYSTEM Parts: Status display panel, Switches & Dials, Motor, Power supply & control unit, Inner water level sensor and solenoid valve. Rules  Wash by spinning
  • 4. Singaperumal Thayar Thunai  Rinse  Drying  Wash over by blinking  Each step display the process stage  In case interruption, execute only the remaining 1.2 EMBEDDED SYSTEM An embedded system is a special purpose system that is used to perform one or few dedicated functions. Simply, we can call any electronic device that has a computer system embedded inside it an embedded system. An Embedded System is one that has computer hardware with software embedded in it as one of its important components. Some examples of embedded systems are: 1. Alarm / security system 2. Automobile cruise control 3. Heating / air conditioning thermostat 4. Microwave oven 5. Anti-skid braking controller 6. Traffic light controller 7. Vending machine 8. Gas pump 9. Handheld Sudoku game
  • 5. Singaperumal Thayar Thunai 10. Irrigation system controller 11. Singing wall fish (or this gift season’s equivalent) 12. Mars Rover Embedded systems are made to perform few tasks only, after implementation you can’t use them for another purposes. Ex: You can’t watch movies using the microprocessor of your microwave oven!! 1.3 COMPONENTS OF EMBEDDED SYSTEM  It has Hardware They are processor, Timers, Interrupt controller, I/O Devices, Memories, Ports, etc.  It has main Application Software That may perform concurrently the series of tasks or multiple tasks.  It has Real Time Operating System (RTOS) RTOS defines the way the system work which supervise the application software. It sets the rules during the execution of the application program. A small scale embedded system may not need an RTOS.
  • 6. Singaperumal Thayar Thunai 1.4 EMBEDDED SYSTEM HARDWARE 1.5 DEVELOPING EMBEDDED SYSTEMS Embedded System Development Software Development Hardware Development
  • 7. Singaperumal Thayar Thunai Chapter 2: HARDWARE DESIGN 2.1 MICROCONTROLLER It’s a full computer system on a chip, even if its resources are far more limited than of a desktop personal computer designed for standalone operations. So.. What’s the difference between a microcontroller and a microprocessor system? A microcontroller has a processor and many peripherals integrated with it on the same chip, like a flash memory, RAM, I/O ports, serial communication ports, ADC, Etc.
  • 8. Singaperumal Thayar Thunai  A timer module to allow the MCU to perform tasks for certain time periods.  A serial I/O port to allow data to flow between the MCU and other devices such as a PC or another MCU.  An ADC to allow the MCU to accept analog inputs for processing.  But a microprocessor can’t do all the functions of a computer system on its own, and needs another circuits to support it like: I/O devices, RAM, ROM, DMA controllers, Timers, ADC, LCD drivers.. Etc. 2.2 PROCESSOR Program Flow and data path Control Unit (CU): That includes a fetch unit for fetching instructions from the memory. Execution Unit (EU): Includes circuits for arithmetic and logical unit (ALU), and for instructions for a program control task, say, data transfer instructions, halt, interrupt, or jump to another set of instructions or call to another routine or sleep or reset.
  • 9. Singaperumal Thayar Thunai 2.3 CONTROLLER AND PROCESSOR COMPARISION 2.4 POPULAR MICROCONTROLLERS  8051 (Intel and others)  80386 EX (Intel)  PIC (Microchip)  68HC05 (Motorola)  Z8 (Zilog) COMPARISION Microcontroller General purpose Microprocessor Depend mainly on its peripherals like: Program memory, I/O ports, timers, interrupt circuitry, ADC, Etc. Depend mainly on other devices like: I/O devices, memory, DMA controllers, Etc. Used for a few dedicated functions determined by the system designer. Used in many applications, according to the program running on it Usually used as a part of a larger system It’s in the heart of our PC’s
  • 10. Singaperumal Thayar Thunai 2.5 POWER SUPPLY SECTION DESIGNING You need to hook up 5V and GND to your micro. Your house outlet runs at 220V AC and is very bad for 5V DC (direct current) micros. So you'll need to convert the 220V AC from your outlet to a useable 5V DC. If you reverse the connection on your micro - bad things happen. Always make sure your 5V power supply is connected to the VCC pins and GND to GND. If you reverse this and connect 5V to GND on the micro and GND to VCC on the micro, things won't explode, probably no smoke, things will probably heat up like crazy. Before the regulator circuit, the 220V AC converted to 9V DC by using adapter. Then the 9V converted to 5V DC by the regulator circuit. The most common regulator is called the LM7805. We can simply connect the terminals of the regulator LM7805 like in above circuit but there is some noise in the input pin. That noise may affect the output voltage so we should use filtering capacitors to get better output voltage.
  • 11. Singaperumal Thayar Thunai Another thing is, while designing the circuit as a beginner there may be a chance of making mistakes in designing so if any things heat up/smoke/spark, just unplug or turn off the system. So we need an on/off power switch/relay. Now the circuit modified as below. Remember all the warning about reversing VCC and GND and how that is bad? Well if you connect your power supply backwards, that's bad. So let's protect ourselves! Note that the diodes are polarized. Hence the diode can avoid reverse current. Let us see how to connect the LED with this regulator circuit. If you connect the LED like in above circuit the LED will glow much brighter but burn out. The LED is a diode it can withstand only 20mA. So here we should use ohms law (V=IR) to calculate the resistance value to drop voltage and maintain the current 20mA. The calculation as follows, V = IR (this is Ohm's law) If we have 5V, and we only want 20mA flowing through the LED: 5V = 0.02 * R R = 250 Ohm Now this is not completely true because the LED has a forward voltage drop. But don’t worry about that we can use 220 ohm, 330ohm and 1k.The final proper circuit is given below,
  • 12. Singaperumal Thayar Thunai 2.6 SIGNAL GENERATION WITH SPEED OF FREQUENCY Calculation of Machine Cycle for 8051: The formula for calculating the machine cycle is given by, Machine cycle=1/(Fosc/12). Find the machine cycle for Fosc = 11.0592 MHz Fosc = 16 MHz Solution: 1). 11.0592 MHz / 12 = 921.6 kHz; Machine cycle = 1 / 921.6 kHz = 1.085 s 2). 16 MHz / 12 = 1.333 MHz; Machine cycle = 1 / 1.333 MHz = 0.75 s
  • 13. Singaperumal Thayar Thunai Calculation of Machine Cycle for PIC16f877A: The formula for calculating the machine cycle is given by, Machine cycle=1/(Fosc/4).
  • 14. Singaperumal Thayar Thunai Chapter 3: MICROCONTROLLER 8051 3.1 BASIC COMPONENTS OF 8051  4K bytes internal ROM  128 bytes internal RAM  Four 8-bit I/O ports (P0 - P3).  Two 16-bit timers/counters  One serial interface. 3.2 FEATURES OF 8051  only 1 On chip oscillator (external crystal)  6 interrupt sources (2 external , 3 internal, Reset)  64K external code (program) memory(only read)PSEN  64K external data memory(can be read and write) by RD,WR  Code memory is selectable by EA (internal or external)  We may have External memory as data and code.
  • 15. Singaperumal Thayar Thunai 3.3 PIN DIAGRAM One of the most useful features of the 8051 is that it contains four I/O ports (P0 - P3)  Port 0 (pins 32-39):P0(P0.0~P0.7) 8-bit R/W - General Purpose I/O Or acts as a multiplexed low byte address and data bus for external memory design  Port 1 (pins 1-8) :P1(P1.0~P1.7) Only 8-bit R/W - General Purpose I/O  Port 2 (pins 21-28):P2(P2.0~P2.7) 8-bit R/W - General Purpose I/O Or high byte of the address bus for external memory design  Port 3 (pins 10-17):P3(P3.0~P3.7) General Purpose I/O
  • 16. Singaperumal Thayar Thunai If not using any of the internal peripherals (timers) or external interrupts.  Each port can be used as input or output (bi-direction).  The port3 has alternative functions as follows.
  • 17. Singaperumal Thayar Thunai Chapter 4: PIC MICROCONTROLLER 4.1 FEATURES OF PIC  There are varieties of choice in PIC from 8 bit to 32 bit.  Low Power  Reasonable Size  Convenient Packaging  Through Hole (Dip)  Surface Mount (QFN/SPDIP)  Resources and References  Sleep mode  Watchdog timer (WDT)  Code protection  In-circuit serial programming  In-circuit debugger
  • 18. Singaperumal Thayar Thunai 4.2 PIN DIAGRAM Pin diagram of PIC16F877A. 4.3 PIN DESCRIPTION As seen in Figure above, the most pins are multi-functional. For example, designator RA3/AN3/Vref+/C1IN+ for the fifth pin specifies the following functions:  RA3 Port A third digital input/output  AN3 Third analog input  Vref+ Positive voltage reference  C1IN+ Comparator C1positive input
  • 19. Singaperumal Thayar Thunai This small trick is often used because it makes the microcontroller package more compact without affecting its functionality. These various pin functions cannot be used simultaneously, but can be changed at any point during operation. PIC16F877 has 5 basic input/output ports. They are usually denoted by PORT A (R A), PORT B (RB), PORT C (RC), PORT D (RD), and PORT E (RE). These ports are used for input/ output interfacing. In this controller, “PORT A” is only 6 bits wide (RA-0 to RA-7), ”PORT B” , “PORT C”,”PORT D” are only 8 bits wide (RB-0 to RB-7,RC-0 to RC-7,RD-0 to RD-7), ”PORT E” has only 3 bit wide (RE-0 to RE-7). PORT-A RA-0 to RA-5 6 bit wide PORT-B RB-0 to RB-7 8 bit wide PORT-C RC-0 to RC-7 8 bit wide PORT-D RD-0 to RD-7 8 bit wide PORT-E RE-0 to RE-2 3 bit wide All these ports are bi-directional. The direction of the port is controlled by using TRIS(X) registers (TRIS A used to set the direction of PORT-A, TRIS B used to set the direction for PORT-B, etc.). Setting a TRIS(X) bit ‘1’ will set the corresponding PORT(X) bit as input. Clearing a TRIS(X) bit ‘0’ will set the corresponding PORT(X) bit as output. (If we want to set PORT A as an input, just set TRIS(A) bit to logical ‘1’ and want to set PORT B as an output, just set the PORT B bits to logical ‘0’.)  Analog input port (AN0 TO AN7) : these ports are used for interfacing analog inputs.  TX and RX: These are the USART transmission and reception ports.  SCK: these pins are used for giving synchronous serial clock input.  SCL: these pins act as an output for both SPI and I2C modes.  DT: these are synchronous data terminals.
  • 20. Singaperumal Thayar Thunai  CK: synchronous clock input.  SD0: SPI data output (SPI Mode).  SD1: SPI Data input (SPI mode).  SDA: data input/output in I2C Mode.  CCP1 and CCP2: these are capture/compare/PWM modules.  OSC1: oscillator input/external clock.  OSC2: oscillator output/clock out.  MCLR: master clear pin (Active low reset).  Vpp: programming voltage input.  THV: High voltage test mode controlling.  Vref (+/-): reference voltage.  SS: Slave select for the synchronous serial port.  T0CK1: clock input to TIMER 0.  T1OSO: Timer 1 oscillator output.  T1OS1: Timer 1 oscillator input.  T1CK1: clock input to Timer 1.  PGD: Serial programming data.  PGC: serial programming clock.  PGM: Low Voltage Programming input.  INT: external interrupt.  RD: Read control for parallel slave port.  CS: Select control for parallel slave.  PSP0 to PSP7: Parallel slave port.  VDD: positive supply for logic and input pins.  VSS: Ground reference for logic and input/output pins.
  • 21. Singaperumal Thayar Thunai Chapter 5: EMBEDDED C 5.1 INTRODUCTION OF EMBEDDED C In embedded programming usually programmer have to be much more aware of the resources consumed in embedded systems programming than you have to in “ordinary” programs time, space, communication channels, files, ROM (Read-Only Memory), Flash memory, etc.. Programmer must take the time to learn about the way your language features are implemented for a particular platform hardware, operating system and Libraries. A lot of this kind of programming is looking at specialized features of an RTOS (Real Time Operating System), Using a “Non-hosted environment” (that’s one way of saying “a language right on top of hardware without an operating system”), Involving (sometimes complex) device driver architectures and Dealing directly with hardware device interfaces. 5.2 FAILING OF HARDWARE In general, we cannot know how the failing happening was. In practice, we can assume that some kinds of errors are more common than others but sometimes a memory bit just decides to change. Why because there is more number of failure can occur,  Power surges/failure  The connector vibrated out of its socket  Falling debris  Falling computer  X-rays
  • 22. Singaperumal Thayar Thunai The transient errors are the worst (E.g., only when the temperature exceeds 100° F. and the cabinet door is closed) and the errors that occur away from the lab are the worst (E.g., on Mars). 5.3 AVOIDING THE FAILURE Replicate -> In emergency, use a spare Self-check-> Know when the program (or hardware) is misbehaving Have a quick way out of misbehaving code ->Make systems modular, Have some other module, computer, part of the system responsible for serious errors, In the end, maybe a person i.e., manual override. Monitor (sub) systems-> In case they can’t/don’t notice problems themselves 5.4 COMMON AIM OF CODING STANDARD  Reliability  Portability  Maintainability  Testability  Reusability  Extensibility  Readability
  • 23. Singaperumal Thayar Thunai 5.5 SAMPLE RULES OF CODING  No function shall have more than 200 lines (30 would be even better) that is, 200 non-comment source lines  Each new statement starts on a new line (E.g., int a = 7; x = a+7; f(x, 9); // violation!)  No macros shall be used except for source control (using #ifdef and #ifndef Identifiers should be given descriptive names)  May contain common abbreviations and acronyms  When used conventionally, x, y, i, j, etc., are descriptive  Use the number_of_elements style rather than the numberOfElements style  Type names and constants start with a capital letter(E.g., Device_driver and Buffer_pool )  Identifiers shall not differ only by case (E.g., Head and head // violation!)  Identifiers in an inner scope should not be identical to identifiers in an outer scope (E.g., int var = 9; { int var = 7; ++var; } // violation: var hides var )  Declarations shall be declared in the smallest possible scope  Variables shall be initialized (E.g., int var; // violation: var is not initialized)  Casts should be used only when essential  Code should not depend on precedence rules below the level of arithmetic expressions (E.g., x = a*b+c; // ok)  if( a<b || c<=d) // violation: parenthesize (a<b) and (c<=d)  Increment and decrement operations shall not be used as sub expressions (E.g., int x = v[++i]; // violation (that increment might be overlooked))
  • 24. Singaperumal Thayar Thunai 5.6 EXAMPLE PROGRAMS 1). Requirement: LED blinking- 8 LEDs are connected in PORTB. Coding: void main() { TRISB = 0; // set direction to be output do { PORTB = 0x00; // Turn OFF LEDs on PORTB Delay_ms(1000); // 1 second delay PORTB = 0xFF; // Turn ON LEDs on PORTB Delay_ms(1000); // 1 second delay } while(1); // Endless loop } 2).Requirement: Running glow of LEDs- 8 LEDs connected in PORTA Coding: char counter; void wait() {
  • 25. Singaperumal Thayar Thunai Delay_ms(100); } void main() { TRISA = 0x00; // set direction to be output PORTA = 0x00; // turn OFF the LATD leds while (1) { for (counter=0; counter<8; counter++) { PORTA |= 1 << counter; wait(); } counter = 0; while (counter<8) { PORTA &= ~(1 << counter); wait(); counter++; } }
  • 26. Singaperumal Thayar Thunai } 3).Requirement: Controlling the LEDs by using a switch. 4 LEDs are connected in PORTC and a switch connected in PORTB. Coding: char oldstate; // Old state flag void main() { TRISB0_bit = 1; // set RB0 pin as input TRISC = 0x00; // Configure PORTC as output PORTC = 0xAA; // Initial PORTC value oldstate = 0; do { if (Button(&PORTB, 0, 1, 1)) // Detect logical one { oldstate = 1; // Update flag } if (oldstate && Button(&PORTB, 0, 1, 0)) // Detect one-to-zero transition { PORTC = ~PORTC; // Invert PORTC
  • 27. Singaperumal Thayar Thunai oldstate = 0; // Update flag } } while(1); // Endless loop } 4).Requirement: LED blinking using timer interrupt. 6 LEDs are connected in PORTB. Coding: unsigned char timerint=0; void main() { PORTB=0; TRISB=0xc0; PIR1.f0=0; PIE1.f0=1; INTCON=0xc0; T1CON=0x01; while(1) { if(timerint) { PORTB=~PORTB;
  • 28. Singaperumal Thayar Thunai timerint=0; } } } void interrupt() { if(PIR1.f0) { timerint=1; PIR1.f0=0; TMR1L=TMR1L+176; TMR1H=TMR1H+60; } } 5).Requirement: LEDs controlled by 3 switches. 4 LEDs and 3 switches connected in PORTB. The user press the switch2 after pressing switch1 means LED will glow otherwise after pressing switch3 means LED will off. Coding: // Program for controlling single LED by 3 switches #define switch_1 PORTB.f0
  • 29. Singaperumal Thayar Thunai #define switch_2 PORTB.f1 #define switch_3 PORTB.f2 #define LED PORTB.f4 #define ON 1 #define OFF 0 #define IO_config 0x0f #define Port_config TRISB #define Digital_port PORTB #define clear 0 #define set 1 #define pressed 1 #define releassed 0 #define status_1 status.f0 #define status_2 status.f1 #define status_3 status.f2 void main() { unsigned char status,ABC=1,GHI=1; status_1=clear; status_2=clear; status_3=clear;
  • 30. Singaperumal Thayar Thunai Digital_port=clear; Port_config=IO_config; delay_ms(100); while(1) { if(switch_1==pressed && status_1==clear) { status_1=set; GHI=1; } if(switch_1==released && status_1==set) { ABC=0; status_1=clear; } if(switch_2==pressed && status_2==clear ) { if(ABC==0) LED=ON; if(GHI==0) LED=OFF;
  • 31. Singaperumal Thayar Thunai status_2=set; } if(switch_2==released && status_2= =set) { status_2=clear; ABC=1; } if(switch_3==pressed && status_3= =clear) { status_3=set; ABC=1; } if(switch_3==released && status_3= =set) { GHI=0; status_1=clear; } } }
  • 32. Singaperumal Thayar Thunai 6).Requirement: EEPROM handling. Store the value 150 in EEPROM. Coding: #define lcd_port PORTB #define clear 0 #define set 1 unsigned char data=0; void digit_disp(unsigned int digit,unsigned char row,unsigned char col,unsigned char count) { unsigned char temp; if(count==3) { temp=digit/100; digit=digit%100; lcd_custom_chr(row,col,(temp+48)); col++; } temp=digit/10; digit=digit%10; lcd_custom_chr(row,col,(temp+48)); col++; lcd_custom_chr(row,col,(digit+48));
  • 33. Singaperumal Thayar Thunai } void init() { lcd_port=clear; lcd_custom_config(&PORTB,1,2,3,4,&PORTB,7,6,5 ); lcd_custom_cmd(lcd_clear); lcd_custom_out(1,1,"WELCOME"); delay_ms(1000); lcd_custom_cmd(lcd_clear); } void EEPROM_handling() { soft_i2c_config(&PORTC,4,3); soft_i2c_start(); soft_i2c_write(0xA0); soft_i2c_write(7); soft_i2c_write(150); soft_i2c_stop(); delay_ms(2); soft_i2c_start(); soft_i2c_write(0xA0);
  • 34. Singaperumal Thayar Thunai soft_i2c_write(7); soft_i2c_start(); soft_i2c_write(0xA1); data=soft_i2c_read(0); soft_i2c_stop(); } void main() { init(); EEPROM_handling(); lcd_custom_cmd(lcd_clear); digit_disp(data,1,1,3); } 5.7 EXERCISE PROGRAMS 1) Write a program to make 4 LEDs blink in alternative pins of PORTD. 2) Write a program to make running glow of LEDs in PORTA, PORTB, PORTC and PORTD continuously. 3) Write a program to make the LED glow while pressing the switch1, off the LED while pressing the switch2 and blink the LED while pressing switch3. PORT configuration is your wish. 4) Write a program to blink 8 LEDs in both forward and reverse direction. The LEDs are connected in PORTC. 5) Write a program to make LED glow after 5minites from switch pressed by using timer
  • 35. Singaperumal Thayar Thunai interrupt. 6) Write a program to handling the menu using 4 switches. Switch1, switch2, switch3 and switch4 are used as up arrow, down arrow, select and cancel button respectively. 7) Write a program to store the password in an array using keypad. 8) Write a program to write the password into the EEPROM. 9) Write a program to display “time out” when the user didn’t give the password for 5minites. 10) Write a program to compare the password given by user and the password stored in EEPROM.