Prelab Assignment for Microcontroller Applications | ECE 4510, Lab Reports of Microcomputers

Material Type: Lab; Professor: Grantner; Class: Microcontroller Applications; Subject: Electrical & Computer Engineer; University: Western Michigan University; Term: Fall 2008;

Typology: Lab Reports

Pre 2010

Uploaded on 07/23/2009

koofers-user-m7v
koofers-user-m7v 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE 4510/5530 MICROCONTROLLER APPLICATIONS
Fall 2008
Prelab Assignment for Lab Four
Port A (PA7…PA0) is designated as output port and Port B (PB7…PB0) as input
port for this lab (a carry over from Lab Three).
Task One
Part i
Your signal input is PA3, and signal output is PB5. Disconnect the DIP-switch
from the input of the buffer chip driving PB5 and hook it up to a TTL-compatible
signal originated from a function generator, instead. Draw a detailed schematic
diagram for Task One. It should include IC part numbers, IC pin numbers and H2
Connector pin numbers, respectively. All signal lines should be labeled. Before you
hook up the function generator output to the input of the buffer chip you should
verify by an oscilloscope that the square wave signal levels are between approx.
0 – 4V. You shouldn’t apply negative voltages, neither voltage levels greater
than 4.8V to the buffer chip! You should also verify that the VOH (output high
voltage) signal level at the output of the buffer chip is at least 4V before your
circuit is connected to the microcomputer board.
Develop a C code module for Part i.
Task Two
Part i
Disconnect the buffer output for the function generator signal from PB5 and hook it
up to IRQ* (PE1), instead. Draw a detailed schematic diagram for Task Two. It
should include IC part numbers, IC pin numbers and H2 Connector pin numbers,
respectively. All signal lines should be labeled.
Develop C code modules for the main program, and the ISR, respectively. The IRQ*
input should be configured to respond to falling edges only. You are to identify the
RAM-based vector location for IRQ* interrupts (refer to the D-BUG12 V.xx
Reference Guide that is posted under the 9S12DP512 Data Sheets Section of the
Class Web Page). For interrupt testing purposes, in the body of the ISR your code
should complement a bit and write it to PM7. If the interrupt works you should be
able to verify it visually, or by a logic analyzer that the PM7 output signal toggles
every time an interrupt request is received.
pf2

Partial preview of the text

Download Prelab Assignment for Microcontroller Applications | ECE 4510 and more Lab Reports Microcomputers in PDF only on Docsity!

ECE 4510/5530 MICROCONTROLLER APPLICATIONS

Fall 2008 Prelab Assignment for Lab Four

Port A (PA7…PA0) is designated as output port and Port B (PB7…PB0) as input port for this lab (a carry over from Lab Three).

Task One Part i

Your signal input is PA3 , and signal output is PB5. Disconnect the DIP-switch from the input of the buffer chip driving PB5 and hook it up to a TTL-compatible signal originated from a function generator, instead. Draw a detailed schematic diagram for Task One. It should include IC part numbers, IC pin numbers and H Connector pin numbers, respectively. All signal lines should be labeled. Before you hook up the function generator output to the input of the buffer chip you should verify by an oscilloscope that the square wave signal levels are between approx. 0 – 4V. You shouldn’t apply negative voltages, neither voltage levels greater than 4.8V to the buffer chip! You should also verify that the VOH (output high voltage) signal level at the output of the buffer chip is at least 4V before your circuit is connected to the microcomputer board.

Develop a C code module for Part i.

Task Two Part i

Disconnect the buffer output for the function generator signal from PB5 and hook it up to IRQ* ( PE1 ), instead. Draw a detailed schematic diagram for Task Two. It should include IC part numbers, IC pin numbers and H2 Connector pin numbers, respectively. All signal lines should be labeled.

Develop C code modules for the main program, and the ISR, respectively. The IRQ* input should be configured to respond to falling edges only. You are to identify the RAM-based vector location for IRQ* interrupts (refer to the D-BUG12 V.xx Reference Guide that is posted under the 9S12DP512 Data Sheets Section of the Class Web Page). For interrupt testing purposes, in the body of the ISR your code should complement a bit and write it to PM7. If the interrupt works you should be able to verify it visually, or by a logic analyzer that the PM7 output signal toggles every time an interrupt request is received.

Part ii.

Modify the body of the ISR such that every time an interrupt is received it increments the contents of a byte in a mod-256 fashion and then sends them out to the output port (PA7 – PA0).

Task Three

Bit 5 of Port A ( PA5 ) is designated for Task Three. Draw a detailed schematic diagram for this task. It should include IC part numbers, IC pin numbers and H Connector pin numbers, respectively. The PA5 signal should be buffered by a suitable chip to drive the transistor circuit. The time to energize the relay should be 270ms and the time to de-energize should be 40ms , respectively.

Task Four

The Flash memory area starts at 0x4000. Instructions on programming your C code to the Flash will be given in the lab (and it is also posted on the Class Web Page). You will also be given the know how to restore the D-Bug12 Monitor program after you have completed Task Four.