FIGURE 11. Serial
FIGURE 12. Hyper Terminal setup.
at 0,0. Upon completion, you should be able to type on
the keyboard and have the keyboard characters appear on
the Experimenter LCD module (if one is present).
Congratulations! You have a working PS/2 interface!
Serial RS-232 Port
Let’s continue with our integration for the terminal
application. To connect the Experimenter to a PC, a serial
port is required. The port uses one of the five possible
internal UARTs that are available with the PIC32.
The serial port can drive a PC serial RS-232 port only
when the proper physical interface is made available. As a
reminder, the PIC32 serial port is + 3.3V to 0V out; RS-232
requires a + 12 to - 12 volt communication. The ACRONAME
serial interface connector (
an ideal physical interface and is pretty inexpensive. The
ACRONAME interface is shown in Figure 11.
There are only four connections needed to work with
the Experimenter. They are pins 1 and 2 of Experimenter
54 October 2011
JP2, and + 3.3V and GND pins 2 and 4 (or 5) of
Experimenter JP1. (Note the hook-up diagram in Figure
11.) To facilitate solderless board connection, use two .1”
four-pin headers soldered together at a right angle to
connect the interface to the board. The serial port library
functions used in the data logger are:
• initU3( ) — Initializes the serial port using UART3 of the
PIC32 for 19200 baud, eight-bit data, no parity, and one
stop bit (or shorthand 192008N1).
• putU3(character) — Writes ASCII characters out to the
• putsU3(string) — Writes an entire ASCII string out to the
• Character getU3( ) — Waits for a new ASCII character
to arrive at the serial port and returns it.
A demo test program is provided in the downloads.
First, you must configure your PC with Hyper Terminal for
communication at 115200 baud, eight bits, no parity, one
stop (115200 8N1). Follow the steps shown in Figure 12.
The other setting is to configure the communications for
VT100. With the VT100 configuration, we can issue
escape codes to clear the Hyper Terminal screen and
return the cursor to the home position. In this way, we can
mimic the LCD display operations with the F10 key.
Open the serial folder and then invoke workspace
Serial.mcp. Compile and program/download this
workspace into the Experimenter. You should now be able
to type on the PC keyboard and see the results displayed
on the Experimenter LCD.
Final Terminal Emulation Step
Let’s complete the terminal application by integrating
all the diverse components into a cohesive whole. At this
point, all the individual pieces should be integrated and
tested by the following checklist:
1. LCD 12x8 — Hook up the universal module and run
2. Mini-kit — Assemble and hook up.
3. PS/2 — Use assembled/connected Mini-kit; connect the
PS/2 keyboard and run Keyboard.mcp.
4. Serial Port — Hook up the ACRONAME interface and
Once you have successfully integrated and tested all
the components, is it now time to run the final terminal
application. Open the folder terminal.mcp, and build and
download code into the Experimenter.
For the final test, we should be able to type on the
PS/2 interface and see updates to both the LCD interface
and the PC Hyper Terminal window simultaneously.
Examples are shown in Figure 13.
What About Rotary Inputs?
The other Experimenter input associated with the