AVR Lecture15

Category: Entertainment

Presentation Description

No description available.


Presentation Transcript

Lecture 15AVR - Summary : 

ENGE 420 – Microprocessors Lecture 15AVR - Summary ENGE420 Microprocessors

AVR Intro : 

ENGE 420 – Microprocessors AVR Intro What is different than the HC11? RISC vs. CISC Harvard vs. Von Neumann separate instruction and data memories What is the same? I/O Ports ADC Timers Interrupts ALU Status Register

General Features : 

ENGE 420 – Microprocessors General Features Instruction Memory Data Memory

Peripheral Features : 

ENGE 420 – Microprocessors Peripheral Features

Other Features : 

ENGE 420 – Microprocessors Other Features

28-Pin Plastic Dual-Inline Package (PDIP) : 

ENGE 420 – Microprocessors 28-Pin Plastic Dual-Inline Package (PDIP) Our 28-pin friend NOTE!!!! GND and VCC are not at the corners, but in the middle. PortB – 8 bits PortC – 7 bits PortD – 8 bits Or, interrupts, A/D converters, SPI interfaces, etc.


ENGE 420 – Microprocessors AVR CPU There are 32, 8-bit general purpose registers. The last 6 can be accessed as 3 2-byte registers (X,Y, and Z). This is different than the X,Y,A,B, and D regs of the HC11. The Program Flash can be used to directly load the SRAM or the Registers (Immediate Mode) The ALU ops affect the Status Registers

Port B : 

ENGE 420 – Microprocessors Port B Internal pull-up resistors can be configured (very nice feature).

Port C : 

ENGE 420 – Microprocessors Port C Port C also has internal, configurable pull-up resistors. Port C pin 6 can alternatively be used as a reset (and can be written to by the internal software).

Port D : 

ENGE 420 – Microprocessors Port D Port D also has internal, configurable pull-up resistors.

Analog Voltages : 

ENGE 420 – Microprocessors Analog Voltages Separate voltage path for analog signals. Take special note of the instructions about hooking it up

Memory Map : 

ENGE 420 – Microprocessors Memory Map The register file can be accessed inherently via instructions, but is also mapped to data addresses $0000 → $001F. The I/O Registers can be accessed at Port address $00 → $3F (using the IN or OUT instruction), or as data addresses $0020 → $005F. Therefore, to place your own variables in the SRAM data space, used address $0060 → $045F.

Control Registers : 

ENGE 420 – Microprocessors Control Registers So, the status register (SREG) exists at Port Address (IN or OUT instructions) 0x3F, but can also be read in from data memory address (0x5F). Note that the SREG has the standard N,V,C, and Z flags, as well as the H flag. There is also the Interrupt bit (I) and a couple more. Note the number of other similar control registers (Timer counters)

Flags : 

ENGE 420 – Microprocessors Flags The more things change …

Instructions : 

ENGE 420 – Microprocessors Instructions Most take one or two clock cycles. Almost are the same size. RISC

Arithmetic Instructions : 

ENGE 420 – Microprocessors Arithmetic Instructions

Branch Instructions : 

ENGE 420 – Microprocessors Branch Instructions

Data Transfer Instructions : 

ENGE 420 – Microprocessors Data Transfer Instructions

Bit and Bit-Test Instructions : 

ENGE 420 – Microprocessors Bit and Bit-Test Instructions

authorStream Live Help