Lecture #4 Outline. Announcements Project Proposal. AVR Processor Resources

Similar documents
Module 13: Interfacing ADC. Introduction ADC Programming DAC Programming Sensor Interfacing

DASL 120 Introduction to Microcontrollers

Microcontroller: Timers, ADC

EE 308 Lab Spring 2009

A Beginners Guide to AVR

Roland Kammerer. 13. October 2010

EE 109 Midterm Review

EE 308 Spring S12 SUBSYSTEMS: PULSE WIDTH MODULATION, A/D CONVERTER, AND SYNCHRONOUS SERIAN INTERFACE

THE PERFORMANCE TEST OF THE AD CONVERTERS EMBEDDED ON SOME MICROCONTROLLERS

8-bit Microcontroller with 1K Bytes Flash. ATtiny15. Advance Information. Features. Description. Pin Configurations

e-automatic MOTOR CONTROL SYSTEM

PIC Functionality. General I/O Dedicated Interrupt Change State Interrupt Input Capture Output Compare PWM ADC RS232

EXAMINATION PAPER EMBEDDED SYSTEMS 6EJ005 UNIVERSITY OF DERBY. School of Computing and Technology DATE: SUMMER 2003 TIME ALLOWED: 2 HOURS

ELCT 912: Advanced Embedded Systems

Analog Digital Converter

EXERCISE 4: A Simple Hi-Fi

MICROCONTROLLER TUTORIAL II TIMERS

EE 308: Microcontrollers

uc Crash Course Whats is covered in this lecture Joshua Childs Joshua Hartman A. A. Arroyo 9/7/10

MICROPROCESSORS A (17.383) Fall Lecture Outline

Oct 30 Announcements. Bonus marked will be posted today Will provide 270 style feedback on multiple-choice questions. [3.E]-1

Controlling DC Brush Motor using MD10B or MD30B. Version 1.2. Aug Cytron Technologies Sdn. Bhd.

Hardware and software resources on the AVR family for the microcontroller project

8-bit Microcontroller with 8K Bytes In-System Programmable Flash. ATmega8535 ATmega8535L

Grundlagen Microcontroller Counter/Timer. Günther Gridling Bettina Weiss

8-bit with 8K Bytes In-System Programmable Flash. ATmega8 ATmega8L. Preliminary

Introduction to Using the PIC16F877 Justin Rice IMDL Spring 2002

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATmega16 ATmega16L. Preliminary

8-bit Microcontroller with 32K Bytes In-System Programmable Flash. ATmega32 ATmega32L

8-bit with 8K Bytes In-System Programmable Flash. ATmega8* ATmega8L*

Successive approximation (capacitive coupling amplifier)

EE251: Thursday October 25

Hashemite University Faculty of Engineering Mechatronics Engineering Department. Microprocessors and Microcontrollers Laboratory

Microcontroller Systems. ELET 3232 Topic 21: ADC Basics

νµθωερτψυιοπασδφγηϕκλζξχϖβνµθωερτ ψυιοπασδφγηϕκλζξχϖβνµθωερτψυιοπα σδφγηϕκλζξχϖβνµθωερτψυιοπασδφγηϕκ χϖβνµθωερτψυιοπασδφγηϕκλζξχϖβνµθ

Hardware Platforms and Sensors

8-bit Microcontroller with 32K Bytes In-System Programmable Flash

EE 308 Apr. 24, 2002 Review for Final Exam

8-bit Atmel Microcontroller with In-System Programmable Flash. ATmega329/V ATmega3290/V ATmega649/V ATmega6490/V

3.3V regulator. JA H-bridge. Doc: page 1 of 7

Lab Exercise 6: Digital/Analog conversion

International Journal of Advances in Science and Technology (IJAST)

Real Time Embedded Systems. Lecture 1 January 17, 2012

8-bit Microcontroller with 128K Bytes In-System Programmable Flash. ATmega128A

Activity 4: Due before the lab during the week of Feb

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATmega169V ATmega169. Rev A to E

CS/ECE/EEE/INSTR F241 MICROPROCESSOR PROGRAMMING & INTERFACING MODULE 8: I/O INTERFACING QUESTIONS ANUPAMA KR BITS, PILANI KK BIRLA GOA CAMPUS

8-bit Microcontroller with 32K Bytes In-System Programmable Flash. ATmega32A

8-bit Microcontroller with 32K Bytes In-System Programmable Flash

