SEVEN SEGMENT DISPLAY LAB EXPERIMENT

Similar documents
POTENTIOMETER. Revision Class. Instructor / Professor LICENSE

PUSH BUTTON. Revision Class. Instructor / Professor LICENSE

TEMPERATURE SENSOR. Revision Class. Instructor / Professor LICENSE

Axiom Manufacturing. Users Manual. for PROJECT DEVELOPMENT BOARD AXM xiom anufacturing

Introduction to Microcontrollers

Using the stack and the stack pointer

Programming the CME11E9-EVBU, Keypad, and LCD

CME11E9-EVBU Development Board

Programming the CME11E9-EVBU, Keypad, and LCD

Developing HC11 systems for RAM memory areas:

Ryerson University Department of Electrical and Computer Engineering ELE 538 Microprocessor Systems Final Examination December 8, 2003

ME4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 7

Programming the Motorola MC68HC11 Microcontroller

CMS-8GP32. A Motorola MC68HC908GP32 Microcontroller Board. xiom anufacturing

Teaching and Curriculum Development of Microprocessor Classes

Sample Problem Set #1

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

Example Programs for 6502 Microprocessor Kit

ECE 367 -Experiment #1 Fall 2012

ECE 270 Lab Verification / Evaluation Form. Experiment 1

Decimal, Hexadecimal and Binary Numbers Writing an assembly language program

Lab 8: Debugging Embedded Devices and Software

Chapter 4: Advanced Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh

ME 6405 Introduction to Mechatronics

INTERFACING THE ADS7870 AND THE MC68HC11E9 ANALOG TO MICROCOMPUTER MADE EASY

Introduction to Microcontrollers II

Input/Output Ports and Interfacing

CMD711-EX Development Board

AN Kbyte Addressing with the M68HC11. Overview

Go Gators! Relax! May the Schwartz be with you!

Test ROM V2 for MPU boards System 3, 4, 6, 7 and corresponding driver boards. Author: André Boot corrections in this document by coinop

; export symbols ; export 'Entry' symbol. ; include derivative specific macros PORTA EQU $0000 PORTB EQU $0001 DDRA EQU $0002 DDRB EQU $0003

Lecture 9 Subroutines

Prototype Control Board for an Automated Bar (Robotic Bar Monkey)

Introduction to Programming

68HC11 Opera,ng Modes

Timing Generation and Measurements

AN1060. Motorola Semiconductor Application Note. M68HC11 Bootstrap Mode By Jim Sibigtroth, Mike Rhoades, and John Langan Austin, Texas.

Introduction to Microcontrollers II

68HC12 Training Lab Student Exercise Book

LABORATORY MANUAL Interfacing LCD 16x2, Keypad 4x4 and 7Segment Display to PIC18F4580

Finite State Machine Lab

Homework 12 Solutions

R1, R2, R3 3 R4, R5, R6 3. Maxim Integrated Products 1

Computer Organization I. Lecture 28: Architecture of M68HC11

AN-HK-32. In-Circuit Programming of FLASH Memory in the MC68HC908GP32. nc... Freescale Semiconductor, I. PART 1 Introduction

GEORGIA INSTITUTE OF TECHNOLOGY School of Electrical and Computer Engineering ECE 2020 Fall 2017 Lab #1: Digital Logic Module

EE 5340/7340 Motorola 68HC11 Microcontroler Lecture 1. Carlos E. Davila, Electrical Engineering Dept. Southern Methodist University

ECE 3120 Lab 1 Code Entry, Assembly, and Execution

Laboratory 1 Introduction to the Arduino boards

2) [ 2 marks] Both of the following statements cause the value $0300 to be stored in location $1000, but at different times. Explain the difference.

EXPERIMENT 4: Parallel Input/Output. Objectives Introduction to the Parallel Input/Output (I/O) Familiarization to Interfacing

Workshop on Digital Circuit Design in FPGA

