pic uart speed
You didn't study the datasheet well enough. Table 10-1 on page 97 gives you the formula for calculating bit rates.
With BRGH set to 1 and running at 20MHz the maximum baudrate = 1250kbaud = 1.250Mbaud. This is also shown in table 10-4 on page 98.
Please be aware that the baudrate generator has some limitations. The baudrate is generated by dividing the clock frequency by a user selectable 8-bits value. When using a clock frequency like 16MHz there is no 8 bit dividing value that will give you an exact baudrate value, only a value that comes close. You are allowed a total baudrate error of 4% for sender and transmitter together. This is the reason you can buy crystals with the odd frequencies like 18.4320MHz because they will give you a 0% baudrate error.
For example running at 20MHz you can't run at 115kbaud because the error margin would be to large. Higher baudrates up to 1250kbaud are possible when choosing outside the range of the default baudrates, make sure to check the receiving device to be capable of handling these odd baudrates
Added after 38 minutes:
I hope you understant it...
Added after 5 minutes:
Ofcourse if you use CCS c compiler you can define soft. and hardware serial comunications.
For a hardware UART it should be the same as the maximum speed the PIC can support.
FOr a software UART I'm not sure, a bit tricky to answer.
Added after 21 seconds:
Ofcourse if you use CCS c compiler you can define soft. and hardware serial comunications.
For a hardware UART it should be the same as the maximum speed the PIC can support.
FOr a software UART I'm not sure, a bit tricky to answer.