industrialtraining

21
REPORT ON INDUSTRIAL TRAINING TRAINING IN EMBEDDED SYSTEM @ CMC ACADEMY NEW DELHI A TATA ENTERPRISE SUBMITTED BY: RAKESH KUMAR THAKUR Department Of Electronics and Communication Jawaharlal Nehru Government Engineering College, Sundernagar

Upload: rakesh-thakur

Post on 19-Feb-2017

32 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: Industrialtraining

REPORT ON INDUSTRIAL TRAINING

TRAINING IN EMBEDDED SYSTEM@ CMC ACADEMY NEW DELHI

A TATA ENTERPRISE

SUBMITTED BY:RAKESH KUMAR THAKUR

Department Of Electronics and CommunicationJawaharlal Nehru Government Engineering College, Sundernagar

Distt. Mandi H.P. Pin - 175018

Page 2: Industrialtraining

S. NO. CONTENT

1 EMBEDDED SYSTEM

2 CONTROLLING UNIT

3 MICROCONTROLLER

4 8051

5 AVR

6 ATMEGA 16

7 PROJECT

INDEX

Page 3: Industrialtraining

EMBEDDED SYSYTEM :

HIDDEN ARCHITECTURE

An architecture used to perform a particular task that is hidden;

TO BUILD SET OF INSTRUCTION

Perform a user defined task by accepting instruction from user

HARDWARE AND SOFTWARE

Combination of computer hardware and software which is designed to perform many operations

TECHNOLOGY AND OUTPUT

Technology used to produce a desired output

Page 4: Industrialtraining

Controlling Unit :

Microprocessor e.g. Intel 8085; Intel Pentium;

Microcontroller e.g. 8051; AVR; ARM;PIC;

Digital Signal Processor ASIC / ASIP (Application specific integrated controller/processor)

e.g. IC 555;

Page 5: Industrialtraining

MICROCONTROLLER

No. of Bits :

4;8;16;32; Memory Devices :

Embedded and External; Instruction Set :

CISC and RISC Architecture :

Princeton (Von Neumann) and Harvard Little vs Big Indian:

Page 6: Industrialtraining

8051

4KB ROM 128 B RAM Four 8-bit I/O ports Two 8/16 bit timers Serial port 64K external code memory space 64K data memory space Multiple internal and external interrupt sources

Page 7: Industrialtraining

Comparison of 8031/8032;8051;8052 :

8031/8032 8051 8052ROM 0 KB 4KB 8KB

RAM 128B 128B 256B

TIMERS 2 2 3

INTERRUPTS 6 6 8

NO OF I/O PINS 32 32 32

STACK POINTER 8 BIT 8 BIT 8 BIT

PROGRAM COUNTER

16 BIT 16 BIT 16 BIT

ADDRESS BUS 16 BIT 16 BIT 16 BIT

MAX ADDRESSABLE

MEMORY64KB 64KB 64KB

Page 8: Industrialtraining

PIN DIAGRAM

Port x(0,1,2,3) : used an i/o pins

Vcc : used for dc supply (+5V)

Gnd : used for providing ground

XTAL1,2 : used to connect oscillator

ALE : Address Latch Enable

EA : External Access

PSEN : Program Status Enable

RST : Reset

RxD : Serial reception

TxD : Serial Transmission

INT : Interrupt

T0,1: External Timer

A : Address lines

D : Data Lines

Page 9: Industrialtraining

INTERFACING :

LED INTERFACING 7 SEGMENT INTERFACING

Page 10: Industrialtraining

AVR (ADVANCED VIRTUAL RISC MACHINE)

AVR architecture conceived by two students at the Norwegian Institute of

Technology Alf-Egil Bogen and Vegard Wollan

Devices range from 1 to 512KB

Pin count range from 8 to 128

One instruction per external clock

Page 11: Industrialtraining

ATMEL TECHNOLOGIES:

TINY MEGA XMEGAPINS 6-28 28-60 60-128

MEMORY 1-8 KB 8-64 KB 64-512KB

LANGUAGE C & ASSEMBLYC & ASM &

JESSEL & GUI &OPEN SOURCE

ALL LANGUAGE

APPLICATION SMALL APPLICATION

LOW & HIGH APPLICATION

SPECIAL APPLICATION

(HIGH PROCESSING)

Page 12: Industrialtraining

ATMEGA 16 :

8-bit microcontroller based on the AVR RISC architecture

One instruction per external clock (16MHZ for 16MIPS)

32 x 8 General Purpose Working Registers

Six ADC channels

Internal Calibrated Oscillator

