In my previous post, I described infrared (IR) data transmission from the PIC18F4620 to a PC using the PICkit 2 as the receiving device. That example showed how a program running on the PIC could easily print messages on the computer screen in real time using the PICkit 2 application.
In this post, I describe an alternative receiver for the same transmitted IR data stream, this one using on a low-cost USB-to-serial converter (the PL2303HX, currently available from Satistronics.com for $4.99). The same 36kHz IR receiver module (GP1UX31QS, available from radionics.ie for about 48 cent) is used again and the PIC circuit with the IR LED is precisely the same as that in the previous example. The big advantage of using a USB-to-serial converter rather than the PICkit 2 is that the data received can be channeled into any program running on the PC that can read data from a COM port (that’s what serial ports are called in Windows).
Ok, there’s not much to it really. Here’s how to connect the GP1UX31QS IR receiver to the PL2303HX USB-to-serial converter:
To display the data received by the PL2303HX, simply open it as a virtual COM port in any program that can read data from a serial port (e.g. Hyperterminal in Windows XP). The virtual COM port should be opened at 2,400 baud.