Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Wireless communication with PC and pic18f452 using bluetooth

Status
Not open for further replies.

fooofaaa

Junior Member level 1
Joined
May 4, 2010
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,388
Hello.

I do my project about that. I have PIC18f452 and a bluetooth module Pearlblue. I want to receive and send message fromPIC18f452 through Pearlblue to computer. I want to connect the PIC18f452 with the Pearlblue using USB connector. How can i do that?? Also i have problem to write code for Pic and PC. Please help me.
Thanl you very much.
 

452 do not have internal USB controller, so you need to use either FT232 or change Microcontroller to something else, let say 18F4552.
What kind of problem you have to program your devices?

Mahdi.
 

Thanks a lot for your help,,,
but I think we can connect 452 with the usb port becouse we can connect it to pc via usb port.
but the real probleam i have is how to connect this module of the bluetooth to usb port???:-?


452 do not have internal USB controller, so you need to use either FT232 or change Microcontroller to something else, let say 18F4552.
What kind of problem you have to program your devices?

Mahdi.
 

My friend,
I'm sure about 452. It does not have the peripheral to connect to USB port directly and if you want to connect it you need some other intermediate module.
As far as I have no idea about your BT module, I assume that it may be connected to the microcontroller using serial port or SPI or ... .
Then you need to connect your BT to MCU and MCU to USB, now what you have is a Bluetooth device that is connectable to PC USB.
Let me know if I got your project right.

Mahdi.
 
Dear Mahdi,
I'm only a beginner in Microcontroller world; So, I'm not sure from my Info ( I'm only guesses) >> So, Thank you again for your help.

About my project, only I need to connect the BT to 452 via usb Port or Useing the SPI serial connector. and because I don't know a lot about the SPI I try to connect it using USB. I found a lot about how to connect the Micro to PC using the USB (So, I say it is easy)...
If you have any idea a bout The SPI and hoe to connect it that will be very good (any thing other RS232)..

I'm ver sory for my noise; and very thanks about your help..:roll:

My friend,
I'm sure about 452. It does not have the peripheral to connect to USB port directly and if you want to connect it you need some other intermediate module.
As far as I have no idea about your BT module, I assume that it may be connected to the microcontroller using serial port or SPI or ... .
Then you need to connect your BT to MCU and MCU to USB, now what you have is a Bluetooth device that is connectable to PC USB.
Let me know if I got your project right.

Mahdi.

µµ
 

Hi,

Your posts are a little confusing so first lets ask if this is what you are trying to do - please see the jpeg below.

From the little inforamtion I can find on the Pearl Blue it outputs its data in USART serial mode so it must connect to the USART port of the 18F452.

As Mahdi already said, the 452 chip does not have inbuilt USB so you can only connect to a PC by RS232 - which as the Pear Blue is connected to the only hardware USART you will need a software USART to talk to the PC.

You have said twice that your 452 connects to the PC by USB - well the 452 chip itself cannot do that, so I must assume you are talking about the 452 chip being on an existing board that has either a USB programmer/ converter built onto it or some other kind of USB converter.
Can you say if this is what you have got.

You make no mention of how you intend to program up all this, have you done any before ??
 

Attachments

  • pearl.jpg
    pearl.jpg
    6.6 KB · Views: 143
What I need is in the Picture what i submit

Hi,

Your posts are a little confusing so first lets ask if this is what you are trying to do - please see the jpeg below.

From the little inforamtion I can find on the Pearl Blue it outputs its data in USART serial mode so it must connect to the USART port of the 18F452.

As Mahdi already said, the 452 chip does not have inbuilt USB so you can only connect to a PC by RS232 - which as the Pear Blue is connected to the only hardware USART you will need a software USART to talk to the PC.

You have said twice that your 452 connects to the PC by USB - well the 452 chip itself cannot do that, so I must assume you are talking about the 452 chip being on an existing board that has either a USB programmer/ converter built onto it or some other kind of USB converter.
Can you say if this is what you have got.

You make no mention of how you intend to program up all this, have you done any before ??
 

Attachments

  • The Idea.png
    The Idea.png
    37.5 KB · Views: 144

Hi,

Well unless your Peal Blue module clearly specifies it can communticate in another method other than USART serial I cannot see what you can do about it.

Why are you not wanting to use a serial link - it does seem to be the standard for many BT modules ?
 

There are good "Applicatioon notes" in Microchip site about SPI.
For now forget USB if your BT module supports SPI. For USB you need to know lots of things.
SPI is a serial communication protocol, mostly used between microcontrollers and other very specific modules such as memories.

Mahdi.
 

Hello,
There are many problems that you will have to solve for your project to work:
1. As both Mahdi and, wp100 said, 452 doesn't have a USB controller at all. Moreover, all PIC 18Fxxxx family are USB slaves, which means that they can't initiate communication through USB. I mean there must be a Host(Master) chip that will initiate that communication. So, you will have to go higher for PIC32Fxxxx family.
**broken link removed**

2. After you get your PIC32, you will have to implement a "Bluetooth Stack" to communicate with your bluetooth module. This is not an easy job for even an intermediate experienced one.

3. On the PC side, you will have to make a small software that will use another bluetooth module to communicate with your circuit. This require some knowledge in C#


For more information, you can check this thread:
https://www.edaboard.com/threads/84108/#post788596

Hope this helps.
 
Thanks a lot for all ...

I think you understand me well...Thanks :)