16KB of Flash program memory

512B EEPROM (Electrically Erasable Programmable Read Only Memory)

1KB Static RAM (Random Access Memory)

Page 13: Industrialtraining

REGISTER USED :

PORT X (X : A;B;C;D;E;F;G;H) SHIFT REGISTER (<<;>>) USART

UDR (USART Data Registers) USART Control & Status Registers

UCSRA UCSRB UCSRC

USART Baud Rate Registers UBRRH UBRRL

Page 14: Industrialtraining

PIN DIAGRAM :

P x(A,B,C,D) : used an i/o pins

Vcc : used for dc supply (+5V)

Gnd : used for providing ground

XTAL1,2 : used to connect oscillator

ALE : Address Latch Enable

EA : External Access

PSEN : Program Status Enable

RST : Reset

RxD : Serial reception

TxD : Serial Transmission

INT : Interrupt

T0,1: External Timer

A : Address lines

D : Data Lines

Page 15: Industrialtraining

INTERFACING :

MOTOR INTERFACING KEYPAD & LCD INTERFACING

Page 16: Industrialtraining

Wireless Voice Controlled Robot :

Focus on controlling motion of robot using voice ; Microcontroller used is AT Mega 16; Serial transmission of data using Bluetooth; Bluetooth App used for Data Fetching and Transmitting Data;

Similar project can be used in Home automation and using GSM Modem can be used at

long range;

Page 17: Industrialtraining

Schematic Diagram :

Page 18: Industrialtraining

Programming :

#include <avr/io.h>#include <util/delay.h>

#define rs PB0#define rw PB1#define en PB2

#define s1 PC3#define s2 PC4#define s3 PC5

#define l1 PB4#define l2 PB5#define l3 PB6#define l4 PB7

void lcmd(int a){ PORTA=a;

PORTB&=~(1<<rs);PORTB&=~(1<<rw);PORTB|=(1<<en);_delay_ms(10);PORTB&=~(1<<en);}

void ldata(int a){ PORTA=a;

PORTB&=~(1<<rw);PORTB|=(1<<rs);PORTB|=(1<<en);_delay_ms(10);PORTB&=~(1<<en);}

void lstring(char*s){ int i;

for(i=0;s[i]!='\0';i++){ldata(s[i]); } }

Page 19: Industrialtraining

void usart(int bd){

UBRRL=bd;UBRRH=(bd>>8);UCSRC|=(1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0);UCSRB=(1<<RXEN)|(1<<TXEN); }

char read(){

while(!(UCSRA&(1<<RXC)));return UDR; }

void write(char ch){

while(!(UCSRA&(1<<UDRE)));UDR=ch; }

int main(void){ usart(103);

int p[12];DDRB=0xff;DDRA=0xff;

lcmd(0x01);lcmd(0x38);lcmd(0x0e);lcmd(0x80);lstring("autonomous robot");lcmd(0xc0);

while (1) { b: for(int i=0;i<10;i++)

{ p[i]=read();write(p[i]);ldata(p[i]);

if(p[i]=='#'){ _delay_ms(100);

goto a; } }

Page 20: Industrialtraining

a:if(p[0]=='*'&&p[1]=='f'&&p[2]=='o'&&p[3]=='r'&&p[4]=='w'&&p[5]=='a'&&p[6]=='r'&&p[7]=='d'&&p[8]=='#')

{PORTB=0b10100000;lcmd(0x01);lcmd(0x38);lcmd(0x0e);lcmd(0x82);lstring("forward"); }

if(p[0]=='*'&&p[1]=='b'&&p[2]=='a'&&p[3]=='c'&&p[4]=='k'&&p[5]=='w'&&p[6]=='a'&&p[7]=='r'&&p[8]=='d'&&p[9]=='#'){ PORTB=0b01010000;

lcmd(0x01);lcmd(0x38);lcmd(0x0e);lcmd(0x82);lstring("backward"); }

if(p[0]=='*'&&p[1]=='l'&&p[2]=='e'&&p[3]=='f'&&p[4]=='t'&&p[5]=='#'){ PORTB=0b00010000;

lcmd(0x01);lcmd(0x38);lcmd(0x0e);lcmd(0x82);lstring("left"); }

if(p[0]=='*'&&p[1]=='r'&&p[2]=='i'&&p[3]=='g'&&p[4]=='h'&&p[5]=='t'&&p[6]=='#'){ PORTB=0b01000000;

lcmd(0x01);lcmd(0x38);lcmd(0x0e);lcmd(0x82);lstring("right"); }}}

Page 21: Industrialtraining

THANK YOU