Basics

20
Basic s You must be knowing about Digital Integrated Circuits (ICs) right ? For example 7404: Hex Inverter 7408: Quad 2-input AND gate 7410: Triple 3-input NAND Gate 7432: Quad 2-input OR Gate

description

Basics. You must be knowing about Digital Integrated Circuits (ICs) right ? For example 7404 : Hex Inverter 7408 : Quad 2-input AND gate 7410 : Triple 3-input NAND Gate 7432 : Quad 2-input OR Gate. Basics…. - PowerPoint PPT Presentation

Transcript of Basics

BasicsYou must be knowing about Digital Integrated Circuits (ICs) right ? For

example7404: Hex Inverter7408: Quad 2-input AND gate7410: Triple 3-input NAND Gate7432: Quad 2-input OR Gate

? Suppose you wish to make a circuit to ON/OFF your room light automatically depending on the intensity of light in your room.

What items are required….a) Light intensity sensor (LDR).b) A comparator (a circuit of Opamp).c) Reference voltage.d) Digital gates.e) And lots of calibration will be required.

Basics…

This circuit is going to be quite complicated .? What if , I say you have to completely automate your home…only by using discrete circuits (??????). Here comes the role of

Microcontroller/Microprocessor.Just by writing few lines of code you can do all the stuffs asked earlier.

Basics…..

An embedded system is a computer system with a dedicated function .

Embedded systems contain processing cores that are either microcontrollers, or digital signal processors (DSP).

Examples - Watches, DVD player, Air conditioner, Washing Machine , Video games,

Mobile phones etc.

What is embedded system?

It is an integrated circuit with certain no of pins that you can make any pin as output or input. Also you can change the function of that pin by programming the IC using your computer .

That’s what the most basic function of a microcontroller is. It has set of pins called as PORT and you can make any pin either as output or input.

Microcontrollers

After configuring pins you can program it to perform according to any function table you want.

You can change the configuration or the function table as many times as you wants. (Flexible)

Microcontrollers

There are many Semiconductor Companies which manufactures microcontrollers. Some of them are

Intel Atmel (Atmega series) Microchip Motorola

Microcontrollers

ATMEGA 32/16 Few of the imp features of ATMEGA 32/16

are.. 32 Programmable I/O Lines. 32K/16K Bytes of In-System Self-

Programmable Flash Memory. 8-channel, 10-bit ADC .

Microcontroller

Code vision AVR. Atmel studio. Eclipse. Proteus (Simulator).

Here we will be using code vision AVR for programming.

softwares

DDRX – Data direction register PORTX – Port X data register. PINX – Data read register.

If a pin is set to be input, then by setting its corresponding bit in PORTX register will make it as follows, Set bit 0 ---> Tri-Stated Set bit 1 ---> Pull Up Delay.h , delay_ms(value);

Instructions

lcd_clear() lcd_gotoxy(x,y) lcd_putchar(char c) lcd_putchar(‘H’) lcd_putsf(constant string)

lcd_putsf(“MNNIT”) lcd_puts(char arr) itoa(int val, char arr[])

LCD Instructions

Write a program to glow a LED using Atmega 32.

Now blink the LED with 100ms delay. Make a Pattern.

Basic Led program

? Print “Hello”. ? Blink “Hello” pattern. ? Print “Hello Friends

Welcome to Embedded Class”? Print Moving Name.

Alphanumeric LCD interface

What is ADC ? Reading ADC PORT. Control some functions based on ADC.

ADC interface

If a pin is set to be input, then by setting its corresponding bit in PORTX register will make it as follows,

Set bit 0 ---> Tri-Stated Set bit 1 ---> Pull Up

Tristated means the input will hang (no specific value) if no input voltage is specified on that pin.

Pull Up means input will go to +5V if no input voltage is given on that pin. It is basically connecting PIN to +5V through a 10K Ohm resistance.

How to set a pin to high impedance.

How it looks like

Interfacing of 4 wire resistive Touchpad.

Internal Structure

Locating Coordinates

Graphical Lcd interface 1 ) print name. 2 ) print pictures. 3 ) make animation.