ennng
Junior Member level 2
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.
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}