Embedded System Design Laboratory October 11, 2002Stanford University - EE281 Lecture #4#1 Lecture #4 Outline Announcements Project Proposal AVR Processor.

Slides:



Advertisements
Similar presentations
Mark Neil - Microprocessor Course 1 Device Drivers – Digital Voltmeter.
Advertisements

MC68HC11 System Overview. System block diagram (A8 version)
Kuliah Mikrokontroler AVR Comparator AVR Eru©September 2009 PENS.
Analog/Digital Subsystem
Analog Comparator Positive input chooses bet. PB2 and Bandgap Reference. Negative input chooses bet. PB3 and the 8 inputs of the A/D. ACME= Analog Comparator.
Oscilloscope Watch Teardown. Agenda History and General overview Hardware design: – Block diagram and general overview – Choice of the microcontroller.
1 Lab2: A/D Converter. 2 This circuit connects a variable voltage to an A/D port on the AVR mcu. Your software running on the AVR mcu will read the digital.
Analog to Digital Converters (ADC)
Mark Neil - Microprocessor Course 1 Timers and Interrupts.
ECE200 – Computer Organization Chapter 8 – Interfacing Processors and Peripherals.
HT46 A/D Type MCU Series Data Memory (Byte) Program Memory HT46R22 (OTP) HT46C22 (Mask) 2Kx Kx16 4Kx HT46R23 (OTP) HT46C23 (Mask) HT46R24.
16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 29: Microcontroller intro.
1 ECE 263 Embedded System Design Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System.
ASPPRATECH.
BLDC MOTOR SPEED CONTROL USING EMBEDDED PROCESSOR
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Programming 8-bit PIC Microcontrollers in C Martin Bates Elsevier 2008.
Embedded System Design Laboratory September 27, 2002Stanford University - EE281 Lecture #1 Lecture #1 Outline Welcome Back AVR Hardware –Pins and Ports.
AVR Microcontrollers.
LSU 06/04/2007Expanding the BASIC Stamp1 Expanding the BASIC Stamp: Useful peripherals Programming Unit, Lecture 6.
1 SERIAL PORT INTERFACE FOR MICROCONTROLLER EMBEDDED INTO INTEGRATED POWER METER Mr. Borisav Jovanović, Prof.dr Predrag Petković, Prof.dr. Milunka Damnjanović,
A Few Words From Dilbert
AT91 Embedded Peripherals
Digital to Analogue Converter
ELE2MIC Lecture 21 The AVR Sleep Modes ATMEGA128’s Analog to Digital Converter –Features –Block Diagram –Clock Source –Input Sources –Interrupts –BandGap.
Embedded System Design Laboratory October 4, 2002Stanford University - EE281 Lecture #3#1 Lecture #3 Outline Announcements AVR Processor Resources –UART.
Microcontroller Presented by Hasnain Heickal (07), Sabbir Ahmed(08) and Zakia Afroze Abedin(19)
بسمه تعالي AVR Microcontrollers. The ATmega8 Basic Features -1.
ELE22MIC Lecture 18 The AVR Sleep Modes The ATMEGA128’s Timer System
MICROCONTROLLER SYSTEMS Part 1. Figure 1.1Elements of a digital controller CPU Central Processing Unit Input Peripherals Output Peripherals ROM Read Only.
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
Chapter 2 Introducing the PIC Mid-Range Family and the 16F84A The aims of this chapter are to introduce: The PIC mid-range family, in overview The overall.
MCS51 - lecture 6. Lecture 6 1/32 Extending MCS51 system Built-in peripherals MCS51 family.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Suleyman Demirel University CSS340 Microprocessor Systems – Lecture 2 ATMEGA328P ARCHITECTURE ANALOG INPUTS.
The Silicon Laboratories C8051F020
TI MSP430 MICROCONTROLLERS BY ADITYA PATHAK. THE MSP FAMILY Ultra-low power; mixed signal processors Widely used in battery operated applications Uses.
智慧電子應用設計導論(1/3) Arduino MEGA 2560
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.
Features of the PIC18 microcontroller - 8-bit CPU - 2 MB program memory space (internal 32KB to 128KB) bytes to 1KB of data EEPROM - Up to 4096 bytes.
ECE 371 Microprocessor Interfacing
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an introduction to the peripheral functions.
Analog to Digital Converter (ADC)
Analog to Digital Conversion - ADC Mark Neil - Microprocessor Course 1 Device Drivers – Measuring Voltages.
Computer Operating Properly Module MTT COMPUTER OPERATING PROPERLY MODULE (COP)
Components of a typical full-featured microcontroller.
AVR Architecture Prepared By: Avdhesh Soni ( ) Sarthak Patel ( ) Akshay Parekh ( ) Fenil Sachla ( ) Guided.
GROUP MEMBERS: SUMEET HOODA. RAJDEEP PATRE. DHIRAJ GAONKAR. LIVE HUMAN DETECTION USING WIRELESS REMOTE CONTROLLED ROBOT.
Criteria for choosing a microcontroller A microcontroller must meet the task at hand efficiency and cost effectively. Speed. What is highest speed of.
DEPARTMENT OF ELECTRONICS ENGINEERING V-SEMESTER MICROPROCESSOR & MICROCONTROLLER 1 CHAPTER NO microcontroller & programming.
Sensing Algorithm using IR Sensor and ADC Soong-sil University. Robotics 기 정 두 원.
By: Shivanshi pandya(30) Ayushi chourasia (3) Pranavi chhikniwala(6)
CEng3361 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2011 Recitation 06.
C. K. Pithawalla College of Engineering and Technology, Surat
AVR ATMEGA 8 MICRO-CONTROLLER
Analog Comparator An analog comparator is available on pins PE2(AIN0), PE3(AIN1) The comparator operates like any other comparator. -when (+) exceeds (-)
Microprocessor Systems Design I
UNIT – Microcontroller.
ADC,DAC and sensor interface
Atmega32 Serial Programming Basics
The Arduino Microcontroller: Atmel AVR Atmega 328
Introduction to Microprocessors and Microcontrollers
Lecturer: Reza Arjmandi Autumn 2015
AVR – ATmega103(ATMEL) Architecture & Summary
8051 Micro Controller.
EECE.3170 Microprocessor Systems Design I
Compiled by Dr. N.Shanmugasundaram, HOD, ECE Dept, SECE.
Device Drivers – Digital Voltmeter
ADC and DAC Data Converter
Presentation transcript:

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

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

Embedded System Design Laboratory October 11, 2002Stanford 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

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

Embedded System Design Laboratory October 11, 2002Stanford 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)

Embedded System Design Laboratory October 11, 2002Stanford University - EE281 Lecture #4#6 Mega163/323 Architecture 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 (Mega323 doubles ROM/RAM/EEPROM memories)

Embedded System Design Laboratory October 11, 2002Stanford 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 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

Embedded System Design Laboratory October 11, 2002Stanford 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

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

Embedded System Design Laboratory October 11, 2002Stanford 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  (Resolution = VREF/256) 0-VREF  9 bits  (Resolution = VREF/512) 0-VREF  10-bits  (Resolution = VREF/1024) Example: VREF = 2.56V Conv. output = 120 Voltage in was (120/256)*VREF = 1.2V

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

Embedded System Design Laboratory October 11, 2002Stanford 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

Embedded System Design Laboratory October 11, 2002Stanford 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 KHz 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