SlideShare a Scribd company logo
By P. Venkata Sai Vamsi,
3rd Year EE, B.Tech,
IIT Indore.

ELECTRONICS CLUB, IIT INDORE
Outline
•
•
•
•
•
•
•

Introduction
Block Diagrams
Classifications in Microcontrollers (Atmega 32A)
Integration of Keyboard with the Microcontroller
Integration of LCD Display with the Microcontroller
CID CALCULATOR
Programming
Introduction (Source – Wikipedia)
Microprocessor:- The microprocessor is a multipurpose
programmable device that accepts digital data as input, processes
it according to instructions stored in its memory, and provides
results as output.

8085 MICROPROCESSOR
Microcontroller:- is a small computer on a single integrated
circuit containing a processor core, memory, and
programmable input/output peripherals.
Example:Microcontroller based
Microwave

Peripherals:- is a device that is connected to a host computer,
but not an integral part of it. It expands the host's capabilities
but does not form part of the core computer architecture. It is
often, but not always, partially or completely dependent on the
host.
There are three different types of peripherals:
I. Input devices (mouse, keyboards, etc.)
II. Output devices (monitors, printers, etc.)
III. Storage devices (hard drives, flash drives, etc.)
Examples:-

4x4 Keypad

16x2 LCD Display
Microprocessor Block Diagram

Ex:- Keyboard

MICROPROCESSOR
Microcontroller Block Diagram

MICROCONTROLLER

PORTS
Classifications in Microcontrollers (ATMEGA 32A)
• Ports:- PORT A, PORT B, PORT C, PORT D
Each port consists of 8 pins, to transfer 8 bit data between the
Microcontroller and the Peripheral devices. These ports can acts
as both input/output ports.
• Interrupts:- INT 0, INT 1

interrupt is a signal to the processor emitted by hardware or
software indicating an event that needs immediate attention.
The processor responds by suspending its current activities,
saving its state, and executing a small program called
an interrupt handler (or interrupt service routine, ISR) to deal
with the event. This interruption is temporary, and after the
interrupt handler finishes, the processor resumes execution of
the previous thread.
Edge triggered interrupt:- An edge-triggered interrupt is an
interrupt signaled by a level transition on the interrupt line,
either a falling edge (high to low) or a rising edge (low to high).

***For more details in using Interrupts contact me pvsvamsi2009@gmail.com

Active Low and Active High:- If any port is activated by giving
low (0) input, then it is called as Active Low and vice versa.
Ex:- Reset is active low
• ATMEGA 32A Pin Configuration

Back
Integration of Keyboard with the Microcontroller
Key Board Integration (4x4 Keyboard)

Switches
Here I connected the
keyboard to PortB.
Any port will solve the
purpose.
Before Pressing a key
Introduction to Microcontrollers
By following the above procedure, we can get the row no of the
key pressed.
Question:- How we will find the column no of the key pressed?
By following the above procedure, we can get the ‘row no’ of the
key pressed.
Question:- How we will find the ‘column no’ of the key pressed?
Answer:- By setting the value of each column to ‘1’ (one at a
time), we can observe the change in the state of the row 1 for
the corresponding change in the state of column 1 (here we
pressed the 1st key).

*****This is the end of the keyboard integration*****
Integration of LCD Display with the Microcontroller
Why do we prefer LCD Display to 16/17 segment ALPHA Numeric
Display?
Reasons:1. Length of the display - In 16x2 LCD Display unit, we can
display up to the 32 characters. Whereas, in 16/17 segment
ALPHA Numeric Display we require, 32 display units to
display the same.
2. Ease of use – Predefined libraries are available for the LCD
Display.
Integration of LCD Display with the Microcontroller

Connections with Atmega 32A
Procedure
Add the predefined libraries to your project folder and initialize
the LCD subsystem using a call to LCDInit(LS_BLINK|LS_ULINE).
To write any text call LCDWriteString("Welcome"); To write any
number call void LCDWriteInt(int val,unsigned int field_length);
This will print a integer contained in “val”. The field length is the
length of field in which the number is printed.
Example:- LCDWriteInt(3,4); will print as follows
Question:- Can any one guess what happens if we write
LCDWriteInt(123,5); ?
Question:- Can any one guess what happens if we write
LCDWriteInt(123,5); ?
Answer:-
Next function - void LCDGotoXY(uint8_t x,uint8_t y);
Here, uint8_t represents unsigned integer which is 8bit.
So, the maximum number it can store = 2^8-1 = 255.
LCDGotoXY(11,1);

