The idea is to use the PicKit2 programmer as a USB to serial converter
The PicKit2 has a built-in UART tool, this will tell you rx,tx and GND pins to be used from PK2.
! The signals are TTL levels (0-5v) not +/-12v RS232 levels but this should be what you need if you use this for a microcontroller communication.
The atached program puts the PK2 in serial mode and redirects USB traffic to a serial port.
Use com0com (com0com.sourceforge.net
) or other software to create 2 bridged virtual serial ports on your computer.
Use one port with the attached program and the 2nd port in your PC serial application.
The baud rate is set from the attached program.
PicKit2 manual recommands baud rates up to 38400bps.
Original idea and implementation by kcsoft