You are on page 1of 39

Introduction of Organization :

1.1 HISTORY:
1981 The company was incorporated on December 2, under the name of Pace.Education Private Limited. The company was promoted by ShriS.S.Nadar, Shri. V.K. Thadani, Shri. R.S. Pawar and Smt. KiranNadar. The company began its operation by developing, marketing and implementing technical knowhow packagesfor Education or Training.Consultancy& data processing in the field of Information Technology.

1982: The first Computer Education Centre was set up at Mumbai and later in the same year another centre was opened in Delhi.

1988: On 27th October company became a Public Limited company.

1990: On 16th November, the name of the Company was changed to NIIT Limited.

MMEC Mullana

Page 1

1992: A contract was signed with Software Publishing Corporation (SPC)for developing an enhanced version of one of the SPC's own' products. The Company successfully introduced two new facilities in the form of `Computerdromes' and the `Carry Home PC', which were received very well. The Company developed curicula for professional sales and Marketing which are offered through the National Institute of Sales (NIS) at New Delhi and Chennai. The company undertook to set up six software factories at New Delhi,Mumbai and Chennai. The company also undertook to set up additional automated learning centres at Mumbai, Calcutta, Delhi and Chennai.

NIIT (BOMBAY):
NIIT is a leading Global Talent Development Corporation, building skilled manpower pool for global industry requirements. The company which was set up in 1981, to help the nascent IT industry overcome its human resource challenges, has today grown to be amongst worlds leading talent development companies offering learning solutions to Individuals, Enterprises and Institutions across 40 countries. NIITs training solutions in IT, Business Process Outsourcing, Banking, Finance and Insurance, Executive Management Education, and Communication and Professional Life Skills, touch five million learners every year. NIITs expertise in learning content development, training delivery and education process management make it the most preferred training partner, worldwide. Leading IT magazine Dataquest has conferred upon NIIT, the Top IT Training Company award successively for

MMEC Mullana

Page 2

the past 18 years, since the inception of this category.

Research-based Innovation, a key driver at NIIT, has enabled the organisation to develop programs and curricula that use cutting-edge instructional design methodologies and training delivery. NIITs Individual Learning Business offerings include industry-endorsed programs for students seeking careers in IT New Age GNIIT (Indias First Cloud Campus), Edgeineers and Global Net Plus for IT professionals. For working professionals, NIIT Imperia, Centre for Advanced Learning, offers Executive Management Education Programs in association with IIM Ahmadabad, IIM Calcutta, IIM Lucknow, IMT Ghaziabad and IIFT Delhi. NIIT Imperia also offers specialized courses in Finance in association with KPMG and on Digital Marketing with Google India and Internet and Mobile Association of India (IAMAI). NIIT Institute of Finance Banking & Insurance (IFBI), formed by NIIT with equity participation from ICICI Bank, offers programs for individuals and corporates in Banking, Financial Services and Insurance. NIIT Uniqua, Centre for Process Excellence, addresses the increasing demand for skilled workers in the business and technology services industry by providing training programs in relevant areas. This is a part of NIIT Institute of Process Excellence, a NIIT-Genpact venture. NIIT Careers@Campus, the companys Institutional Alliances Business for colleges and Universities, delivers in-campus training through Synchronous Learning Technology. NIITs Corporate Learning Solutions, NIITs Corporate Learning Solutions, offers integrated learning solutions (including strategic consulting, learning design, content development, delivery, technology, assessment and learning management) to Fortune 500 companies, Universities, Technology companies, Training corporations and Publishing houses. NIITs innovative HR practices have been felicitated by Aon Hewitt as amongst Top 25 Best Employers in India- 2011; Education Awards 2011 as Best Education Company to Work with; by Places to Work Institute as amongst Top 25 Indias Best Companies to Work for and First in Training & Education Industry, 2011. Ushering in a new model in higher education is the not-for-profit NIIT University, established in 2009 with a vision of being the leading centre of innovation and learning in emerging areas of the Knowledge Society. Nestled in the foothills of Aravali,
MMEC Mullana Page 3