ECE 3610 MICROPROCESSING SYSTEMS

Introduction to Microcontrollers III

ECE 372 Microcontroller Design Assembly Programming Arrays. ECE 372 Microcontroller Design Assembly Programming Arrays

Cross Assembly and Program Development

LED Knight Rider. Yanbu College of Applied Technology. Project Description

ECE331 Handout 3- ASM Instructions, Address Modes and Directives

Mark II Aiken Relay Calculator

Jordan University of Science and Technology Electrical Engineering Department Microcontrollers and Embedded Systems Spring 2011

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING. Principles of Computer Operation

Exam 1 Feb. 23, 25, 27?

ASSIGNMENT 3: PLAYING WITH THE 68HC11. Due Wednesday, Oct 9, 2002

Introduction to Microcontrollers III

Lab 2 Part 1 Assembly Language Programming and 9S12 Ports

MC68HC12 Parallel I/O

Introduction to Programming the 9S12 in C Huang Sections 5.2 and 5.3. You will be able to use all of the Motorola data manuals on the exam.

Lab 0: Wire Wrapping Project: Counter Board

Lecture 6 Assembly Programming: Branch & Iteration

CMPEN 472 Sample EXAM II

Touch Control Switch + - R6 R4 R8 R7 CAT# Grading. Assembly Instructions by Earl D. Gates SUNY Oswego Fall Conference 2007.

University of Florida EEL 4744 Fall 1998 Dr. Eric M. Schwartz

