Implementing a Rudimentary Oscilloscope

Similar documents
Introduction to Mechatronics. Fall Instructor: Professor Charles Ume. Analog to Digital Converter

Experiment # 4 Counters and Logic Analyzer

Assignment 3: 68HC11 Beep Lab

Microcontrollers and Interfacing week 7 exercises

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM

ECE 2274 Pre-Lab for Experiment Timer Chip

QUICK START GUIDE FOR DEMONSTRATION CIRCUIT /12/14 BIT 10 TO 105 MSPS ADC

AD9884A Evaluation Kit Documentation

University of Illinois at Urbana-Champaign

Laboratory 8. Digital Circuits - Counter and LED Display

CSE 352 Laboratory Assignment 3

Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift Register. Fall 2017

Oscilloscope Guide Tektronix TDS3034B & TDS3052B

nc... Freescale Semiconductor, I

Digital Circuits I and II Nov. 17, 1999

The 9S12 A/D converter Huang Section ATD_10B8C Block User Guide

QUICK START GUIDE FOR DEMONSTRATION CIRCUIT /12/14 BIT 10 TO 65 MSPS DUAL ADC

Laboratory 11. Required Components: Objectives. Introduction. Digital Displays and Logic (modified from lab text by Alciatore)

ADC Peripheral in Microcontrollers. Petr Cesak, Jan Fischer, Jaroslav Roztocil

Amplification. Most common signal conditioning

2 MHz Lock-In Amplifier

Design and Implementation of an AHB VGA Peripheral

ME EN 363 ELEMENTARY INSTRUMENTATION Lab: Basic Lab Instruments and Data Acquisition

ELECTRICAL ENGINEERING DEPARTMENT California Polytechnic State University

TV Character Generator

PHYS 3322 Modern Laboratory Methods I Digital Devices

INTRODUCTION (EE2499_Introduction.doc revised 1/1/18)

Experiment 8 Fall 2012

4 x 1 S-Video Switch with Audio and Serial Control

Working with a Tektronix TDS 3012B Oscilloscope EE 310: ELECTRONIC CIRCUIT DESIGN I

Scan. This is a sample of the first 15 pages of the Scan chapter.

Lab 1 Introduction to the Software Development Environment and Signal Sampling

N3ZI Digital Dial Manual For kit with Serial LCD Rev 3.04 Aug 2012

RX40_V1_0 Measurement Report F.Faccio

LABORATORY # 1 LAB MANUAL. Digital Signals

IT T35 Digital system desigm y - ii /s - iii

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

Table of Contents Introduction

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

Tutorial Introduction

PRELIMINARY INFORMATION. Professional Signal Generation and Monitoring Options for RIFEforLIFE Research Equipment

EEM Digital Systems II

Module 4: Traffic Signal Design Lesson 1: Traffic Signal (Arduino) Control System Laboratory Exercise Grade 6-8

Lab experience 1: Introduction to LabView

EE 367 Lab Part 1: Sequential Logic

MIE 402: WORKSHOP ON DATA ACQUISITION AND SIGNAL PROCESSING Spring 2003

Chapter 9 MSI Logic Circuits

SignalTap Plus System Analyzer

Integration of Virtual Instrumentation into a Compressed Electricity and Electronic Curriculum

Analog-to-Digital Converter

ECE 372 Microcontroller Design

University of Victoria. Department of Electrical and Computer Engineering. CENG 290 Digital Design I Lab Manual

successive approximation register (SAR) Q digital estimate

Operating Instructions

Checkpoint 2 Video Interface

Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10

V6118 EM MICROELECTRONIC - MARIN SA. 2, 4 and 8 Mutiplex LCD Driver

EECS145M 2000 Midterm #1 Page 1 Derenzo

Re: ENSC 370 Project Physiological Signal Data Logger Functional Specifications

PicoScope 4000 Automotive PC Oscilloscopes

Laboratory 7. Lab 7. Digital Circuits - Logic and Latching

