Sie sind auf Seite 1von 5

ELECTRICAL ENGINEERING DEPARTMENT POLYTECHNIC OF KUCHING SARAWAK COURSE: E4160 - MICROPROCESSOR AND MICROCONTROLLER SYSTEM I/O INTERFACING IN MC68000

Experiment 4 1.0 2.0 AIM: Enable students to understand the input output process in MC68000. OBJECTIVES: At the end of the session, the students should be able to: a. Demonstrate the capability of a microprocessor to output data b. Output a data to a set of LED array (L1~L8) MATERIAL NEEDED: i. Easy 68K simulator ii. Computer iii. 68K Microprocessor Trainer iv. 68K Microprocessor Application Board THEORY Inroduction The 68K Microprocessor Trainer/Application Board is a general multipurpose experiment based interfacing module aiming to introduce users to microprocessor based digital interfacing and applications. It can be interfaced to a wide range of microprocessor training system. This board integrates several experiment modules into one board and it is able to provide users with a wide range of I/O interfacing experiment such as: Reading input data from switches Output data to LEDs, 7-segment LEDs and etc Analog to digital conversion Digital to analog conversion DC motor control Stepper motor control DOT Matrix LED Temperature control Keypad sensing

3.0

4.0

This board requires a regulated +5VDC/800mA to operate. This board incorporates a build-in fast blow fuse to protect the device component on the Trainer/Application Board from being destroyed due to overloading, short circuit or any incoming power surge that may occur. Interface Connection Ensure that the power to both the trainer and the experiment board is shut off. Connect the application board to the training system is done by using a simple 34-way flex ribbon computer cable. The flex ribbon cable is used to connect from the uP-68K trainers digital I/O port (P3) to the

interface connector on the application board (P1) located the right side of the board. On-Board Setting The setting that needs to be considered are a) I/O Module selector They consist a group of 13 jumper setting located below the DOT MATRIX block. Correct setting of these module selector jumpers will be given for each experiment. Use the given 2-pin mini jumpers to select the required I/O interface module for an appropriate experiment.

Figure 4.1 : I/O Module Interfacing b) Analog selector There are sets of jumper settings located to the left of the module selector. Use the 2-pin mini jumpers to decide the source of the incoming analog signals. They can be set to obtain signal from; i. ADC IN External analog input ii. INT 5V Analogue voltage from the 5V source onboard iii. POT To use the potentiometer to control the input iv. LDR Light Dependent Resistor v. TEMP Temperature sensor.

Figure 4.2 : MC68000 Trainer Memory Mapping 5. EXPERIMENTAL PROCEDURE Part A : Easy69K Simulator 1. Create a new source file and name the file as Exp4a.x68. Rewrite the given program as Figure 4.2.

Figure 4.3 : Exp4a.x68


2.

Assemble the source file to create the S-Record file.

Part B : MC68000 Trainer/Application Board. 1. 2. Setup the trainer and application board. (Module selector : LED O/P) Test the communication between the PC and trainer by using the Hyper Terminal. a. Select Accessories Communications HyperTerminal. b. Check the COM which is being used (COM1, COM2 etc..) c. Set the port by using this setting 9600 data bits per second (the trainer board only operates at this speed!) Data bits: 8 Parity: None Stop bits: 1 Flow Control: Hardware d. Click OK e. Press the RESET button on the trainer and press Space Bar until you get this start up message MONK68K V2.8 SYSTEM READY! Downloading machine code (S-Record File) a. Press the Space Bar (or any key except ENTER key) until you get the PROGRAM CONTROL message b. Press ENTER to enter the sub menu within PROGRAM CONTROL and press the Space Bar to select Download Code? c. Press Enter and then Space Bar two times until you get Received Ready.(Press Reset to abort) d. At the Hyper Terminal windows, click on transfer and select send text file. Locate the S-Record file and double click the file until you get the Done!# message. Executing the program. a. Press the Space Bar (or any key except ENTER key) until you get the PROGRAM CONTROL message b. Press ENTER to enter the sub menu within PROGRAM CONTROL c. Press the Space Bar 2 times until you get Execute Program? message and then press Enter

3.

4.

5.

d. On the Addr> ? message, write down this address 080C00 and then press Enter. e. Observe what is happen to the LED. Repeat step in Part A and Part B for the program in Figure 4.4. (Module selector : LED O/P and Switches)

Figure 4.4 : Exp4b.x68 Part C : Time Delay Control 1. Write a program in Figure 4.5 and run the program using the MC68000 trainer/application Board (Module selector : LED O/P)

Figure 4.5 : Exp4c.x68 DISCUSSION 1. Explain what do you notice in experimental procedure Part A and Part B. (5M) 2. Explain what do you notice in experimental procedure Part C. (5M) 6.0 7.0 QUESTION 1. Develop a program that shows the inverting effects of the input data with the corresponding LED bit, i.e when a switch is set to HIGH, the corresponding LED bit should turns Off (LOW). (10M) 2. Show how the MC68000 define a 1 second delay by referring to exp4c.x68 in Figure 4.5. (5M) CONCLUSION

8.0

(5M)

Das könnte Ihnen auch gefallen