8-bit Microcontroller with 128K Bytes In-System Programmable Flash. ATmega128 ATmega128L

8-bit with 8K Bytes In-System Programmable Flash. ATmega8A

Brian Hanna Meteor IP 2007 Microcontroller

8-bit Microcontroller with In-System Programmable Flash. ATmega329/V ATmega3290/V ATmega649/V ATmega6490/V. Preliminary

Course Introduction. Content 20 pages 3 questions. Learning Time 30 minutes

32-bit ARM Cortex-M0, Cortex-M3 and Cortex-M4F microcontrollers

DEVELOPMENT OF REAL TIME DIGITAL CONTROLLER FOR A LIQUID LEVEL SYSTEM USING ATMEGA32 MICROCONTROLLER

Exercise 3: Sound volume robot

Designing with STM32F3x

Training Schedule. Robotic System Design using Arduino Platform

with 128K Bytes 4K Bytes Internal SRAM Up to 64K Bytes Optional External Memory Space

8-bit Microcontroller with 32K/64K/128K Bytes of ISP Flash and CAN Controller AT90CAN32 AT90CAN64 AT90CAN128. Automotive

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATmega169PA. Preliminary

Microprocessor & Interfacing Lecture Programmable Interval Timer

Implementation of Multiquadrant D.C. Drive Using Microcontroller

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATmega165P ATmega165PV. Preliminary

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATmega169P ATmega169PV. Preliminary

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATmega165P ATmega165PV. Preliminary. BDTIC

Hello and welcome to this Renesas Interactive Course that provides an overview of the timers found on RL78 MCUs.

8-bit Microcontroller with 64K Bytes In-System Programmable Flash. ATmega64 ATmega64L. Preliminary. Features

In this lecture, we will look at how different electronic modules communicate with each other. We will consider the following topics:

Topics Introduction to Microprocessors

8-bit Microcontroller with 128K Bytes of ISP Flash and CAN Controller

Motor Control using NXP s LPC2900

I2C Demonstration Board I 2 C-bus Protocol

ECE Senior Design Final Report For. Scalable Regulated Three Phase Power Rectifier. May 10, 2004 Rev. 1.0

Review for Final Exam

Analogue to Digital Conversion on an ATmega168

TMS320F241 DSP Boards for Power-electronics Applications

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATmega169P ATmega169PV. Preliminary

EE 308 Spring 2006 FINAL PROJECT: INTERFACING AND MOTOR CONTROL WEEK 1 PORT EXPANSION FOR THE MC9S12

ME 461 Laboratory #3 Analog-to-Digital Conversion

Review for Final Exam

Chapter 6 PROGRAMMING THE TIMERS

PART 1: DESCRIPTION OF THE DIGITAL CONTROL SYSTEM

EE 314 Spring 2003 Microprocessor Systems

RF4463F30 High Power wireless transceiver module

Application Note: Using the Motor Driver on the 3pi Robot and Orangutan Robot Controllers

Application Manual RV-8803-C7

SNIOT702 Specification. Version number:v 1.0.1

8-bit Microcontroller with 8K Bytes In-System Programmable Flash. ATmega48 ATmega88 ATmega168. Automotive

Embedded Systems and Software. Analog to Digital Conversion

PIC Analog Voltage to PWM Duty Cycle

S3C9442/C9444/F9444/C9452/C9454/F9454

Design and Development of Smart. Harmonic Analyzer

RV-8564 Application Manual. Application Manual. Real-Time Clock Module with I 2 C-Bus Interface. October /62 Rev. 2.1

The University of Texas at Arlington Lecture 10 ADC and DAC

EMBEDDED SYSTEM DESIGN FOR A DIGITAL MULTIMETER USING MOTOROLA HCS12 MICROCONTROLLER

Arbeitskreis Hardware. Prof. Dr. Michael Rohs, Dipl.-Inform. Sven Kratz MHCI Lab, LMU München

RF4432 wireless transceiver module

8-bit Microcontroller with 2K Bytes In-System Programmable Flash. ATtiny2313/V. Preliminary

Transcription:

October 11, 2002 Stanford University - EE281 Lecture #4 #1 Announcements Project Proposal Lecture #4 Outline AVR Processor Resources A/D Converter (Analog to Digital) Analog Comparator Real-Time clock using Timer 2

October 11, 2002 Stanford University - EE281 Lecture #4 #2 Lab#2 in progress Announcements Due date: Monday Oct 14, 5pm Projects Arrange to meet and discuss your ideas Project Proposal: Due Friday Oct 25, 5pm