Hello,
There are many problems that you will have to solve for your project to work:
1. As both Mahdi and, wp100 said, 452 doesn't have a USB controller at all. Moreover, all PIC 18Fxxxx family are USB slaves, which means that they can't initiate communication through USB. I mean there must be a Host(Master) chip that will initiate that communication. So, you will have to go higher for PIC32Fxxxx family.
**broken link removed**

2. After you get your PIC32, you will have to implement a "Bluetooth Stack" to communicate with your bluetooth module. This is not an easy job for even an intermediate experienced one.

3. On the PC side, you will have to make a small software that will use another bluetooth module to communicate with your circuit. This require some knowledge in C#


For more information, you can check this thread:
https://www.edaboard.com/threads/84108/#post788596

Hope this helps.


---------- Post added at 19:32 ---------- Previous post was at 19:30 ----------

Thanks a lot for all ...

I think you understand me well...Thanks :)


Hello,
There are many problems that you will have to solve for your project to work:
1. As both Mahdi and, wp100 said, 452 doesn't have a USB controller at all. Moreover, all PIC 18Fxxxx family are USB slaves, which means that they can't initiate communication through USB. I mean there must be a Host(Master) chip that will initiate that communication. So, you will have to go higher for PIC32Fxxxx family.
**broken link removed**

2. After you get your PIC32, you will have to implement a "Bluetooth Stack" to communicate with your bluetooth module. This is not an easy job for even an intermediate experienced one.

3. On the PC side, you will have to make a small software that will use another bluetooth module to communicate with your circuit. This require some knowledge in C#


For more information, you can check this thread:
https://www.edaboard.com/threads/84108/#post788596

Hope this helps.
 

PIC32 is a very complete MCU, but you have another opportunity and that is PIC24 family that supports USB and USB OTG.
USB OTG means your MCU can operate as master or slave of USB. There is also a free to download version of C30 which is the C compiler for PIC24 and seperated USB libraries that all can be received from Microchip.
I still warn you that if you are new with programming and microcontrollers do not try USB, now.
Get experience and then start.

Mahdi.
 
Thank youu very much Mahdi;
I will take your device Into account
Thanhs alot for your help....

PIC32 is a very complete MCU, but you have another opportunity and that is PIC24 family that supports USB and USB OTG.
USB OTG means your MCU can operate as master or slave of USB. There is also a free to download version of C30 which is the C compiler for PIC24 and seperated USB libraries that all can be received from Microchip.
I still warn you that if you are new with programming and microcontrollers do not try USB, now.
Get experience and then start.

Mahdi.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top