Page 1 of 1
slow Bluetooth
Posted: Mon Mar 21, 2016 8:13 am
by ammaralroz
Dear All
I have Bluetooth module connected to PIC16f628A with internal clock 4Mhz using flow code (demo)
when I send command 'a' to turn the led on; it takes 7 seconds
and off also takes 7 seconds
even I write a short program as you can see below . it works really fast on "Flowcode simulation". but on the real microcontroller it is slow
anyone know why?
Re: slow Bluetooth
Posted: Mon Mar 21, 2016 10:48 am
by Benj
Hello,
The string receive function waits for "\n\r" or "\r\n" carriage return and line feed otherwise it has a timeout feature. My guess is that it is the timeout that is causing the long delay.
You could instead use the Read_Byte function and this will return the value 255 if there is no data or it will return the data byte directly without waiting.
Re: slow Bluetooth
Posted: Tue Mar 22, 2016 8:48 am
by ammaralroz
Thank you Benj for your fast response
yes I did my test and discover that the slow comes from "StringReceive" function
i tried "\n\r" or "\r\n" but it didn't work
any ideas?
Re: slow Bluetooth
Posted: Tue Mar 22, 2016 3:35 pm
by Benj
Hello,
Please can you post your program and I will see if I can make it run faster for you.
Re: slow Bluetooth
Posted: Wed Mar 23, 2016 5:09 pm
by ammaralroz
Hi
In attached as requested
Thank you
Re: slow Bluetooth
Posted: Sun Apr 03, 2016 9:12 am
by ammaralroz
Dear All.
Still no one have any solution?
Re: slow Bluetooth
Posted: Wed Apr 06, 2016 5:51 pm
by Benj
Hello,
I have replaced the Bluetooth component with the RS232 component which provides you some better functions for low level communications.
Have a go with this and it should be much better.
Re: slow Bluetooth
Posted: Fri Apr 15, 2016 12:52 pm
by paridhi
I am making a program to send text messages from my mobile through bluetooth Hc 05 to control operations by ECIO 40P. Though I was able to send strings to and fro, the speed is really slow. It takes 6-7 secs to go though. Can you suggest a way to make it faster without using RS232? Is there an internal delay in the macro of "send command"?