Bluetooth RS232 Microchip Pic control from a Pocket PC.
read the information on this website. http://micropda.50webs.com/index.html
The rest of this page presumes you have.
It's what gave me the inspiration to try this with a Pic.
Purchase a BlueSmirf Gold module here, http://www.sparkfun.com/commerce/product_info.php?products_id=582
I used my Basic4PPC serial terminal software.
A new version that doesn't need the Franson serialNET.dll is available below.
Once I powered my BlueSmirf module, CTS/DTR wired
together, and RX/TX wired together, with 6V, (4 xAA's),
and did a 'Search for Bluetooth Devices' on my PPC, it saw the BlueSmirf and assigned it COM6, 9600,N,8,0,1.
So far so good.
Everything I sent via COM6 from my serial program was
echoed back. Disconnect the TX/RX connection and nothing.
That's expected. Now connect it to TX/RX pins to a pic running 9600,N,8,0,1 serial stuff. Nothing.
Read the PDF of BlueSmirf commands from the Sparkfun website !!
The BlueSmirf Gold allows Bluetooth connection at
9600, but the RX/TX side is set by default to 115200.
So, make a connection to the module and immediately send '$$$' to it, no quotes.
This puts the module in Command mode. Then send 'SU,96' to it, 9600 baud.
Follow this with the '---', exit Command mode.
The module is now set to 9600 baud.
I found, as with my IR board, the Pic
responds better when sent individual bytes.
This is probably due to the code on the pic waiting for an RS232 signal.
If for whatever reason the BlueSmirf locks
up, or you issue a wrong command.
Connect the RX/TX lines to a serial terminal program on a PC via a MAX232 converter etc.
Your serial port has 13V on it, the module uses 5V, don't fry it.
You might need 115200 or 9600 baud, it's trial and error.
Send the commands '$$$' 'SF,1' 'crlf' '---' 'crlf' (minus the quotes) from there, not from the bluetooth connection.
That is the factory reset. Remember the Baud will be back to 115200 on the TX/RX side after.
You could try pre-programming a pic to
output the reset command.
This way, you don't need the MAX232 converter.
BlueSmirfconnectedtoaPic16F628,PortA0=TX, PortA1= RX
The Pic is programmed to send a string once it's powered, then Echo any other bytes received.
Click the images below to download files source and exe files.
Any questions, email me.