EECS 140 Laboratory Exercise 7 PLD Programming

RF4432 wireless transceiver module

EXPERIMENT #6 DIGITAL BASICS

TV Synchronism Generation with PIC Microcontroller

VOB - data over Video Overlay Box

Digital Signal Processing Laboratory 7: IIR Notch Filters Using the TMS320C6711

LAB #6 State Machine, Decoder, Buffer/Driver and Seven Segment Display

EMS DATA ACQUISITION AND MANAGEMENT (LVDAM-EMS) MODEL 9062-C

Experiment 2: Sampling and Quantization

Oscilloscopes, logic analyzers ScopeLogicDAQ

Bell. Program of Study. Accelerated Digital Electronics. Dave Bell TJHSST

PicoScope 6407 Digitizer

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH

Debugging Digital Cameras: Detecting Redundant Pixels

Introduction: Overview. EECE 2510 Circuits and Signals: Biomedical Applications. ECG Circuit 2 Analog Filtering and A/D Conversion

University of Utah Electrical & Computer Engineering Department ECE1050/1060 Oscilloscope

Troubleshooting Analog to Digital Converter Offset using a Mixed Signal Oscilloscope APPLICATION NOTE

Electrical and Electronic Laboratory Faculty of Engineering Chulalongkorn University. Cathode-Ray Oscilloscope (CRO)

AES-402 Automatic Digital Audio Switcher/DA/Digital to Analog Converter

PicoScope 2000 Series PC Oscilloscopes

SPI Serial Communication and Nokia 5110 LCD Screen

NEW MEXICO STATE UNIVERSITY Electrical and Computer Engineering Department. EE162 Digital Circuit Design Fall Lab 5: Latches & Flip-Flops

Evaluation Board for CS4954/55

Specifications. End-Point Linearity - ±5% F.S., when used with HACO SCR-speed control

The Micropython Microcontroller

MAX2660/MAX2661/MAX2663/MAX2671 Evaluation Kits

Analog-to-Digital Conversion (Part 2) Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

AES-404 Digital Audio Switcher/DA/Digital to Analog Converter

EECS150 - Digital Design Lecture 2 - CMOS

LX3V-4AD User manual Website: Technical Support: Skype: Phone: QQ Group: Technical forum:

SWITCH: Microcontroller Touch-switch Design & Test (Part 2)

Manual Supplement. This supplement contains information necessary to ensure the accuracy of the above manual.

Experiment 7 Fall 2012

DVM-3000 Series 12 Bit DIGITAL VIDEO, AUDIO and 8 CHANNEL BI-DIRECTIONAL DATA FIBER OPTIC MULTIPLEXER for SURVEILLANCE and TRANSPORTATION

S op o e p C on o t n rol o s L arni n n i g n g O bj b e j ctiv i e v s

EET 1131 Lab #12 - Page 1 Revised 8/10/2018

AC334A. VGA-Video Ultimate BLACK BOX Remote Control. Back Panel View. Side View MOUSE DC IN BLACK BOX ZOOM/FREEZE POWER

THDB_ADA. High-Speed A/D and D/A Development Kit

LCD Direct Drive Using HPC

Transcription:

EE-3306 HC6811 Lab #4 Implementing a Rudimentary Oscilloscope Objectives The purpose of this lab is to become familiar with the 68HC11 on chip Analog-to-Digital converter. This lab builds on the knowledge gained from previous labs to send characters and numbers to the LCD display. In part 1 of the lab, DC input voltages in 0V - +5V range are converted and displayed. In part 2, you will implement an oscilloscope using the 4 lines of the LCD to display DC and very low frequency input signals. Turn-In Requirements: 1. Pages 2, 3, 4, 5 and answers to the 5 questions as specified in the lab policies handout. References 1. Motorola, Inc, M68HC11 E Series Programming Reference Guide, (MC68HC11ERG/AD). 2. Motorola, Inc, MC68HC11E Family Technical Data, MC6811E/D-Rev 3, 2000. 3. Motorola, Inc, Buffalo Monitor for HC11 Development Boards. 4. Axiom Manufacturing, CME11E9-EVBU Development Board, 1999. Equipment for this lab: 68HC11 trainer kit, to include 68HC11 EVBU and prototyping strips. IBM compatible PC to connect to the trainer kit via an RS-232 serial cable. Agilent 33250A signal generator. Agilent 54621D oscilloscope. EE3306 Michigan Tech Department of Electrical and Computer Engineering Lab 4 p.1

