IR RS232 from Microchip Pic to PocketPC.
following project source
code files use Basic4PPC.
The .exe files should work on any PPC with the required .NET CF installed.
Here's an addition to my
Graphic LCD board
No, not the zif socket, the circuit to the right, a Microchip Pic to PPC IR board.
Ignore the date
You need to buy the PSXIR.hex
file from sirpic.com
Please don't ask me for the PSXIR hex file. You can buy it from www.sirpic.com like I did ;-)
The following circuit is from www.sirpic.com
The circuit was originally designed
to talk to Palm handheld PDA's.
I decided to try the circuit with a Pocket PC.
Please don't email sirpic.com with Pocket PC questions. They will probably be ignored.
The PSXIR chip is a PIC12F629 or PIC12F675 device.
So, armed with a, 'Registered version', of Basic4ppc.
I wrote a short program that sends a string via IR RS232, then reads the response from the PIC controlling the IR board.
My first downer was that the IR
board only ever received the first byte of the string my PPC sent.
I cured this by sending the string from a FOR NEXT loop with a short pause between bytes. Sorted :-)
Obviously, all the error checking for a bad received byte must be catered for in the PIC code.
Downer two. I can't get my PPC to read a
byte or string sent from the IR board.
Not really a problem, but I would like 2 way communication.
Using PocketDAQ proves that the PPC 'can' read data sent from a Pic.
Then I came across Franson Serial tools.
Download SerialNET.dll for
.NET Compact Framework and buy a licence
The SerialNET.dll gives you access to the Raw IR port of your computer or PPC using VB, C#, VB.NET, CF.NET etc.
Using #Develop , I've managed to create my own RawIr.dll for Basic4ppc that uses code from within SerialNet.dll
RawIr.dll functions, properties etc are here
You must use the Dispose function of RawIr.dll before quitting or exiting any source code examples in your own apps that use RawIr.dll. If you don't, SerialNET.dll will eat your memory and you will have to soft reset your device on a regular basis. If you end your app by clicking the 'X' top right of screen, the Dispose function is still not called. It will EAT your device memory ;-)
Basic4PPC IR application for Microchip 16F628 control. More here.
Basic4PPC IR serial terminal application. More here.
Download the zip file for both projects here.