Microcontroller and Embedded systems

agreementkittensSemiconductor

Nov 1, 2013 (4 years and 7 days ago)

910 views

Microcontroller

System Design Using AVR microcontrollers

Fall 2013

What is the difference!?


Logical gates and systems


Microprocessors


Microcontrollers

Logical Systems

Microprocessors

Microcontrollers

Types of microcontrollers

As of 2008 there are several dozen microcontroller architectures and vendors
including:


68HC11


8051


ARM processors using ARM7 or Cortex
-
M3 cores are generally microcontrollers


STMicroelectronics STM8S (8
-
bit), ST10 (16
-
bit) and STM32 (32
-
bit)


Atmel AVR (8
-
bit), AVR32 (32
-
bit), and AT91SAM


Freescale

ColdFire

(32
-
bit) and S08 (8
-
bit)


Hitachi H8, Hitachi
SuperH


Hyperstone

E1/E2


MIPS (32
-
bit PIC32)


NEC V850


PIC (8
-
bit PIC16, PIC18, 16
-
bit dsPIC33 / PIC24)


PowerPC ISE


PSoC

(Programmable System
-
on
-
Chip)


Rabbit 2000


Texas Instruments Microcontrollers MSP430 (16
-
bit), C2000 (32
-
bit), and
Stellaris

(32
-
bit)


Toshiba TLCS
-
870


Zilog

eZ8, eZ80

Why AVR???


Covers many useful peripherals


Wide range


Simple assembly


Simple structures


Many available designs


Personal reasons!!!


And …

Hardware


Software interaction


Microcontroller design


First design required Hardware and peripherals


Now Lets put some intelligence in machine!


Programming language

Assembly Language


It is the Machine language


Highly Flexible


Difficult for beginners in programming


Base level of software design

High level languages


C code for microcontrollers


Compilers


AVR studio


Bascom

AVR


CodeVision





CodeVision

AVR


Supplementary libraries for:


Alphanumeric LCD modules for up to 4x40 characters


Philips I²C Bus


National Semiconductor LM75 Temperature Sensor


Maxim/Dallas Semiconductor DS1621 Thermometer/Thermostat


Philips PCF8563 and PCF8583 Real Time Clocks


Maxim/Dallas Semiconductor DS1302 and DS1307 Real Time Clocks


Maxim/Dallas Semiconductor 1 Wire protocol


Maxim/Dallas Semiconductor DS1820/DS18B20/DS1822 1 Wire Temperature
Sensors


Maxim/Dallas Semiconductor DS2430/DS2433 1 Wire EEPROMs


SPI


MMC/SD/SD HC FLASH Memory Card drivers and FAT12, FAT16, FAT32
access libraries


Power management


Delays


BCD and Gray code conversion

CodeVision

Environment

Am I doing correctly??


First simulate your idea, before spending a lot of
money!

Proteus as simulator


Covers many of the AVR microcontrollers and
many others….


Covers wide range of LCDs


Can simulate electromechanical systems, such as
PM DC motors, Step motors,


Also covers TWI, Serial, One Wire Interface and…

Simulation Environment of Proteus

Atmega

16

Atmega

16 Features


High
-
performance, Low
-
power AVR® 8
-
bit Microcontroller


Advanced RISC Architecture




131 Powerful Instructions


Most Single
-
clock Cycle Execution




32 x 8 General Purpose Working Registers




Fully Static Operation




Up to 16 MIPS Throughput at 16 MHz




On
-
chip 2
-
cycle Multiplier


Nonvolatile Program and Data Memories




16K Bytes of In
-
System Self
-
Programmable Flash

Endurance: 10,000 Write/Erase Cycles




Optional Boot Code Section with Independent Lock
Bits In
-
System
Programming by On
-
chip
Boot
Program True
Read
-
While
-
Write Operation




512 Bytes
EEPROM Endurance
: 100,000 Write/Erase Cycles




1K Byte Internal SRAM




Programming Lock for Software Security


JTAG (IEEE std. 1149.1 Compliant) Interface




Boundary
-
scan Capabilities According to the JTAG Standard




Extensive On
-
chip Debug Support




Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG Interface

Atmega

16 Features (Cont.)


Peripheral Features




Two 8
-
bit Timer/Counters with Separate
Prescalers

and Compare Modes




One 16
-
bit Timer/Counter with Separate
Prescaler
, Compare Mode, and
Capture Mode




Real Time Counter with Separate Oscillator




Four PWM Channels




8
-
channel, 10
-
bit
ADC 8
Single
-
ended Channels



7
Differential Channels in TQFP Package Only



2
Differential Channels with Programmable Gain at 1x, 10x, or 200x




Byte
-
oriented Two
-
wire Serial Interface




Programmable Serial USART




Master/Slave SPI Serial Interface




Programmable Watchdog Timer with Separate On
-
chip Oscillator




On
-
chip Analog Comparator


Special Microcontroller Features




Power
-
on Reset and Programmable Brown
-
out Detection




Internal Calibrated RC Oscillator




External and Internal Interrupt Sources




Six Sleep Modes: Idle, ADC Noise Reduction, Power
-
save, Power
-
down,
Standby and Extended Standby


I/O and Packages




32 Programmable I/O Lines




40
-
pin PDIP, 44
-
lead TQFP, and 44
-
pad MLF


Operating Voltages




2.7
-

5.5V for ATmega16L




4.5
-

5.5V for ATmega16


Speed Grades




0
-

8 MHz for ATmega16L




0
-

16 MHz for ATmega16


Power Consumption @ 1 MHz, 3V, and 25
°
C for ATmega16L




Active: 1.1
mA




Idle Mode: 0.35
mA




Power
-
down Mode: < 1
μ
A

Atmega 16 Features (Cont.)

ATmega16 Pin
-
Config

Softwares

that we need