*In completing this lab, I have abstained from any form of academic dishonesty or deception (e.g. cheating, lying, stealing or plagiarism). This work is entirely of my own origin (beyond the code that was supplied to me by the instructor). Name: Signature: Laboratory Exercise Notes Make sure your development EVBU board is connected to power (green LED on board ON) and the serial port of the EVBU is connected to the serial port of your development PC containing the AXIDE software, configured to the correct port at the correct baud rate, etc. Copy the file oscilloscope.rtf from the EE3301 Resources web site to your floppy disk and modify. The lab TA has a copy of the oscilloscope program and you can request a demo. Part 1 In this part, you will program the A/D converter to read inputs PE0 PE3 and output the result to the LCD display. The 68HC11 A/D system is an 8 bit successive approximation converter with an input multiplexer. The A/D converter requires two reference voltages, V RL and V RH, and on the Axiom board, they are connected to 0V and +5V, respectively. A conversion requires 32-E clock cycles to complete. Before you can use the A/D converter, it must be configured by writing the appropriate values to the two control registers OPTIONS and ADCTL. The OPTIONS register has a bit to turn the power on to the A/D converter and another bit to select the clock input to the converter. Since the clock frequency of the Axiom board is 8MHz, you can choose the E-clock as the source for the A/D converter. The ADCTL register selects the mode of operation, channel control, and channel selection. It also contains a flag (bit) to indicate the end of the conversion and the results of the conversions are in registers ADR1 ADR4. You are going to connect an external signal to the A/D converter and display the voltages on the LCD screen. Negative inputs and large inputs driving too much current can damage the A/D converter inputs. Therefore, use the following circuit to protect the inputs from negative voltages and excessive current. Make sure your input signal is positive and doesn t exceed +5V. Your TA MUST verify inputs signals before you can connect to the A/D inputs. Use the Agilent 33250A signal generator as the external source. To generate DC voltages, push the Utility button and then select DC on form the display. Make sure the output is in the high impedance state by pushing the Utility button and then selecting Output Setup, High Z and Done from the display. If the output is in 50Ω mode, the actual output will be twice the value indicated by the signal generator. Input Signal 1 KΩ 1N4001 A/D Pin Figure 1: Protective Circuit Program the A/D to convert the channels PE0 PE3 once with results being stored in registers ADR1 ADR3. Fill in the required bits in the OPTIONS and ADCTL registers shown below. EE3306 Michigan Tech Department of Electrical and Computer Engineering Lab 4 p.2

OPTIONS $1039 ADPU CSEL IRQE DLY CME - CR1 CR0 X X X X X X ADCTL $1030 CCF - SCAN MULT CD CC CB CA X X Modify the given program (oscilloscope.rtf) to continuously digitize and display the input channels PE0 PE3 in the following format. PE0 A/D = aaa = mmmm mv PE1 A/D = aaa = mmmm mv PE2 A/D = aaa = mmmm mv PE3 A/D = aaa = mmmm mv aaa is the A/D reading and mmmm is the corresponding voltage in mv. Compute the input voltage (mmmm) form the A/D reading (aaa) for display. Note that A/D produces 00 10 for 0 V input and 255 10 for +5V input. Apply a DC signal from the Agilent 33250A function generator to each of the inputs PE0 PE3, one at a time, and demonstrate to the lab TA that your program is working. Fill in the columns for the A/D reading and the displayed voltage in the following table for the given input signals. SIGNAL GENERATOR READING 200 mv 1250 mv 2000 mv 3500 mv 4500 mv A/D READING DISPLAYED VOLTAGE Part 2 In this part you will display the input signal applied to one of the A/D inputs in the form of a bar graph to form a rudimentary oscilloscope. Program the A/D converter for continuous conversion of PE0 input channel. Fill in the bits of the ADCTL register shown below. ADCTL $1030 CCF - SCAN MULT CD CC CB CA X X The following (inefficient) algorithm is suggested for your program. However, you are free to use any other algorithm. EE3306 Michigan Tech Department of Electrical and Computer Engineering Lab 4 p.3

