Users Guide to the ECE345 MC68HC912B32 Tester
Introduction
The HC12 Tester was designed to allow students to verify that their HC12 board functions properly. The tester works by outputting a high signal to one port and reading that port with three or two other ports. For example, to test port A, a high signal is outputted to each of the pins of port A. Pin 0 through 7 of port B, P, and T are connected to pin 0 through 7 of port A. Port B, P, and T read in the values outputted by port A. If the values read are not all high, then the test program detects an error on port A. Similarly, ports E, S, and DCL are connected to each other and verify each other's functionality.
This web page explains how to set up the HC12 Tester hardware, how to run the tester software, and how to understand the tester's output.
Obtain the HC12 Tester Software
The HC12 Tester is capable of verifying port A, port B, port T, port P, port E port S, port DCL, and the A/D converter. To execute each of these tests you must load your HC12 with a different program. You can download the source code (.asm) and executables (.s19) from table 1.
Table 1: Source and Executable Files used to test each port and the A/D converter.
Setting up the Tester Box
Figure 1: HC12 Tester with HC12 evaluation board in place, serial cable connected, and power cable connected.
Running the HC12 Tester Code
Set Assemble to: F4, S19, OFF, OFF, OFF, HIDE, HIDE Set Communicate to: COMM2 9600 BAUD, N, 8, 1
Understanding the Tester Output
To understand what the tester output means consider the following example that uses ain.s19. The output for each of the programs resembles this example. When ain.s19 was run on a properly functioning board the following output was obtained: Port A to B = OK Port A to P = OK Port A to T = OK
Port A = OK
The output signifies that the 8 pin connection from port A to port B was OK, the 8 pin connection from port A to port P was OK, and the 8 pin connection from port A to port T was OK.
Therefore, Port A is OK.
When ain.s19 was run on a malfunctioning board, the following output was obtained; Port A to B = BAD Port A to P = BAD Port A to T = BAD
Bit 0 = OK Bit 1 = BAD Bit 2 = OK Bit 3 = OK Bit 4 = OK Bit 5 = OK Bit6 = OK Bit 7 = OK
Some of the programs display BitX = N/A. This means that the corresponding bit cannot be tested. For example, the transmit and receive bits on the serial port are N/A, since these pins are being used for communication between the PC and the HC12 chip.
Caution!
Make sure that your HC12 evaluation board is plugged tightly into the HC12 Tester Box. All of the pins must be connected to the Tester Box for the system to work properly.
Also, since the test programs check to make sure that each port is capable of outputting high signals (5 volts), the tester cannot detect when a pin is improperly connected to 5 volts. Future versions of the tester should be able to test for this error by having the test program output and check for a low signal (0 volts) as well as a high signal. Currently the tester will only detect accidental shorts.
|
|