■ PHOTO 3. Here’s the whole shebang. A MCP2200
USB-to-UART converter-equipped PIC24FJ/PIC32MX
Trainer in command of an MRF24J40MB 802.15.4
transceiver and an LCD.
shown in Photo 1. The idea behind the MCP2200 is to
replace legacy RS-232 installations. The board you see in
Photo 2 used to have an SP3232 RS-232 converter IC in
that empty socket. I installed the new MCP2200 USB-to-UART converter with only four connections. The
converter’s TX pin connects to the PIC24FJ128GA006’s
UART RX pin, and the PIC24FJ128GA006’s UART RX pin
crosses over to the converter’s TX pin. The MCP2200
converter’s five volt power and ground connections complete
the connection quartet. The entire design pictured in
Photo 3 is graphically displayed in Schematic 2. Everything
hardware is in place. So, let’s plug a USB cable into the
MCP2200 USB-to-UART Converter and see what happens.
After attaching a USB cable to the MCP2200 USB-to-UART converter, I fired up the Configuration Utility and
captured the main configuration window in Screenshot 2.
The default VID (Vendor ID) and PID (Product ID) belong
to Microchip. Obviously, if you owned your own VID and
PID, you would enter them here.
If you were to expand the Baud Rate menu, you
would find the highest baud rate value is 921600. The list
of baud rates between 9600 and 921600 are the standard
fare as far as baud rates go. For the purposes of our
discussion, 9600 bps is plenty fast.
Once again the MCP2200 is starting to really look
and feel like a PIC. The I/O config field is an eight-bit mask.
A logical 0 says that the bit position is an output while a
logical 1 sets the associated bit location as an input. Funny,
that’s exactly how PIC TRIS registers work. The Output
Default window sets the logical output of any MCP2200
GPIO pin defined as an output pin in the I/O config field.
The rest of the Configuration Utility is intuitively
obvious to the most casual observer. The alternate GPIO
pin selects live in the upper right corner. I pulled the
trigger on the displayed configuration in Screenshot 3.
Before we leave the Configuration Utility, note that we
can invert the UART signal polarity. The UPOL selection
saves hardware by eliminating the need to place inverters
in the UART signal path. I’ve seen some devices that do
indeed want an inverted UART signal set.
3V3 C4 10uF
470 Q1 NUD3105
Y1 8 MHz
1. C4 - MOUSER 80-C0805C106K9P - 0805
2. C11-12 - MOUSER 81-GRM21BR61C475KABL - 0805
3. Y1 - MOUSER 559-FQ7050B- 8
4. C1 - NOT MOUNTED
5. C2 - NOT MOUNTED
6. U1 - PIC24FJ256GA006
7. U2 - MRF24J40MB
8. ALL PARTS 0603 SMT UNLESS OTHERWISE NOTED
9. ALL LEDS SMT 1206
VDD 3V3 VR1 TC1262-3.3
■ SCHEMATIC 2. This is the
design behind the hardware
you see in Photo 3.
July 2010 61