I need to send data from a PC to a microcontroller PIC, and of this to an bluetooth module. The bluetooth module send data and another bluetooth module receives the data, this last send tha data to another microcontroller PIC to be visualized later in a lcd.
The connection of the PC with the microcontroller PIC I know it, but like I connect the microcontroller PIC to the bluetooth module?. And that bluetooth module you recommend me to use.
The bluetooth modules that I know are connected directly to the PC, but like I said previously I need to connect directly the bluetooth module to a microcontroller PIC.
I very much doubt it. You are probably hoping to use a usb bluetooth adapter (which is a device) to an 18F4550 family usb pic (which is a device). To talk to a USB device you need a USB host. Only a USB host can control a USB device. A USB device will not talk to a USB device. This would only be possible if you connected your pic to a USB controller IC, and wrote a host controller stack. Not many people would even attempt this.
< Message edited by Pacer -- May 20, 2005 7:22:34 AM >
FYI, I was talking to someone about this topic a few weeks ago and they said to me that a Microchip Engineer told to them that it would be possible for the 18Fxx5x family to be used as an on-the-go device. He said that Microchip Engineer said that there is no examples, but that the PIC18Fxx5x SIE contains all the necessary hardware and that all it would need is firmware. I think it's bollocks (how would the SIE send a reset signal?), just want to let you know that there are some people at Microchip who may be spreading this 'opinion.'
I think he doesn't want a usb-bluetooth dongle, he wants any module to connect to the PIC. I think I have seen somewhere bluetooth-serial modules, but I don't remember where. Using one of these items, it should be possible to connect it to a PIC using its uart and send the appropiate commands to the bluetooth module.
That would work of course, if he could find the item in question. I suspect I assumed he wanted to control a USB module because he posted the request on the USB forum.
I have successfully used Bluetooth modules from KC Wirefree with the PIC18F family. The PICs communicate with the PC (the PC uses a USB dongle BT device) using the BT's serial port profile.
I used KC21 Bluetooth modules from KC Wirefree, these are Class 2 BT modules (i.e. the short range version BT), my application did not require longer range than several meters. I have built some diagnostic instrument with PIC18F2620 and a KC21 BT module, these equipment communicate via Bluetooth with a Notebook computer with embedded BT running an administration/user interface software. I have also tried the KC11 module, which has exactly the same programming/interface, but it has more RF power to be a Class 1 device with an extended operating range. Both modules have built-in antennas mounted on the PCB, so no RF design knowledge is required.
All Bluetooth modules are tranceivers, they transmit and also receive, both TX/RX functions are required by the Bluetooth protocol. If you have limited experience in communication protocols, chip-to-chip interfacing (as I suppose so) I would suggest you to try using KC Wirefree's serial adapters (KC121, or KC111) these 'emulate' a normal RS232 connection over the air, so from the viewpont of the host microcontroller all you have to do is talk/receive using the PICs serial UART and no hassle required with the Bluetooth pairing, etc. functions. Though I have not used these serial adapter modules.
As I see, you have control over both ends of your RF communication link, i.e. you have your own-built PIC and firmware on both ends, in this case I don't find necessary to use an industry standard RF solution like the Bluetooth. You can use any 'simple' RF transceivers modules instead.
I've already developped a system with a 18f2455 and usb connection. I'm very interresting to change my usb connection to a wireless connection.
My question is: Is it possible to find a wifi module like the bluetooth module when you speaks in this thread??? Can I connect my pic to my pc with wifi? And if yes, how??
I have done several project with Bluetooth and PIC microcontroller. For my degree project, I have sucessfully connect Handy Board with Bluetooth module as slave through HCI layer and the master is a Bluetooth with a PC. Then during my research for master, I connect Bluetooth to PIC18F458. Not only be the host of Bluetooth module, the PIC18F458 also control the a robot. Further I have also develop a Bluetooth PAN for 3 mobile robots, all controlled by PIC18F458.
Now I am working with a company in Malaysia who are the distributor for KC Wirefree Bluetooth Product. Same as Libor, I have also used KC21, now moving to KC22. I have also develop a remote control to control mobile robot. Both robot and remote control have a PIC18F252. It work fine.
RE: Bluetooth and PIC Help - Jul. 20, 2006 9:27:52 AM
Guest
Hi, libor I saw that you had successfully made a microcontroller and a PC comunicate with a KC device using a serial port. I'm trying to do the same, but I'm facing a little problem I can't solve. Actually it works in the microcontroller -> PC direction, but not in the opposite way. I'm using a KC11 with RS232 interface, pluged to my microcontroller (an Analog Devices ADuC841) PCB and a USB BT dongle at the PC side. When I open my PC program to receive data from the microcontroller the BT devices pair correctly, but don't work like they should. I don't know what's wrong. And it's really weird, because when I use a cable from the PCB to the serial port of the PC, instead of using the BT communication, everything works fine. It's just when I use th BT communication. Here's the thing. I programmed the ADuC to wait for a command from the PC (this command is a miserable single byte). After receiving the command, the microcontroller starts to capture some channels of its AD converter and send the captured data through UART. I can connect the UART to the KC11 or directly to the serial port of the PC (using a DB-9 cable). The PC has a program developed in Borland C++ Builder that sends the command (that single Byte) to the uC through a serial port and receives the signal captured by the AD converter. As I said before, when I use the DB-9 cable, everything works fine, so it shouldn't be a problem with the programs. Well, I hope you (or any one else... hehe) can help me with this.
RE: Bluetooth and PIC Help - Jul. 26, 2006 9:03:44 AM
Guest
Hey, everybody. I finally solved my problem. It was nothing to do with the microcontroller or with the BT device. It was my mistake. I was using the wrong function in the PC application to send data to the microcontroller. So, if anyone ever faces the same problembe careful for this. I was using the Windows API function 'TransmitCommChar' instead of 'WriteFile'. When I made the change it worked perfectly. Hope I can help someone with this.
RE: Bluetooth and PIC Help - Aug. 21, 2006 6:48:55 AM
Guest
Hi!
I want to use a KC 11 too, but have several problems with it. If the RX Pin is going low like a break and the KC 11 wants to send something on TX, it crash. The current increases to 120mA while this happens.
I only can take the KC 11 out of this state, if I reset it.
If the RX Pin is low while starting, the KC 11 always resets by it self.