Propeller Activity Board (#32910)

ECET Chapter 2, Part 3 of 3

CodeWarrior. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

Laboratory 10. Programming a PIC Microcontroller - Part II

EE 231 Fall EE 231 Lab 3

Y = (A + C) (A + B) (B + C)

Programming Book for 6809 Microprocessor Kit

; export symbols XDEF Entry ; export 'Entry' symbol ABSENTRY Entry ; for assembly entry point

Lab 7: Asynchronous Serial I/O

Chapter 2: HCS12 Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh

INTRODUCTION HARDWARE INTERFACE

Total: EEL 3701 Digital Logic & Computer Systems Final Exam Fall Semester 2007 COVER SHEET: Re-Grade Information: 1 (10) 2 (10) 3 (10) 4 (14) 5 (14)

ECE3120: Computer Systems Chapter 7: Interfacing I/O Devices Lab-Class

ECE 362 Experiment 4: Interrupts

ARM HOW-TO GUIDE Interfacing 7SEG with LPC2148 ARM

Design of Embedded Systems Using WHYP

LECTURE #21: G-CPU & Assembly Code EEL 3701: Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz

CET335 Microprocessor Interfacing Lab 5: LCD Interface (Bus Attached Peripheral)

PIC Dev 14 Through hole PCB Assembly and Test Lab 1

538 Lecture Notes Week 1

4X4 Driver Shield Manual

Serial Communication Through an Asynchronous FIFO Buffer

ECE 4510/5530 Microcontroller Applications Chapter 7

Hardware Manual - SM2251 Evaluation Kit Board

Freescale Semiconductor, Inc.

Table 1: Mnemonics Operations Dictionary. Add Accumulators Add B to Y. Add with carry to B. Add Memory to B. Add 16-bit to D And B with Memory

ECE 3610 MICROPROCESSING SYSTEMS AN ENCRYPTED ASCII CODE DECODER

Transcription:

SEVEN SEGMENT DISPLAY LAB EXPERIMENT Class Instructor / Professor xiom anufacturing 1999 2813 Industrial Ln. Garland, TX 75041 (972) 926-9303 FAX (972) 926-6063 support@axman.com Rev 1.01 web: http://www.axman.com

CONTENTS 1 GETTING STARTED...3 1.1 INTRODUCTION... 3 1.2 SOFTWARE... 3 1.3 SUPPORT SOFTWARE... 3 1.4 HARDWARE... 3 2.0 Visual...3 3.0 Theory...4 4.0 Procedure...4 4.1 DESCRIPTION... 4 4.2 DETAILED STEPS... 4 4.3 CONCLUSION... 5 5.0 Seven Segment Program...6 5.1 PROGRAM DESCRIPTION... 6 5.2 RUNNING SEVEN SEGMENT PROGRAM... 6 5.3 SEVEN SEGMENT SOURCE... 6 6.0 Quiz...7 7.0 TROUBLESHOOTING...8 8.0 Tips and Suggestions...8 1 GETTING STARTED The following section has been designed to help users to quickly learn proper setup and operation of the lab experiment. 2

1.1 Introduction The experiment requires a single board development system that is fully assembled and fully functional from Axiom Manufacturing. Development boards CME11E9 are supported in this experiment. The system comes complete with parts, schematic and instructions. All software, drawings, and manuals are contained on the CD. 1.2 Software The CD comes with AxIDE, which is an integrated development environment designed exclusively for use with Axiom development boards, providing an interface to programs running on these boards. AxIDE also makes uploading programs and easy via the COM port. Read your board manual for setting up AxIDE. 1.3 Support Software There are many useful programs on the included CD that can make developing projects easier. The CD also contains example software programs for this experiment on each board.. You can also download the latest software free from our web site at: http://www.axman.com. 1.4 Hardware 2.0 Visual The following hardware is required: Axiom CME11E9 EVBU Development Kit Windows based PC Seven Segment Lab Kit Devices used in this lab are static sensitive and are easy damaged by mishandling. Use caution when installing wires and devices on the breadboard to prevent the bending of leads. Experiments should be laid out in a orderly fashion. Start your lab time with the bench clean and free of metal objects. Leave the lab area in a clean condition by picking up loose parts, wires and small objects. 3.0 Theory 3

Axiom s development board is designed for quickly and effectively learning the basics of microcontrollers. This lab will walk the student though the steps of using the development board for its intended purpose, controlling devices. A seven segment display is one device that is controllable by a microcontroller. In this lab one display is used for the experiment. A seven segment display a group of seven LEDS arranged in segments. These segments display numbers 0 thru 9. The port on the microcontroller will output a group of 4 bits. These four bits are in the form of bcd. They are applied to the seven segment driver. Depending on the number, the driver will light up the proper segments for displaying the number. All the LED s in the display are common anode. By connecting the common anode to +5 and using a current limiting resistor on the cathode side, the driver is able to turn each segment on. Segment intensity is depended on the current flow and should not exceed the limit of the segment. Displays are good indicators for appliances, machinery, cars, clocks & alarms plus many others. They come in several colors such as red and green. 4.0 Procedure The procedure is arranged in a series of steps. Each step is to be completed before moving on to the next step. As each step is built on prior steps, the student s will increase their knowledge for other labs or self-study. The student should go though the steps as many times as necessary to master the subject. As an aid in keeping track of location, the check box next to each step should be checked as completed. 4.1 Description You will be using PORT C on the HC11E9 microcontroller. In single chip mode, PORT C is a input/output port. Bits 0,1,2,3 are used as the 4 bit bcd number. This port is located at address $1003 on the HC11. Writing directly to this port will apply a number to the seven segment driver. Writing $00 will display a 0 and writing $09 will display a 9. Before using PORTC, the data direction register must be initialized. Writing $0F to address $1007 (DDRC) sets bits 0,1,2,3 as outputs. First steps guide you though the process of setting up port for use. Next steps shows how to display different digits. 4.2 Detailed Steps Note in the following steps: PORTC refers to address $1003 DDRC refers to address $1007 Verify power is not applied to EVBU. Install seven segment display, driver IC and resistor array on the breadboard area per drawing. 4

Install ModA jumper. Disable ModB jumper. Disable MEM_EN jumper. This will configure EVBU for single chip operation. Apply power to the EVBU. Write $0F to DDRC. This forces bits 0,1,2,3 of port C as outputs. Write $00 to PORTC. verify display is a 0. This forces all outputs low, thus representing a zero in bcd. Write $01 to PORTC, verify display is a 1. This forces PORTC bit 0,1,2,3 to a $01, thus representing a one in bcd. Write $02 to PORTC, verify display is a 2. This forces PORTC bit 0,1,,3,4 to a $02, thus representing a two in bcd. Write the following hex values in order: $03,$04,$05,$06,$07,$08,$09 to PORTC, verify each number is displayed 3, 4, 5, 6, 7, 8, 9. This forces PORTC bit 0,1,2,3 into representing the bcd value of numbers we are displaying. Write $0F to PORTC, verify display is blank. This forces PORTC bit 0,1,,3,4 to a $0F, thus representing a invalid decimal number and no number is displayed. 4.3 Conclusion These simple steps showed how easy a display can be added on a microcontroller. Just one digit was used here. But other ways are available for adding multi digits. A four digit bank can be used by multiplexing the digits or using one of the many chips available on the market. These chips have all of the necessary parts inside for driving several digits or even LEDS. A clock would required a least four digits and six digits with seconds. A temp monitor would require three digits on those hot days of 113 F. 5.0 Seven Segment Program 5.1 Program Description First the program must setup port C as outputs. The program first clears register A. Register A is written to PORTC. This displays the digit 0. Digit 0 will remain on the 5

display for the length of the delay subroutine. Next register A is increment by one. The new value of A is checked if it is greater then 9. If so, then the program starts over at the beginning. Otherwise the next digit is written to PORTC. Digits 0 thru 9 are displayed first, then program starts over at the beginning. 5.2 Running Seven Segment Program Load program SevenSeg.s19 into Evbu. This program is located at $0100, which is internal memory. The source is show below. Without pressing any keys on keypad, call 0100 <enter> on Evbu terminal. The seven segment display will cycle thru digits 0 to 9 then repeat forever. Press and hold key 1 on keypad. Enter call 0100 <enter> on Evbu terminal. The register dump shows register A is equal to $01 and register B contains $04. 5.3 Seven Segment Source * Example Seven Segment * File = SevenSeg * Register Equates PORTC equ $1003 * port C output register DDRC equ $1007 * port C direction register * This subroutine counts up on the seven segment display * Loop1 Loop2 * Delay Delay: org $0100 ldaa #$0F * all outputs staa DDRC * on port C clra * clear register A staa PORTC * write digit to port C bsr Delay * delay for visual inca * increment A cmpa #$0A * if greater then 9 beq Loop1 * restart with digit 0 bra Loop2 * display next digit 6

DelayA: ldy #$FFFF dey bne DelayA rts * return 6.0 Quiz Question One What is the largest digit that can be displayed? A. 5 C. 10 B. F D. 9 Question Two How many bits are required for one digit? A. 8 C. 4 B. 16 D. 9 Question Three How many segments in the display? A. 5 C. 10 B. 7 D. 9 Question Three Which digit has the most segments lit? A. 0 C. B B. 5 D. 8 Question Four What controls the segments of the display? A. Digit driver C. Segment driver B. HC11 D. PORTB 7

Question Five All the LEDS in the display are? A. Common drive C. Forward B. Common Cathode D. Common Anode Bonus Question What controls the intensity of the segments? A. Resistors C. Segment driver B. Digit D. Microcontroller 7.0 TROUBLESHOOTING The development system is fully tested and operational before shipping. If it fails to function properly, consult the troubleshooting section of your user manual. 8.0 Tips and Suggestions Following are a number of tips, suggestions and answers to common questions that will solve most problems users have with the CME11E9 development system. You can download the latest software from the Support section of our web page at: www.axman.com 8

9

GND 1 10 +5 MAN6960 D.P.. 5 6 1 16 Resistor Array 8 1 16 74LS47N 8 9 10