This function changes the cursor position to the given X,Y
coordinates.
LCD Display panel, will retain the previously displayed value. It
won’t clear it.
Well, does anyone wonder how to clear the display then?
Here comes the use of another important function LCDClear();
This will clears the display and reset’s the default cursor position
to (0,0).
Next function - LCDWriteStringXY(x,y,msg);
With this function, user can display the message at his desired
coordinates.
For Example:LCDWriteStringXY(3,0,”hello”);
LCDWriteStringXY(8,1,”world”);

Similarly there is a function for integers.
LCDWriteIntXY(x,y,num,field_length);
*****This is the end of the LCD Display integration*****
FLUXUS 2014

CID CALCULATOR

FEB 7th 2014

Basic components required:1. ATMEGA 32A Microcontroller
2. Display unit ( I suggest you to use
16x2 LCD Display unit)
3. 4x4 Keyboard(No restriction with
the size)
4. Connecting Wires
5. Circuit Board
6. Battery
7. *HD74LS08 IC (AND Gate)
8. **Programmer
*Depends on whether you are going to use interrupts or not.
**We do possess one USB Programmer, which can be used for programming.
Bread boards, Soldering wire and Soldering irons are available with our electronics club.
How to start???
I think this is the big question in your mind!!!
Steps to complete the CID CALCULATOR:-

1.
2.
3.
4.

Finish off the connections part.
Start programming the microcontroller.
Implement your own ideas.
Test the functionalities of your design.

That’s it!!!
How to Connect??
How to Connect??
Connection’s part is already covered!!!
Programming
Software used: Atmel Studio 6.1
Size: Around 900MB
(This can be downloaded directly from the atmel website)
Language: ‘Embedded C’
There is no much difference between ‘embedded c’ and ‘c’.
How to connect the Programmer
ISP- In System Programming

If you remember the pin
configuration of ATMEGA 32A

MOSI - Pin 6
MISO - Pin 7
SCK - Pin 8
RESET - Pin 9
VCC - Pin 10
GND - Pin 11
Sample Program

Atmel Studio 6.1

To Blink an LED:#define F_CPU 8000000UL //Setting the clock frequency for
using delay
#include<avr/io.h>
#include<avr/interrupt.h> // For Interrupts
#include<util/delay.h>
// For Delay function
int main(void)
{ DDRD = 0xFF;
//setting Port D as output port
while(1)
//to run the loop continuously
{ PORTD = 0XFF;
//giving high (1) as output to the port D
_delay_ms(1000); //giving delay
PORTD = 0x00;
//giving low (0) as output to the port D
_delay_ms(1000); //giving delay
}}
THANK YOU

For queries, write to me @
pvsvamsi2009@gmail.com

More Related Content

What's hot (20)

PPTX
Microcontroller presentation
redwan1006066
 
PPT
Avr introduction
Anant Shrivastava
 
PPTX
Tutorial on avr atmega8 microcontroller, architecture and its applications
Edgefxkits & Solutions
 
PDF
AVR Microcontroller
Özcan Acar
 
PDF
What is a Microcontroller ?
ShrutiVij4
 
PPT
1 introducing embedded systems and the microcontrollers
Bidhu Deka
 
PDF
Introduction in microcontroller
Sayed Mahmoud AbdEl Rahman
 
PPTX
Intro to micro controller (Atmega16)
Ramadan Ramadan
 
PPTX
Microcontroller overview 1
Sally Salem
 
PDF
AVR_Course_Day4 introduction to microcontroller
Mohamed Ali
 
PPSX
ATmega32
Sɐɐp ɐɥɯǝp
 
PPTX
AVR ATmega32
Prashant Tiwari
 
PDF
Introduction to microcontrollers and embedded systems
Tyler Ross Lambert
 
PPTX
ATmega 16
Rahul Singh
 
