Presentation is loading. Please wait.

Presentation is loading. Please wait.

RPS GROUP OF INSTUTIONS

Similar presentations


Presentation on theme: "RPS GROUP OF INSTUTIONS"— Presentation transcript:

1 RPS GROUP OF INSTUTIONS
SATNALI ROAD, BALANA(MOHINDERGARH) SUMMER TRAINING REPORT ON ‘ EMBEDDED SYSTEM’ BY SOFCON Submitted to : Submitted by : Mr. KARAMBIR SHEORAN SANDEEP Asstt. Professor & Head ECE Deptt. Department of Electronics & Communication Engineering

2 Embedded Systems Embedded system means the processor is embedded into that application An embedded product uses a microprocessor or microcontroller to do task In an embedded system, there is only one application software that is typically burned into ROM Example printer, keyboard, video game player

3 Microcontroler Features of 8051 ROM - 4K bytes RAM - 128 bytes
Timer - 2 I/O pins - 32 Serial port - 1 Interrupt sources - 6 8051 is based on CISC architecture. It is based on Harvard architecture. So, it has separate program and data memory.

4 Block Diagram of 8051 External interrupts On-chip ROM for program code
Counter Inputs Timer/Counter Interrupt Control On-chip RAM Timer 1 Timer 0 CPU Serial Port Bus Control 4 I/O Ports OSC P0 P1 P2 P3 TxD RxD Address/Data

5 8051: Pin Diagram

6 What is a microprocessor?
The microprocessor is the integration of a number of useful functions. These functions are: The ability to execute a stored set of instructions to carry out user defined tasks. General-purpose microprocessor. Act as CPU for Computers. No RAM, ROM, I/O on CPU chip itself Example Intel’s 8086 ,8085.

7 Microprocessor v/s Micro-controllers
Microprocessors High end of market where performance matters High power dissipation–high cost Need peripheral devices to work Mostly used in microcomputers Microcontrollers Targeted for low end of market where performance doesn’t matter Low power dissipation – low cost Memory plus I/O devices, all integrated into one chip Mostly used in embedded systems

8 Use of c Introduction to C programming
Powerful features, simple syntax, and portability make C a preferred language among programmers for business and industrial applications. Portability means that C programs written for a computer with a particular kind of processor, say Intel, can be executed on computers with different processors such as Motorola, Sun Sparc, or IBM with little or no modification Origin of C Dennis M. Ritchie, a systems engineer at Bell Laboratories, New Jersey developed C in the early 1970’s. Where is C useful? The following is a partial list of areas where C language is used: Ø Embedded Systems Ø Systems Programming Ø Artificial Intelligence Ø Industrial Automation Ø Computer Graphics Ø Space Research Ø Image Processing Ø Game Programming

9 LED [LIGHT EMITTING DIOIDE]
A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices Type optoelectronic Working principle Electroluminescence Invented Nick Holonyak Jr. (1962) Electronic symbol Pin configuration Anode and Cathode

10 STRUCTURE OF LED Like a normal diode, the LED consists of a chip of semiconducting material doped with impurities to create a p-n junction. As in other diodes, current flows easily from the p-side, or anode, to the n-side, or cathode.

11 Color Wavelength (nm) Voltage (V) Semiconductor Material Infrared λ > 760 ΔV < 1.9 Gallium arsenide (GaAs) Aluminium gallium arsenide (AlGaAs) Red 610 < λ < 760 1.63 < ΔV < 2.03 Aluminium gallium arsenide (AlGaAs) Gallium arsenide phosphide (GaAsP) Aluminium gallium indium phosphide (AlGaInP) Gallium(III) phosphide (GaP) Orange 590 < λ < 610 2.03 < ΔV < 2.10 Gallium arsenide phosphide (GaAsP) Aluminium gallium indium phosphide (AlGaInP) Gallium(III) phosphide (GaP) Yellow 570 < λ < 590 2.10 < ΔV < 2.18

12 Green 500 < λ < 570 1.9[42] < ΔV < 4.0 Indium gallium nitride (InGaN) / Gallium(III) nitride (GaN) Gallium(III) phosphide (GaP) Aluminium gallium indium phosphide (AlGaInP) Aluminium gallium phosphide (AlGaP) Blue 450 < λ < 500 2.48 < ΔV < 3.7 Zinc selenide (ZnSe) Indium gallium nitride (InGaN) Silicon carbide (SiC) as substrate Silicon (Si) as substrate — (under development) Violet 400 < λ < 450 2.76 < ΔV < 4.0 Indium gallium nitride (InGaN) Purple multiple types Dual blue/red LEDs, blue with red phosphor, or white with purple plastic Ultraviolet λ < 400 3.1 < ΔV < 4.4 Diamond (235 nm)[43] Boron nitride (215 nm)[44][45] Aluminium nitride (AlN) (210 nm)[46] Aluminium gallium nitride (AlGaN) Aluminium gallium indium nitride (AlGaInN) — (down to 210 nm)[47]

