Hi friends. i need some help on bluetooth programming. i'm still new in bluetooth programming. i use PIC16F877a for the microcontroller and eb500 bluetooth module. i'm doing SLAM robot where i need to retrieve data from PIC memory using via bluetooth. but now i'm having some problems on bluetooth programming.
here is my code. could some help me check my coding and guide me, please. need to submit the project by 2 weeks more. i'm using CCS as the compiler.
#use delay (clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)
unsigned char a;
void display(unsigned char c) // subrountine to display the text on the screen
while (TXIF == 0);
TXREG = c;
unsigned char receive(void) // subrountine to receive text from PC
while (RCIF == 0);
a = RCREG;
void init(void) // subroutine to initialize
while(true) // wait for 'ok' to be entered
a = receive();
if (a == 'd')break;