EDTP Electronics, Inc.
PIC24FJ/PIC32MX Trainer
MCP2200 USB-to-UART
Converter
www.edtp.com
SOURCES
Microchip
MCP2200
Microchip C30 C Compiler
PIC24FJ128GA006
www.microchip.com
Here’s the rest of the picture:
char data_out;
int main(void)
{
data_out = 0x20;
//SETUP LEDS
TRISCbits.TRISC13 = 0;
TRISCbits.TRISC14 = 0;
LED13_OFF();
LED14_OFF();
initUART();
LCDInit();
DelayMs(100);
strcpy((char*)LCDText, “ MCP2200 “
““““““““““““““““““““““““ USB-TO-UART”);
LCDUpdate();
do{
U2TXREG = data_out++;
if(data_out > ‘z’)
data_out = 0x20;
DelayMs(100);
}while(1);
}
Don’t worry. I’ll post all of the code to drive the LCD
THE DESIGN CYCLE
■ SCREENSHOT 4.
Enough said ...
and the PIC24FJ128GA006’s UART in our usual spot at
www.nutsvolts.com. If those strcpy lines give you
heartburn, code it like this:
strcpy((char*)LCDText,
“““““MCP2200 USB-TO-UART”);
You’ll get the same result on the LCD. The UART code
that is spinning between the do-while braces will send
every ASCII character between a space and the lower-case
z, and start over again at the space character (0x20). Okay.
Now that the MCP2200 is in your Design Cycle, we can
cue Porky ... “Th-Th-Th-Th-Th- ... That’s all, folks.” NV
Fred Eady can be contacted via email at fred@edtp.com.
July 2010 63