Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
15
Powered By:
EMBEDDED SYSTEM
APPLICATIONS
Aerospace
APPLICATIONS
Automotive
APPLICATIONS
Communicati
ons
APPLICATIONS
Medical
APPLICATIONS
Personal
APPLICATIONS
Home
Features/Components
MICROCONTROLLER
What Wikipedia says
Formal Definition
Different Microcontrollers
Intel
Motorolla
Microchip
Atmel
STMicroelectronics
Texas Instruments
NXP
Toshiba
Freecscale
Atmel Microcontrollers
ATmega
ATtiny
o Atmega 8
o Atmega 16
o Atmega 32
o Atmega 328
o Atmega 644 etc
ATxmega
ATMEGA 16 : AN OVERVIEW
8-bit Micro-controller
40-pin DIP
Operating Voltages
One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and 8channel, 10-bit ADC
I2C interface
2.7 - 5.5V
Pin Diagram
Architecture
Simplified Diagram
Personal Computer
uP
RAM
HDD
Clock
Ports (Serial/USB)
Ports (Parallel)
Mic /Headphone Jack (ADC/ DAC)
Power Supply Unit (SMPS)
Reset Button
Mother-board
Microcontroller
uP
SRAM
EEPROM & Flash Memory
Clock Unit
SPI / UART Controllers
Digital I/O Ports
ADC
Power Supply Unit
Reset Pin
IC
MICROCONTROLLER PROGRAMMING
Machine Language
Programming
Assembly Language
Programming
High Level Language
OS
WinAVR
Cross-Compiler & linker
PC / Laptop
Target System
(Atmega R&D Board)
PORT PROGRAMMIMG
Normal C program
int x;
float y;
x= 10;
y= 8.97;
PORTA = 27;
// decimal
PORTC= 0b11010110; // binary
DDRx defines whether the port will act as input port or o/p port. Just as int
declares a variable as integer type. It does not assign any value to it.
PORTx assigns the value to be output. If DDRx=0 i.e port is defined as input
port, PORTx will store the value but will not o/p it.
More Examples
PORTA=0x5A ;
PORTA=0b01011010;
PORTA=5;
DDRA=0xFF;
DDRA=0b11110000;
PORTA.0=1;
Taking Input
To take Digital i/p from external world first configure the port as i/p port
using DDRx=0
Use PINx to read the digital value.
x = PINA
y= PINB
y= PINC.6
// as the individual pins are read n the value is digital, therefore x can
CHOCOLATE QUESTION
Solution
#include <avr/io.h>
#include <util/delay.h>
void main( )
{
unsigned int x,y;
DDRD=0xFF;
DDRA=0b01111011;
PORTD=0x33;
x=PINA.2;
y=PINA.7;
}
Serial Port
IC 7805
ADC
Port
Supply
Motor
Port
LCD
Port
Motor
Driver
Reset
Button
+5V
GND
LCD
Port
Motor
Port
ADC
Port
Power
Button
IC 7805
Reset
Button
Adapter
Buzzer
LED BLINKING
HELLO! TO EMBEDDED
WORLD
GND
+V
Complete Code!!
PIN DIAGRAM
PIN DESCRIPTION
MODES OF LCD
LCD DEMO
Contact Us:
www.amuroboclub.in
www.amu.ac.in/rclub.jsp
amuroboclub@gmail.com
fb.com/amuroboculb