13 LEDs are produced in a variety of shapes and sizes
LEDs are produced in a variety of shapes and sizes. The 5 mm cylindrical package (red, fifth from the left) is the most common, estimated at 80% of world production.The color of the plastic lens is often the same as the actual color of light emitted, but not always. For instance, purple plastic is often used for infrared LEDs, and most blue devices have clear housings. There are also LEDs in SMT packages, such as those found on blinkies and on cell phone keypads (not shown). The main types of LEDs are miniature, high power devices and custom designs such as alphanumeric or multi-color Types

14 CODING FOR LED BLINKING
#include<reg51.h> #define led P1 void msdelay(unsigned int); void main() { while(1) led=0xff; msdelay(44); led=0x00; } void msdelay(unsigned int t) unsigned int i,j; for(i=0;i<=1233;i++) for(j=0;j<=t;j++);

15 look like 7-segment LED Display
7-segment LED Display is display device which can display one digit at a time Actually one digit is represented by arrangement of 7 LEDs in a small cubical box For representing 3 digit number we need three 7-segment LED Displays look like

16 Truth Table: 7 Segment Display
OUTPUT h g f e d c b a HEX CODE 1 C0 F9 2 A4 3 B0 4 99 5 92 6 82 7 F8 8 80 9 90

17 CODING FOR 7 SEG LED case 1: seg=0x06; break; case 2:
seg=0x4f; case 4: seg=0x66; case 5: seg=0x6d; case 6: seg=0x7d; case 7: seg=0x07; case 8: seg=0x7f; case 9: seg=0x67; }}} #include<reg51.h> #define seg P1 sbit inc=P2^0; sbit dec=P2^1; void main() { unsigned int k=0,i; while(1) if(inc==0) k=k+1; for(i=0;i<=35000;i++); } if(dec==0) k=k-1; switch(k) case 0: seg=0x3f; break;

18 7 SEG LED CKT DIAGRAM PROTEUS DESIGN

19 About LCD Pin no. Description 1 Ground 2 +5 Volts 3 LCD contrast 4
Instruction/Data input 5 Write/read signal 6 Enable signal 7 to 14 D0 to D7 data bus lines

20 DESCRIPTION LCD Address 80 81 82 83 84 85 86 to 8F C0 C1 C2 C3 C4 C5
RS – register select If RS=0, used to send commands such as clear display, cursor position etc. If RS=1, used to send data to the LCD. R/W – read / write If R/W = 1, read from LCD If R/W = 0, write to LCD E – enable A 450 nano seconds high-to-low pulse is applied in order to send data. LCD Address For 16x2 LCD the address of the cursor positions are: All these addresses are in hexadecimal. 80 81 82 83 84 85 86 to 8F C0 C1 C2 C3 C4 C5 C6 to CF

21 LCD Command Codes HEX CODE COMMAND 0x01 CLEAR LCD 0x02 RETURN HOME
SHIFT CURSOR LEFT 0x06 SHIFT CURSOR RIGHT 0x05 SHIFT DISPLAY RIGHT 0x07 SHIFT DISPLAY LEFT 0x08 DISPLAY OFF, CURSOR OFF 0x0A DISPLAY OFF, CURSOR ON 0x0C DISPLAY ON, CURSOR OFF 0x0E DISPLAY ON, CURSOR BLINKING 0x10 SHIFT CURSOR TO LEFT 0x14 SHIFT CURSOR TO RIGHT 0x18 SHIFT DISPLAY TO LEFT 0x1C SHIFT DISPLAY TO RIGHT 0x80 FORCE CURSOR TO BEGINNING OF FIRST LINE 0xC0 FORCE CURSOR TO BEGINNING OF 2ND LINE 0x38 2 LINES & 5X7 MATRIX

22 Addressing Modes The CPU can access data in various ways. The data could be in a register or in memory or be provided as an immediate value. These various ways of accessing data are called addressing modes. Total 5 addressing modes: 1) Immediate 2) Register 3) Direct 4) Register indirect 5) Indexed

23 Immediate addressing mode
Ex: MVI A,25H ;load 25h into A Immediate data must be preceded by the pound sign “#”. Although DPTR is 16 bit, it can be accessed as two 8-bit registers, DPH and DPL. MOV DPTR, #2550h is same as, MOV DPL, #50h MOV DPH,#25h

24 Register Addressing Modes
Ex: MOV A, R0 ;copy contents of R0 into A Direct addressing Mode MOV R0,40h ;save the contents of RAM location 40h in R0 MOV 56h,A ;save the contents of A in RAM location 56h The ‘#’ symbol distinguishes between the direct addressing and immediate addressing mode.

25 Register Indirect addressing Mode
Here register is used as a pointer to the data. If the data is inside CPU, only registers R0 and R1 are used for this purpose. When R0 and R1 are used as pointers, i.e., when they hold the address of RAM, they must be preceded by sign. Ex: MOV A,M ; ;move contents of B into RAM location whose address is held by R1.

26


Download ppt "RPS GROUP OF INSTUTIONS"

Similar presentations


Ads by Google