displays data originating via the PC keyboard (using a
terminal program) and displays it on the Experimenter LCD.
• Analog Sensor Data USB Transfer Demo — This demo
sends a text string representing local Experimenter ADC
digitized data to the PC when the SW1 pushbutton is
pressed on the Experimenter.
• Rotary Encoder Knob USB Service Demo – This demo
sends a rotary encoder knob rotation value and
direction update from the Experimenter to the PC. Uses
a Mini-Kit module.
FIGURE 3. Mini-Kit.
For the demos, we use both the Mini-Kit with Rotary
Encoder and the PS/2 interface as data interfaces. Figure
3 shows the Mini-Kit with a PS/2 keyboard. The +5V is
used to drive the PS/2 keyboard, and it can also be used
as a power source for the Experimenter itself. A hook-up
diagram (Figure 4) shows the connections between the
Mini-Kit and Experimenter. We will use the Universal
Graphics Display as a display option. On the PC side, we
use a terminal emulator program. (All the supplemental
hardware was described in earlier Experimenter articles.)
There are five key technical needs that must be addressed
in order to achieve the virtual serial port. None of these are
difficult, but all must be considered to get your virtual port
working. We’ll cover each of the following in more detail:
4. Microchip UART CDC API (application programming
5. Setting up your PC serial communications.
1. The PIC32 USB
1. PIC32 USB peripheral.
2. Microchip USB stack.
3. Main code within your program.
The first component is the USB peripheral hardware. A
block diagram is shown in Figure 5. This peripheral is standard
for Microchip’s entire line of USB enabled microcontrollers.
FIGURE 4. Mini-Kit to
Experimenter hook-up diagram.
February 2012 45