PPTX
Microcontroller
Kshitij Wagle
 
PPT
Embedded c & working with avr studio
Nitesh Singh
 
PDF
8 bit microcontroller
محمدعبد الحى
 
PPTX
Micro-controller course lec 01
Mohamed Fadel Buffon
 
PPT
how to generate sms
sumant reddy
 
PPTX
3.TechieNest microcontrollers
TechieNest Pvt. Ltd .
 
Microcontroller presentation
redwan1006066
 
Avr introduction
Anant Shrivastava
 
Tutorial on avr atmega8 microcontroller, architecture and its applications
Edgefxkits & Solutions
 
AVR Microcontroller
Özcan Acar
 
What is a Microcontroller ?
ShrutiVij4
 
1 introducing embedded systems and the microcontrollers
Bidhu Deka
 
Introduction in microcontroller
Sayed Mahmoud AbdEl Rahman
 
Intro to micro controller (Atmega16)
Ramadan Ramadan
 
Microcontroller overview 1
Sally Salem
 
AVR_Course_Day4 introduction to microcontroller
Mohamed Ali
 
ATmega32
Sɐɐp ɐɥɯǝp
 
AVR ATmega32
Prashant Tiwari
 
Introduction to microcontrollers and embedded systems
Tyler Ross Lambert
 
ATmega 16
Rahul Singh
 
Microcontroller
Kshitij Wagle
 
Embedded c & working with avr studio
Nitesh Singh
 
8 bit microcontroller
محمدعبد الحى
 
Micro-controller course lec 01
Mohamed Fadel Buffon
 
how to generate sms
sumant reddy
 
3.TechieNest microcontrollers
TechieNest Pvt. Ltd .
 

Viewers also liked (8)

PDF
Introduction to microcontrollers
Corrado Santoro
 
PPTX
Integrated circuits
dhawal mehta
 
PPT
Integrated Circuits
ANAND G
 
PPTX
Integrated circuits
Naveen Sihag
 
PPTX
Know About Different Types of Integrated Circuits
elprocus
 
PPT
Chp4 introduction to the pic microcontroller copy
mkazree
 
PPTX
Integrated circuit
Jessa Arnado
 
PPTX
Computer Integrated Manufacturing
suraj_21
 
Introduction to microcontrollers
Corrado Santoro
 
Integrated circuits
dhawal mehta
 
Integrated Circuits
ANAND G
 
Integrated circuits
Naveen Sihag
 
Know About Different Types of Integrated Circuits
elprocus
 
Chp4 introduction to the pic microcontroller copy
mkazree
 
Integrated circuit
Jessa Arnado
 
Computer Integrated Manufacturing
suraj_21
 
Ad

Similar to Introduction to Microcontrollers (20)

PPTX
Microcontroller
Spitiq
 
DOCX
Keypad interfacing 8051 -NANOCDAC
nanocdac
 
DOCX
digital clock atmega16
Arcanjo Salazaku
 
PPTX
8051 io interface
Abhinav Shubham
 
PDF
8449972 embedded-systems-and-model-of-metro-train
Jitendra Saroj
 
PPT
Picmico
loges91
 
PDF
Micro-controllers (PIC) based Application Development
Emertxe Information Technologies Pvt Ltd
 
PDF
Microcontroladores: programación de microcontroladores PIC de 8 bits en C
SANTIAGO PABLO ALBERTO
 
PPTX
Embedded systems design @ defcon 2015
Rodrigo Almeida
 
PPTX
embedded system
Vivek Ranjan
 
PPT
Microcontroller 8051 gs
Moorthy Peesapati
 
PPTX
ESD Presenation.pptx All about embeded system
handpump91
 
PPTX
Seminar
Sayak Choudhury
 
PDF
Unit III ARM Interface and ARM Programming
Dr. Pankaj Zope
 
PPTX
Final Presentation
Susmit Sircar
 
PPTX
MPMC Architecture of 8085 Microprocessor and Programming.pptx
kaustubhshedbalkar1
 
PPTX
Embedded system design using arduino
Santosh Verma
 
PDF
3245731 tele-controlled-steper-motor-thesis
Thanh Nguyen
 
PDF
System design and 8051
handson28
 