Embedded System
Intoduction
Any electronic system that uses a computer chip, but that is not a general-purpose workstation, desktop or laptop computer. Such systems use microcontrollers (MCUs) or microprocessors (MPUs) or they may use custom-designed chips. Embedded System,constantly evolves with advances in technology and dramatic decreases in the cost of implementing various hardware and software components. An embedded system is a single-purpose computer built into a larger system for the purposes of controlling and monitoring the system .A general purpose computer (e.g. a personal computer) is defined not to be an embedded system.

Definition of Embedded OS :
An embedded operating system is the software program that manages all the other programs in an embedded device after initial load of programs by a boot loader. It normally guarantees a certain capability within a specified storage size and time constraint as well as with application programs.

Component of Embedded OS :
It normally has small foot print including initial boot loader, OS kernel, required device drivers, file systems for the user data and so forth. It has very-likely structure of a normal operating system however mainly differentiated by some factors such as type of pre-installed device, functional limits, taking designed job only.

Example of Embedded System:


MMEC Mullana Page 4

Keyboard and other controllers for computers, CD players and consumer electronics, Timing and control electronics in microwave ovens, coffee makers. Controllers for vacuum cleaners and washing machines for sensing dirt loads. Internal operation of medical instrumentation such as infusion pumps, pulse oximeters and many more.

Processor/controller classification(based on architecture):

Von-Neumann architecture:Program and data memory share same address space. Data and program cannot be fetched simultaneously. Disadvantage: Bottleneck on buses leads to limited throughput. Advantage: Simple.E.g.: 8085, x86 architectures.

MMEC Mullana

Page 5

Harvard architecture:Program and data memory have dedicated buses. Data and program memory can be fetched simultaneously. Advantage: Higher throughput. Disadvantage: Hardware realization is complex. E.g.: AVR, PIC, ARM.

MMEC Mullana

Page 6

Based on instruction set: CISC (Complex Instruction Set Computing) RISC (Reduced Instruction Set Computing)

CISC:
Instruction set is complex (huge). Instructions for every possible case. Each instruction consists of many low level instructions. Variable instruction length. Instruction execution times differ. E.g.: 8051, 8085, Motorola 68000

RISC:
MMEC Mullana Page 7

Instruction set is of limited size. Instructions are simple and exhibit single cycle execution. CPU/ALU design is simplified. E.g. : ARM, AVR

Microcontroller Families:
8051(Intel) AVR(Atmel) PIC(Microchip) MSP(Texas Instruments) ARM(ARM) 68HC08/11(Motorola)

Why AVR ??
AVR is 7 times faster than a PIC16. 15 times faster than a 68HC11. A whopping 28 times faster than an 8051. You would need to have an 8051 running at 224MHz to match the speed of an 8MHz AVR. Surprisingly, AtmegaXX series controllers are also the cheapest of the lot () due to their increased usage.

MMEC Mullana

Page 8

AVR Architecture :

MMEC Mullana

Page 9

AVR Registers:
Eight-bit microcontroller with 32 8-bit general purpose registers. Three 16-bit address registers X (r27:r26), y (r29:r28), z (r31:r30). The 16-bit stack pointer is located at I/O addresses 0x3e (SPH) and 0x3d (SPL). These addresses are also mapped to data memory addresses 0x5e and 0x5d (i.e., I/O address plus 0x20). An eight-bit status register (SREG) that contains:

I : Global Interrupt Enable/Disable Flag, SREG7 T : Transfer bit used by BLD and BST instructions, H : Half Carry Flag, SREG5 S : For signed tests Instruction Set, SREG4 V : Two's complement overflow indicator, SREG3 N : Negative Flag, SREG2 Z : Zero Flag, SREG1 C : Carry Flag, SREG0

SREG6

MMEC Mullana

Page 10

MMEC Mullana

Page 11

Introduction to uNiBoard :

UNiBoard version 1.1 features :


ATMega64 based microcontroller board with 64KB flash memory working at 16MIPS 2KB Internal SRAM and 2KB Internal EEPROM. Open interface to all port pins facilitates easy access. Communication ports provided: I2C, SPI, RS232 (dual programmable USART, can be used as standard input for the board). Onboard analog joystick to be used a sensor along with on-chip AD ADC. Onboard 16x2 LCD with backlight to be used as a standard output for display. Open LED interface to monitor status of any port. On board I2C based DS1307 with battery back up to be used as a RTC. Other on board components include LDR, Buzzer (beneath processor board) for general purpose experimentation.

