
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: Bazuin; Class: Microcontroller Applications; Subject: Electrical & Computer Engineer; University: Western Michigan University; Term: Unknown 1989;
Typology: Lab Reports
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Interface an 8-bit bar-LED unit to the parallel I/O port as specified in your Prelab Assignment. Write a C program that will configure the port for output and will send alternating data to the port at the highest data transfer rate possible. Check the waveform and timing of the port signals by a logic analyzer and make screen shots for your lab report. The scale of the plot should be clearly indicated (e.g., 10ns/unit). You are to determine the maximum data transfer rate [in KByte/s] at which your program can send data to the port. In order to achieve that set up a suitable program loop.
i. You are now to add one 8-bit input port to the system using the parallel I/O Port as specified in your Prelab Assignment. The input data will be provided using an 8-bit DIP- Switch unit. The output data will be displayed on the bar-LED unit. Develop a C program that reads the status of the DIP-switches through the input port, and then copies it to the output port for verification. Verify the correct operation by single-stepping your code.
ii. Next develop a C program that reads the status of the DIP-switches, carries out the task described in the Prelab Assignment, and then displays the results on the output port.
Develop a C program to display a visible bit pattern on the LEDs as given in your Prelab, or determined by your Lab TA. Keep each bit pattern on for a time period specified in your Prelab, or determined by your Lab TA. Employ a software delay between each data item that is sent to the port. The required timing should be achieved by embedding an assembly code module in your C program.
Demonstrate these programs to your Lab TA. All programs should be documented by screen shots and/or C source code and assembly list files, as appropriate. All list files should be commented on for full credit.
Note: Save your circuit for the next Lab.