NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Basic Electronics » Setting baudrate for bluetooth connectivity
March 31, 2011 by AbhishekBhat |
Hi, I am a mechanical engineer, but am really new to the world microcontrollers and am having a little mind block regarding setting the baud rate. for my project, I am trying to interface the microcontroller with a bluetooth device, and the device says that the baud rate must be set to 9600 bps. 1) How do i set the correct frequency on the UART. I checked up the data sheet, and it gives a formula to calculate the UBRR value. Going by that calculation, I need to set UBRRL to 5 . But in the initialization, you have set it to 7. Do I just add the line "UBRR0L = 5;" in my main code after initializing the uart_init(), so that I dont tamper with the library file? 2) on the same lines, how is the baudrate for the LCD set, or does it not require a baudrate? Thanks much, Abhishek |
---|
Please log in to post a reply.
Did you know that you can build a circuit to convert the "dit" and "dah" of Morse code back into letters automatically? Learn more...
|