This question already has an answer here:

I'm trying to connect a dsPIC33FJ128MC804 - 16 bit pic - with a Bluetooth module the problem is i have few baud rates of Bluetooth to choose between them , searched the net but could not find the allowed baud rate error due to baud rate generator register takes only integer values as you know , so what is the maximum allowed error ? Edit: i read the related section of data sheet and family reference to UART but i do not think i found any information regarding this point.


marked as duplicate by Olin Lathrop, Dave Tweed Aug 31 '15 at 14:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


As a general rule of thumb, the total error between a transmitter and a receiver cannot exceed ±5% — half a bit time either way after a total of 10 bit times. Splitting this evenly between the two, and making allowances for crystal errors, synchronizer delays, etc., we usually say that each device needs to be within ±2% of the nominal frequency.

  • \$\begingroup\$ how the Bluetooth module will have an error? it has specific baud rate that i wanna match it with the pic \$\endgroup\$ – Mohamed Osama Aug 31 '15 at 14:33
  • 1
    \$\begingroup\$ @MohamedOsama: How do you know that it doesn't? Maybe its designer was working under constraints similar to what you have! \$\endgroup\$ – Dave Tweed Aug 31 '15 at 14:38
  • \$\begingroup\$ But i mean in case of pic i put in the baud register and equation , that's way i get it not 100% but the designer of the Bluetooth did not say about its error or i am mistaken ? \$\endgroup\$ – Mohamed Osama Aug 31 '15 at 14:50
  • \$\begingroup\$ I have no way of knowing, since you never told us which module you're using. But it doesn't matter anyway -- as I said at the start, this is just a generic rule of thumb. For a more detailed discussion, see the duplicate question link above. But if you just want to argue, you want room 12A, next door. ;-) \$\endgroup\$ – Dave Tweed Aug 31 '15 at 15:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.