Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

I want interface pic with Bluetooth!

Status
Not open for further replies.

ennng

Junior Member level 2
Joined
Nov 1, 2012
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,420
Hi every one!

I want interface the PIC16f with Bluetooth Module through UART. I want send a heart rate as real time to mobile or PC. I found many posts some said you have to ported the stack to host(pic) some said just connect Rx,Tx of pic to Tx,Rx.
is the pic need stack or just as physical connection. the Bluetooth support SPP,HCI
another question the communication between the module and pic via AT command or what because I found a code which did not use AT command.

Code:
unsigned short temp_res;
 void main() {
 USART_Init(115200); // Initalize USART (115200 baud rate, 1 stop bit, ...
 // Select Vref and analog inputs, in order to useADC_Read
 ADCON1 = 0;// All porta pins as analog, VDD as Vref
 TRISA = 0xFF; // PORTA is input
 do {
 // Read ADC results and send the upper byte via USART61
 temp_res = ADC_Read(2) >> 2;
 USART_Write(temp_res);}
 while (1); // endless loop}
 

ennng

Junior Member level 2
Joined
Nov 1, 2012
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,420
Hi, no one can help!!!
 

ennng

Junior Member level 2
Joined
Nov 1, 2012
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,420
Thank you for your reply;

I would use MikroC, so I have to use AT command or not.
is there and example ... please help
 

GSM Man

Banned
Joined
Apr 15, 2009
Messages
671
Helped
168
Reputation
338
Reaction score
94
Trophy points
1,308
Location
New Jersey, USA
Activity points
0
Depends on which Bluetooth module you are using. For example, the Roving Networks' RN-41 has a built-in stack and supports SPP/DUN Master and Slave, or HCI (different versions). It doesn't use the AT command format, but is still very easy to configure over the serial (UART) interface. http://www.rovingnetworks.com/products/Bluetooth_Modules
 

ennng

Junior Member level 2
Joined
Nov 1, 2012
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,420
hi GSM Man!
Thank you very much.
So, if the Bluetooth module support SPP or HCI then we do not need to use AT command. just physical connection between Tx,Rx of pic and Rx,Tx of bluetooth module and use code application as UART. is there any example.
 

GSM Man

Banned
Joined
Apr 15, 2009
Messages
671
Helped
168
Reputation
338
Reaction score
94
Trophy points
1,308
Location
New Jersey, USA
Activity points
0
AT Commands have nothing to do with SSP or HCI. The AT Command set defines a protocol for sending commands and data between 2 devices, defined by Hayes Microcomputer Products back in the 1970's. It's a popular protocol for communications devices, and is the basis for several standards including ITU-T V.25 TER, ETSI GSM 07.05 and ETSI GSM 07.07.

Your Bluetooth device either uses the AT protocol or it doesn't. You need to refer to the Bluetooth device's manual to understand how to communicate with it. BTW - which Bluetooth device are you using?
 

ennng

Junior Member level 2
Joined
Nov 1, 2012
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,420
I have found a small module (FC04UAB) which is really fit with my design; however; I am not sure is it possible to connect with PIC16 or not.
It has UART pins connection and support HCI.
if it is OK! can we communicate with enable mobile Bluetooth, someone said no because the mobile support SPP not HCI. is it right or not.
please heeeeeeeeeeeeeeeeeelp!
Cheers!
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top