October 11, 2002 Stanford University - EE281 Lecture #4 #3 Project Proposals 1-2 page proposal including: Name of your project Team members Project description Be sure to cover at least what purpose your project serves, how you expect it to work or how someone will use it, how it will look (use graphics), how the user will interact with the project (inputs and outputs), what features of the AVR processor you intend to use, how you will write your code (asm, C, mixed), and how you will build you project (wire-wrap, perf-board, hand-soldered, case?) List of important parts Should include all major/critical parts or modules List real part numbers, not just descriptions Don t forget to include the AVR processor you intend to use Areas in which you might need help

October 11, 2002 Stanford University - EE281 Lecture #4 #4 Interrupts Timers AVR Processor Resources UART (Universal Asynchronous Receiver/Transmitter) SPI (Serial Peripheral Interface) A/D Converters (Analog to Digital) Analog Comparator

October 11, 2002 Stanford University - EE281 Lecture #4 #5 AVR ATmega163/323 Pinout General Purpose Ports PORTA (A/D conv) PORTB PORTC PORTD (Special Functions) Special Purpose Pins Crystal (XTAL1/XTAL2) Real Time Crystal (TOSC1/2) RESET AREF, AVCC, AGND Power (VCC/GND)

October 11, 2002 Stanford University - EE281 Lecture #4 #6 32 Registers (R0-R31) 8 Kw Prog ROM 1 Kb RAM 512 bytes EEPROM 32 I/O lines 18 Interrupts A/D Converter Timer 2 I 2 C Bus Mega163/323 Architecture (Mega323 doubles ROM/RAM/EEPROM memories)

October 11, 2002 Stanford University - EE281 Lecture #4 #7 A/D Converters An A/D converter converts a sensed analog voltage into a binary value Example: 0-5V might convert to 0-255 binary The mega163/323 A/D converters provide: Successive-Approximation conversion 8 channels (inputs) 8, 9, or 10 bits resolution (1 LSB typical accuracy) 65-260us conversion time Single-conversion or Free-Running mode Conversion Complete Interrupt

October 11, 2002 Stanford University - EE281 Lecture #4 #8 A/D Registers ADCH/ADCL (A/D Result Register) Read the high and low portion of the conversion result from these registers ADCSR (A/D Control and Status Register) A/D Enable bit A/D Start Conversion bit A/D mode select (single conversion or free-run) Set A/D Converter clock rate (prescaler) Interrupt Enable, Mask, and Flag bits ADMUX (A/D Multiplexer Register) Select your input channel (input pin) Select a voltage reference

October 11, 2002 Stanford University - EE281 Lecture #4 #9 A/D Converter Block Diagram

October 11, 2002 Stanford University - EE281 Lecture #4 #10 A/D Ranges and VREF Input ranges and VREF A reference is required to make any measurement VREF is the reference voltage against which A/D inputs are measured (internal 2.56V or external VREF pin) Analog input range of the A/D converters is 0-VREF volts Output ranges The output range is defined by the number of bits the A/D converter produces across its input range 0-VREF 8 bits 0-255 (Resolution = VREF/256) 0-VREF 9 bits 0-512 (Resolution = VREF/512) 0-VREF 10-bits 0-1024 (Resolution = VREF/1024) Example: VREF = 2.56V Conv. output = 120 Voltage in was (120/256)*VREF = 1.2V

October 11, 2002 Stanford University - EE281 Lecture #4 #11 Using the A/D converters With a potentiometer or joystick VREF A/D input With a sensor GND VREF A/D input GND

October 11, 2002 Stanford University - EE281 Lecture #4 #12 Analog Comparator Compares voltages on AIN0 and AIN1 Reports which is greater Can trigger interrupt on: AIN0 > AIN1 AIN0 < AIN1 Both ACSR (Analog Comparator Status Register) Select source of input Enable/Disable interrupt Select interrupt condition

October 11, 2002 Stanford University - EE281 Lecture #4 #13 Real-Time Clock with Timer 2 Mega163/323 includes an extra 8-bit Timer 2 Timer 2 is designed to be able to operate as a Real-Time Clock Connect 32.768KHz crystal between TOSC1/2 Set Timer 2 prescaler to use external crystal as input Set Prescaler division ratio to provide overflow at convenient intervals (like 1Hz) Use the OVFL interrupt service routine to keep track of time in ordinary HH:MM:SS