Basics of ATmega32

18
Basics of ATMega32 MCU Nima Ghaedsharafi 1

Transcript of Basics of ATmega32

Page 1: Basics of ATmega32

Basics of ATMega32

MCUNima Ghaedsharafi

1

Page 2: Basics of ATmega32

Key Features• High-performance

• Low-power

• 8-bit Microcontroller

• RISC Architecture

• 32Kbytes of In-System Self-programmable

• JTAG Interface

• 32 Programmable I/O Lines

• True Read-While-Write Operation

• Up to 16 MIPS Throughput

2

Page 3: Basics of ATmega32

DIP Mode

3

Page 4: Basics of ATmega32

MLF Mode

4

Page 5: Basics of ATmega32

Block Diagram

5

Page 6: Basics of ATmega32

Block Diagram Cont.

6

Page 7: Basics of ATmega32

Ports

7

Page 8: Basics of ATmega32

Ports• 8-bit bi-directional I/O port

• True Read-Modify-Write (digital I/O)

• internal pull-up resistors

• used as inputs and are externally pulled low

• tri-stated when a reset condition becomes active

8

Page 9: Basics of ATmega32

Same Same But Different PortA

• Analog input

• A/D Converter

9

Page 10: Basics of ATmega32

Same Same But Different PortB

10

Page 11: Basics of ATmega32

Same Same But Different PortC

11

Page 12: Basics of ATmega32

Same Same But Different PortD

12

Page 13: Basics of ATmega32

Reset• low level ( Negative Logic)

• longer than the minimum pulse length

13

Page 14: Basics of ATmega32

AVCC• supply voltage pin for Port A and the A/D Converter

• externally to VCC, even ADC is not used

• connected to VCC through a low-pass filter

14

Page 15: Basics of ATmega32

AREF• analog reference pin for the A/D Converter

15

Page 16: Basics of ATmega32

XTAL1 and XTAL2• input and output respectively,

• On-chip Oscillator

• Either a quartz crystal or a

ceramic resonator

• CKOPT is Programmedo full rail-to-rail swing

o Good For very Noisy Env

• CKOPT is Unprogrammedo Smaller output swing

o Reduces power consumption

• resonators, maximum Frequency o Ckopt Unprogrammed 8MHz

o Ckopt Programmed 16MHz

16

Page 17: Basics of ATmega32

Tools• Compiler : WinAVR/AVR Studio/CodeVision AVR

• Programmer Hardwareo Simple parallel/serial port based In System Programmer (ISP)

o USB based ISP (recommended) : USBasp

• Bread board, wires, power supply, crystal, etc.

17

Page 18: Basics of ATmega32

Any Question?!

18

(Of Course not)