MMEC Mullana

Page 12

USB programmable (no external programmers required, can be used with laptops without any converters). USB powered (no external supply required). JTAG interface for on-chip debugging. Modular design to permit easy replacement of components in case of damage.

AVR Family :

ATMEGA 16 :

ATMEGA 8 :

ATMEGA 32 :

ATMEGA 64 :

MMEC Mullana

Page 13

ATMEGA 128 :

ATMEGA 64 :

MMEC Mullana

Page 14

ATMEGA16 PIN DAIGRAM

MMEC Mullana

Page 15

Understanding AVR Port Structure :

I/O PORT PROGRAMMING :

NOTE:- Internal pull-up would be active only when the port is used as an input port. For alternate functions of ports, refer to data sheet. Understanding AVR Port Structure :

MMEC Mullana

Page 16

When we initialize an I/O port as Output Port Eg: PORTC=0xFF

When we initialize an I/O port as Output Port. Eg: PORTC=0x00

MMEC Mullana

Page 17

When we initialize an I/O port as Output Port. Eg: PORTC=0x5A

LED sinking and Sourcing : Active Low configuration is the one in which LED is activated by logic LOW

MMEC Mullana

Page 18

Active High configuration is the one in which LED is activated by logic HIGH

MMEC Mullana

Page 19

Initializing as Input :

when the Switch is Closed the Port Pin becomes LOW ... Eg: You will get PINC=0x00.
Page 20

MMEC Mullana

MMEC Mullana

Page 21

How switch is connected :


A switch in Active High means well get logic HIGH when switch is pressed. A switch in Active Low means well get logic LOW when switch is pressed.

Data Communication : Data communication deals with sending and receiving of information between two locations by means of electrical signals. There are two types of electrical signals : Analog and Digital. Type of communication Protocol : (a) Parallel Communication Protocol. (b) Serial Communication Protocol.
MMEC Mullana Page 22

Parallel Communication : Parallel communication is the method of transferring blocks of data. Example :- BYTE of data at the same time.

MMEC Mullana

Page 23

Serial Communication vs Parallel Communication :

USART :
USART is abbreviated as Universal Synchronous Asynchronous Receiver and Transmitter. A standard I/O device that provides conversions between serial and parallel data. Used for serial data transfer using RS-232 protocol. Provides a basic protocol for serial communication.

RS232 Protocol : This is a standard specification for the physical layer of a serial data interchange. This specifies physical connections and voltage levels. Data is transferred as series of bits represented by voltage levels varying over time. Logic HIGH (MARK) Undefined LOW (SPACE) -12v to -3v +3V to -3v +12 to +3v

MMEC Mullana

Page 24

RS232 Basics :

For asynchronous communication, only three lines are needed. Common ground Transmitted data (TD) Received data (RD) Note that the transmit line on one end is the receive line on the other end.

MMEC Mullana

Page 25

TTL VS RS232 :

Frame Format :

MMEC Mullana

Page 26

Block Diagram Of AVR USART :

MMEC Mullana

Page 27

Clock Generator Section :

Transmitter Section :

MMEC Mullana

Page 28

Receiver Section :

Managing I/O Communication : Approaches:a)Polling b)Interrupt driven approaches Polling: CPU keeps on checking periodically if an event which is desired has occurred. Occurrence of event is generally signaled by setting a flag.

MMEC Mullana

Page 29

USART Programming Steps :


There are three steps for USART initialization : A) Baud Rate setting. B) Frame format setting C) Enable the Rx ,Tx / Interrupt

Baud Rate Setting : Select baud Rate (BAUD) Use this equation to configure registers in order to select the desired baud rate. UBRR=(FOSC/16*BAUD)-1. UBRR comprises of UBRRH (higher byte) and UBRRL (lower byte). FOSC = 16Mhz since we are using an external crystal of 16Mhz. E.g.: For Baud rate (BAUD) = 9600bps
Page 30

MMEC Mullana

Using above formula: UBRR = 103 or 0x67. UBRRH = 0 or 0x00;

Enabling Receiver and Transmitter(RXTN & TXEN) :

MMEC Mullana

Page 31

Converting C code to Embedded C code :

RS232 based applications : Many sensors like GSM, GPS, Zigbee Embedded Cams like AVR Cam Protocol converters like Wi-Fi to RS232, USB to RS232.

MMEC Mullana

Page 32

LCD specifications :
Using LCD as a standard output device: Based on Hitachis HD44780 dot matrix LCD controller / driver Alphanumeric LCD 16 character X 2 line display Yellow backlight Contrast adjustment pot Pixel size: 5 dots X 8 dots Typical write time is in order of milliseconds

MMEC Mullana

Page 33

Used to display messages to user (Output Device) Displaying on LCD (for debugging) is costlier than displaying on USART While displaying debugging information, USART should be preferred as a standard output (can go up to 115200 bps)

2x16 LCD pin Description :

MMEC Mullana

Page 34

Programming : Include the following files in your project lcd.c global.h

timer.hMain() { lcdInitHW(); lcdInit(); lcdGotoXY(0,4); lcdPrintData(Hello Word!, 11); lcd.h

Main.c : Add a new c source file to your AVR Studio project. Type in the main function as shown below: }

PROJECT: PASSWORD CONTROL GAME // Program to get input Password Control Game.
#include"adc.h" #include"uart1.h" #include"eeprom.h" #include"lcd.h" #define CORRECT_PASSWORD #define DEBUG
MMEC Mullana

1 0
Page 35

void init(); unsigned char password_cmp(unsigned char *,unsigned char*); void main() { unsigned char *orginal_password; unsigned char *user_password; unsigned char chk = 0,count = 1; unsigned int adc_data = 0; init(); lcd_cmd(0x0c); orginal_password = eeprom_read_string(0x0050); if(DEBUG) { tx_string("orginal password = "); tx_string(orginal_password); tx_string("\r\n"); }

while(1) { tx_string("\n\n\n\renter the password\r\n"); lcd_string("enterpass="); user_password = rx_string();

tx_string("user password = "); tx_string(user_password); lcd_string(user_password); tx_string("\r\n"); chk = password_cmp(user_password,orginal_password); if(DEBUG) { tx_string("chk = "); tx(chk+'0'); tx_string("\r\n"); }

MMEC Mullana

Page 36

if(chk==CORRECT_PASSWORD) { tx_string("password correct\r\n"); lcd_cmd(0x80); lcd_string("password correct"); ADCSRA |=(1<<ADSC); while(1) { adc_data = read_adc(res_10bit); //read adc data tx_string("X = "); tx_num(adc_data); tx_string("\r\n"); _delay_ms(100); } } else { tx_string("password incorrect\r\n"); lcd_cmd(0x80); lcd_string("passwrdINcorrect");

count+=1; if(count>3) { tx_string("more than three attempts with wrong password\r\n"); tx_string("account blocked"); break; } }

} }

void init() { init_adc(1,0xa7); init_uart(); init_lcd();

MMEC Mullana

Page 37

unsigned char password_cmp(unsigned char *usr,unsigned char *org) { unsigned char usr_len=0,org_len=0; unsigned char *temp; temp = usr; while(*temp!=13) { usr_len+=1; temp++; } if(DEBUG) { tx_string("usr_len = "); tx(usr_len+'0'); tx_string("\r\n"); } temp = org; while(*temp) { org_len+=1; temp++; } if(DEBUG) { tx_string("org_len = "); tx(org_len+'0'); tx_string("\r\n"); } if(usr_len == org_len) { while(*usr == *org) { usr_len-=1; usr++; org++; } if(DEBUG)
MMEC Mullana Page 38

//enterkey ascii value 13

{ tx_string("user_len = "); tx(usr_len+'0'); tx_string("\r\n"); } if(usr_len == 0) { return(1); } else { return(0); }

} else { return(0); } }

REFERENCES:

www.avr.com www.wikipedia.com www.eceprojects.com www.thinklabs.com www.niit.com

MMEC Mullana

Page 39

You might also like