PPTX
Basics Of Embedded Systems
arlabstech
 
Microcontroller
Spitiq
 
Keypad interfacing 8051 -NANOCDAC
nanocdac
 
digital clock atmega16
Arcanjo Salazaku
 
8051 io interface
Abhinav Shubham
 
8449972 embedded-systems-and-model-of-metro-train
Jitendra Saroj
 
Picmico
loges91
 
Micro-controllers (PIC) based Application Development
Emertxe Information Technologies Pvt Ltd
 
Microcontroladores: programación de microcontroladores PIC de 8 bits en C
SANTIAGO PABLO ALBERTO
 
Embedded systems design @ defcon 2015
Rodrigo Almeida
 
embedded system
Vivek Ranjan
 
Microcontroller 8051 gs
Moorthy Peesapati
 
ESD Presenation.pptx All about embeded system
handpump91
 
Unit III ARM Interface and ARM Programming
Dr. Pankaj Zope
 
Final Presentation
Susmit Sircar
 
MPMC Architecture of 8085 Microprocessor and Programming.pptx
kaustubhshedbalkar1
 
Embedded system design using arduino
Santosh Verma
 
3245731 tele-controlled-steper-motor-thesis
Thanh Nguyen
 
System design and 8051
handson28
 
Basics Of Embedded Systems
arlabstech
 
Ad

Recently uploaded (20)

PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
Dimensions of Societal Planning in Commonism
StefanMz
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
community health nursing question paper 2.pdf
Prince kumar
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 