Allocate 4 memory locations to store 4 consecutive A/D conversion results. Let these locations be AD1, AD2, AD3 and AD4. Step 1: Read a new A/D conversion result. Copy the content of location AD2 to AD1, AD3 to AD2, AD4 to AD3 and copy the new A/D reading into location AD4. Note that the content of location AD1 is lost. Display the value of location AD1 AD4 to LCD display line 1 line 4. Use a properly scaled bar to display each A/D reading. See the note below. Go back to step 1. Note: The length of the bar is proportional to the A/D reading. A +5V input should fill the 20 characters in a line. Use the character black block ($ff) to construct the bar. The rest of the line should be filled with spaces. For example, +2.5V DC should produce a display similar to the following. The snapshot of the LCD for a ramp input should look like the following: Add a suitable delay between printing each line, so that the shape of the waveform is captured. If the display is updated too fast or too slow, you may not be able to see the shape of the input signal. Do the following: 1. Apply a DC signal, and adjust the voltage from 0V +5V. Your program should display a bar graph proportional to the magnitude of the input. Demonstrate to the T. A. that you program is running. 2. Generate a 0.5Hz, +1V +4V square waveform and apply it to input PE0. You can use the Agilent 54621D oscilloscope to monitor the input waveform. Verify that the program is displaying the input waveform correctly. You may have to vary the frequency to get a good display. Demonstrate to the T. A. that you program is running. 3. Generate a 0.5Hz, +1V +4V 50% triangular waveform and apply it to input PE0. You can use the Agilent 54621D oscilloscope to monitor the input waveform. Verify that the program is displaying the input waveform correctly. You may have to vary the frequency to get a good display. Demonstrate to the T. A. that you program is running. EE3306 Michigan Tech Department of Electrical and Computer Engineering Lab 4 p.4

Do the Following to document your program (Note: comments, structure, and readability counts!!!) 1. Sketch the waveform you observed on LCD in parts 2 and 3 above. One sketch for each waveform is sufficient. 2. Hand-in a complete Flowcharts and the entire program for parts 1 and 2. 3. Hand in the listing of the complete, well-commented source-code that matches the flowchart. Remember, if the TA can not read your code with reasonable effort, then it is wrong! When you turn in the lab report, please answer the following questions. Provide flow charts and/or assembly language programs as necessary to explain your answers. Questions 1. Why is the 68HC11 A/D converter called a successive approximation converter? How many external inputs can be connected to it? 2. If a 0 - +5V signal is applied to (i) 8 bit A/D converter (ii)12 bit A/D converter (iii)16 bit A/D converter what are the smallest voltage step sizes that can be detected? 3. Which bit selects the clock source for the A/D converter? What is the reason for switching to an RC oscillator if the system clock frequency is too low. What are the disadvantages of using the RC oscillator? 4. In part 1, there are discrepancies between the signal generator reading and the displayed voltage. What are the possible sources of error? 5. The algorithm of part 2 to implement the oscilloscope is very inefficient if the number of LCD lines is large. Why is it inefficient? Give an efficient algorithm. Hint: think of the display as a window of a circular buffer. EE3306 Michigan Tech Department of Electrical and Computer Engineering Lab 4 p.5