Lab_7 - ECE 331 Spring 2009 Lab 7: Subroutines, Timing...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 331 Spring 2009 p. 1 Lab 7: Subroutines, Timing Loops and Parallel I/O Protocols Summary: Develop assembly language programs involving subroutines, delay loops, and use of microcontroller I/O and test them using evaluation board hardware. Learning Objectives: Gain experience with assembly programming using subroutines and timing loops Learn hardware and software protocols of standard port I/O Understand practical use of microcontroller stack and I/O ports Resources and Supplies: CML12S-DP256 development board PC with text editor, 68HC12 assembler, and MON12 monitor program CML12S-DP256 MON12 Manual Important Reminders: It is your responsibility to save the programs you create. Pre-lab assignments must be completed before coming to the lab. Background: Microcontroller User Interface Hardware Overview The ECE331 lab HC12 microcontroller user interface hardware consists of two main components, a CML12S-DP256 development board and an AXM-0295 project development board. The CML12S- DP256 development board contains a 9S12DP256B microcontroller, which has a HC12 core and peripheral memory and I/O devices. The AXM-0295 project development board is multi-function user interface board with elements such as a liquid crystal display (LCD), LEDs, seven segment display, 40bit DIP toggle switch, 4x4 keyboard pushbutton matrix, etc. The two main boards are joined together by a couple of ribbon cables that connect I/O signals from the project board to/from microcontroller I/O signals on the development board. Using the user interface elements on the project board requires knowing what microcontroller ports they are connected to so software can be written to interact with these interface elements. It would be overwhelming to cover all of these connects at once, so they will be introduced as needed for each lab assignment. In this lab, you will interface with the LEDs, seven segment display, and 4-bit DIP input switches. The information necessary to access these devices with microcontroller software is given below. The project and development boards have a number of ‘headers’, connectors where wires can be inserted to access signals or where jumpers can be inserted to connect signals. For this lab, all of the signals that need to be connected between the project board and development board are contained within the ribbon cable between the boards. Thus, you will be able to access all hardware features of the project board, including the DIP switches (Part 2) through the microcontroller. Loop Delays From class you know how to calculate the time required to execute assembly instructions, including loops and nested loops. The same calculation procedure can be used to determine the execution time of delay subroutines. The table of HC12 assembly instructions lists the clock cycles require for each instruction. To calculate the delay in units of time, you also need to know that the 68HC12 of the CML12S-DP256 development board operates at a clock frequency of 8 MHz .
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

Lab_7 - ECE 331 Spring 2009 Lab 7: Subroutines, Timing...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online