



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Lab; Professor: Mason; Class: Microprocessors & Digital Sys; Subject: Electrical & Computer Egr; University: Michigan State University; Term: Spring 2009;
Typology: Lab Reports
1 / 7
This page cannot be seen from the preview
Don't miss anything!




Construct a functional interface between the 68HC12 MCU and an external EPROM. To between
The 27512 is a 512kbit (64K x 8) EPROM. Read through the data sheet to become familiar with the information available so you can refer to it as needed. This 64k-byte EPROM has 16 address bits. In this lab, you will only need to access addresses $FF00 and $FF1F (32 locations) using only 6 address signals from the MCU. You will need to determine how to wire the EPROM address signals to the appropriate MCU address pins and hardwired ground (0V) or power (5V) connections. You will also need to study the rest of the pins on the EPROM and determine the proper signal values for each input. Be sure to connect power and ground to the EPROM also.
ASCII Codes & MON12 OUTA Utility The American Standard Code for Information Interchange (ASCII) specifies a correspondence between digital bit patterns and character symbols including 52 upper/lower case alphabetic characters, 10 numerical digits, and special graphic symbols. Each 7-bit ASCII code represents a character symbol, with codes 0-31 reserved for control codes. For example, 1000001 = 65 10 = 41 16 represents āAā. A complete list can be found at en.wikipedia.org/wiki/ASCII. Using ASCII codes, a text string can be represented by a series of coded bytes. Note that character codes sent to the LCD display are also represented in ASCII.
The MON12 monitor program installs a variety of utility subroutines which can be accessed between $FF10 and FF67 (see MON12 Manual). One of these utilities is called OUTA and can be accessed by jumping to the subroutine at $FF4F. This subroutine will display the ASCII character represented by the value stored in accA. You will call this subroutine within your program to display ASCII codes read from the EPROM. Notice, your program will not know what āOUTAā is, so youāll need to equate it to the address $FF4F.
Memory Interface Rather than using the expanded mode of operation for the 68HC12, an interface to external memory can be constructed using general purpose I/O ports. In this lab, Port A will be used as the 8-bit data bus, which for this lab will serve as an input port, receiving data from the external EPROM. 6 bits of Port K will be used as the address bus, to output to the EPROM the address that will be read.
Hardware and Connection Information The EPROM will be inserted into the protoboard area on the AXM-0295 project board. To connect EPROM pins to the microcontroller, wires must be connected to wiring āheadersā (connection points) on the project boards. Port A can be connected to through the BUS-PORT on the CML12S- DP256 development board. Port K is connected to the project board through the big ribbon cable (where it is wired to the LEDs & other components) and can be accessed through the AUX1 and AUX2 ports on the AXM-0295 project board. Diagrams of these wiring headers are given below.
MCU Registers The relevant MCU registers for this lab are: $0000 Port A data register $0002 Port A data direction register $0032 Port K data register $0033 Port K data direction register
Wire Connection Header Pin Descriptions
Header Pin
PortA Pin 2 PA 3 PA 4 PA 5 PA 6 PA 7 PA 8 PA 10 PA
Most of the information you need to complete this project is contained in the Background section. Here are a few additional important notes.
Based on your wiring diagram from the Prelab, insert the EPROM into the protoboard on the project board and wire it correctly. Do not forget to connect the EPROM to power and ground, either from the power supply or from the AUX1-PORT.
By default, the CML12S-DP256 development board uses and external ājumperā that sets the 68HCS12 in an expanded operating mode. This permits the board to access external RAM at addresses $4000 to $7FFF. To use Port A as a general purpose I/O port, this hardware setting must be changed by completing the following steps.
Making this change will means the external RAM is not available, so you can not store any code between $4000 and $7FFF.
At the end of this lab you will need to replace the MEM_EN jumper (with the power off) to return the development board to its default configuration.
Testing:
As explained in the Lab Report Guide , you should address these discussion points in a designated section of your report.