Introduction to Microcontrollers

  • 1. By P. Venkata Sai Vamsi, 3rd Year EE, B.Tech, IIT Indore. ELECTRONICS CLUB, IIT INDORE
  • 2. Outline • • • • • • • Introduction Block Diagrams Classifications in Microcontrollers (Atmega 32A) Integration of Keyboard with the Microcontroller Integration of LCD Display with the Microcontroller CID CALCULATOR Programming
  • 3. Introduction (Source – Wikipedia) Microprocessor:- The microprocessor is a multipurpose programmable device that accepts digital data as input, processes it according to instructions stored in its memory, and provides results as output. 8085 MICROPROCESSOR
  • 4. Microcontroller:- is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Example:Microcontroller based Microwave Peripherals:- is a device that is connected to a host computer, but not an integral part of it. It expands the host's capabilities but does not form part of the core computer architecture. It is often, but not always, partially or completely dependent on the host.
  • 5. There are three different types of peripherals: I. Input devices (mouse, keyboards, etc.) II. Output devices (monitors, printers, etc.) III. Storage devices (hard drives, flash drives, etc.) Examples:- 4x4 Keypad 16x2 LCD Display
  • 6. Microprocessor Block Diagram Ex:- Keyboard MICROPROCESSOR
  • 8. Classifications in Microcontrollers (ATMEGA 32A) • Ports:- PORT A, PORT B, PORT C, PORT D Each port consists of 8 pins, to transfer 8 bit data between the Microcontroller and the Peripheral devices. These ports can acts as both input/output ports. • Interrupts:- INT 0, INT 1 interrupt is a signal to the processor emitted by hardware or software indicating an event that needs immediate attention. The processor responds by suspending its current activities, saving its state, and executing a small program called an interrupt handler (or interrupt service routine, ISR) to deal with the event. This interruption is temporary, and after the interrupt handler finishes, the processor resumes execution of the previous thread.
  • 9. Edge triggered interrupt:- An edge-triggered interrupt is an interrupt signaled by a level transition on the interrupt line, either a falling edge (high to low) or a rising edge (low to high). ***For more details in using Interrupts contact me [email protected] Active Low and Active High:- If any port is activated by giving low (0) input, then it is called as Active Low and vice versa. Ex:- Reset is active low
  • 10. • ATMEGA 32A Pin Configuration Back
  • 11. Integration of Keyboard with the Microcontroller
  • 12. Key Board Integration (4x4 Keyboard) Switches Here I connected the keyboard to PortB. Any port will solve the purpose.
  • 15. By following the above procedure, we can get the row no of the key pressed. Question:- How we will find the column no of the key pressed?
  • 16. By following the above procedure, we can get the ‘row no’ of the key pressed. Question:- How we will find the ‘column no’ of the key pressed? Answer:- By setting the value of each column to ‘1’ (one at a time), we can observe the change in the state of the row 1 for the corresponding change in the state of column 1 (here we pressed the 1st key). *****This is the end of the keyboard integration*****
  • 17. Integration of LCD Display with the Microcontroller Why do we prefer LCD Display to 16/17 segment ALPHA Numeric Display? Reasons:1. Length of the display - In 16x2 LCD Display unit, we can display up to the 32 characters. Whereas, in 16/17 segment ALPHA Numeric Display we require, 32 display units to display the same. 2. Ease of use – Predefined libraries are available for the LCD Display.
  • 18. Integration of LCD Display with the Microcontroller Connections with Atmega 32A
  • 19. Procedure Add the predefined libraries to your project folder and initialize the LCD subsystem using a call to LCDInit(LS_BLINK|LS_ULINE). To write any text call LCDWriteString("Welcome"); To write any number call void LCDWriteInt(int val,unsigned int field_length); This will print a integer contained in “val”. The field length is the length of field in which the number is printed. Example:- LCDWriteInt(3,4); will print as follows
  • 20. Question:- Can any one guess what happens if we write LCDWriteInt(123,5); ?
  • 21. Question:- Can any one guess what happens if we write LCDWriteInt(123,5); ? Answer:-
  • 22. Next function - void LCDGotoXY(uint8_t x,uint8_t y); Here, uint8_t represents unsigned integer which is 8bit. So, the maximum number it can store = 2^8-1 = 255. LCDGotoXY(11,1); This function changes the cursor position to the given X,Y coordinates.
  • 23. LCD Display panel, will retain the previously displayed value. It won’t clear it. Well, does anyone wonder how to clear the display then? Here comes the use of another important function LCDClear(); This will clears the display and reset’s the default cursor position to (0,0). Next function - LCDWriteStringXY(x,y,msg); With this function, user can display the message at his desired coordinates.
  • 24. For Example:LCDWriteStringXY(3,0,”hello”); LCDWriteStringXY(8,1,”world”); Similarly there is a function for integers. LCDWriteIntXY(x,y,num,field_length); *****This is the end of the LCD Display integration*****
  • 25. FLUXUS 2014 CID CALCULATOR FEB 7th 2014 Basic components required:1. ATMEGA 32A Microcontroller 2. Display unit ( I suggest you to use 16x2 LCD Display unit) 3. 4x4 Keyboard(No restriction with the size) 4. Connecting Wires 5. Circuit Board 6. Battery 7. *HD74LS08 IC (AND Gate) 8. **Programmer *Depends on whether you are going to use interrupts or not. **We do possess one USB Programmer, which can be used for programming. Bread boards, Soldering wire and Soldering irons are available with our electronics club.
  • 26. How to start??? I think this is the big question in your mind!!!
  • 27. Steps to complete the CID CALCULATOR:- 1. 2. 3. 4. Finish off the connections part. Start programming the microcontroller. Implement your own ideas. Test the functionalities of your design. That’s it!!!
  • 29. How to Connect?? Connection’s part is already covered!!!
  • 30. Programming Software used: Atmel Studio 6.1 Size: Around 900MB (This can be downloaded directly from the atmel website) Language: ‘Embedded C’ There is no much difference between ‘embedded c’ and ‘c’.
  • 31. How to connect the Programmer ISP- In System Programming If you remember the pin configuration of ATMEGA 32A MOSI - Pin 6 MISO - Pin 7 SCK - Pin 8 RESET - Pin 9 VCC - Pin 10 GND - Pin 11
  • 32. Sample Program Atmel Studio 6.1 To Blink an LED:#define F_CPU 8000000UL //Setting the clock frequency for using delay #include<avr/io.h> #include<avr/interrupt.h> // For Interrupts #include<util/delay.h> // For Delay function int main(void) { DDRD = 0xFF; //setting Port D as output port while(1) //to run the loop continuously { PORTD = 0XFF; //giving high (1) as output to the port D _delay_ms(1000); //giving delay PORTD = 0x00; //giving low (0) as output to the port D _delay_ms(1000); //giving delay }}