0% found this document useful (0 votes)
266 views

AVR Microcontroller

The document discusses microcontrollers and embedded systems. It defines a microcontroller as a microprocessor system built on a single integrated circuit that combines a CPU core, memory, input/output ports, and peripherals. This allows for low-cost and simplified design of embedded systems to perform dedicated functions. AVR microcontrollers are described as a common 8-bit RISC architecture with on-chip flash memory used for program storage. Specific features of the Atmega8 microcontroller are outlined, including its ports, pins, and peripherals like timers and analog-to-digital converters.

Uploaded by

Naveen Pandey
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
266 views

AVR Microcontroller

The document discusses microcontrollers and embedded systems. It defines a microcontroller as a microprocessor system built on a single integrated circuit that combines a CPU core, memory, input/output ports, and peripherals. This allows for low-cost and simplified design of embedded systems to perform dedicated functions. AVR microcontrollers are described as a common 8-bit RISC architecture with on-chip flash memory used for program storage. Specific features of the Atmega8 microcontroller are outlined, including its ports, pins, and peripherals like timers and analog-to-digital converters.

Uploaded by

Naveen Pandey
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 16

Microcontrollers

RoboCamp `09
Embedded Systems
 An embedded system is a special-purpose computer system designed to perform
one or a few dedicated functions.
 In contrast, a general-purpose computer, such as a personal computer, can do
many different tasks depending on programming.
 A wide variety of the electronic devices we use today come under embedded
systems.
 From a simple toy car ,traffic lights to cell phones but of different complexity.
 Since the embedded system is dedicated to specific tasks, design engineers can
optimize it, reducing the size and cost of the product, or increasing the reliability
and performance.
 Hence the Microcontroller.
Why Microcontrollers?
 A microcontroller is a complete
microprocessor system built on a
single IC.
 Microcontrollers were developed to
meet a need for microprocessors to be
put into low cost products.
 Building a complete microprocessor
system on a single chip substantially
reduces the cost of building simple
products, which use the
microprocessor's power to implement
their function.
 By reducing the size and cost
compared to a design that uses a
separate microprocessor, memory, and
input/output devices, microcontrollers
make it economical to digitally control
even more devices and processes.
Microcontroller
 So a microcontroller combines onto the same microchip :
 The CPU core
 Memory (both ROM and RAM)
 Some parallel digital I/O
 Peripherals like ADC ,SPI etc

 The Microcontroller is a simple microprocessor which just acts like a computer


doing what it is programmed to do.

The program is stored in the Flash memory.
Blocks of a Microcontroller
 CPU core
 This is the processing unit which executes the program.
 Flash Memory
 The place where the program is stored. This is read by the CPU core and executes each
instruction.
 Non-volatile (remains even after device power off)
 SRAM
 RAM used by the CPU to store temporary variables.
 Volatile
 EEPROM
 ROM for storing finished results or data for future use.
 Non-volatile
 I/O ports
 Digital ports used for input/output to control leds etc
 Peripherals
 ADC
 Timers
AVR Microcontrollers

8 –bit

RISC

Mixed Harvard

architecture

•One of the first


microcontroller
families to use
on-chip flash
memory for
program storage,
as opposed to
one time
programmable
ROM.
Atmega8
 16K Bytes of In-System Self-programmable Flash program memory
 512 Bytes EEPROM
 1K Byte Internal SRAM
 Operating voltages 3.3v-5.5v
 Internal calibrated oscillator 1,2,4,8Mhz
 Two 8 bit Timers/ Counters
 One 16 bit timer/ counter
 10 bit ADC
 Analog Comparator
 Two wire interface (I2C bus)
 Connects to external devices that talk through this bus, for eg SRF-04 sonar rangers
 SPI serial interface
 A serial protocol/ standard for talking to external devices, developed by Motorola. Analog
devices’ accelerometers use this interface
 Programmable serial USART
Pin-out
 Reset( idealy high, pull to low to
reset)
 ADC[0-5] ADC input
 Vcc, Gnd power
 Avcc, Aref ADC
Hardware Requirements
 USB programmer
 Used to transfer program from the computer to the microcontroller using USB port
 Power Supply
 Through a 5v regulator
 Simple connectors
 Push button
 Leds,resistance,capacitors
Basic I/O port configuration
 Use I/O ports, to write values to port pins and read values from them.
 Glowing LED or activating/enabling external circuits by writing a high or low to
them.
 Readings states from sensors.
Ports and Port Pins
 4 I/O ports: Port A, B, C, D also denoted as PA, PB,
PC, PD
 Each port has 8 lines that can be independently set as
H/L
 Each of the 8 lines can be configured independently as
an input or an output pin
 The above feature is called True Read Modify Write
Functionality
 Pin drivers are strong enough to drive LEDs directly
 All pins have voltage invariant internal pull up resistors
 Each of them can be individually pulled up as H/L
Registers Associated With Ports
 Each port is associated with 3
registers: The data registers
(PORTa), the data direction
register (DDRa) and the Input
pin register (PINa)

 Each port pin, PA3 for eg, is


associated with 3 pins: DDa3,
PORTa3, PINa3

 While programming the


letters are capped.
Example
Peripheral Programming
 Important Registers to be considered while using peripherals
 Control register
 Used to specify mode of operation, control interrupts
 Status register
 Contains interrupt flags and other flags indicating state of operation
 Data register
 Contains end data,finished results
ADC
 10 bit successive approximation ADC
 Reference voltage provided by
 AVcc pin = Vcc or 5v
 AREF = external voltage reference pin
 2.56 V (internal reference)
 Runs in Single Conversion Mode or Free Running Mode

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy