If you use a 16F628A there is a hardware USART that does most of the work for you. Just set it and go. Another member here MikeK8LH wrote a baud rate calculator.
**broken link removed**
If you use a 16F628A there is a hardware USART that does most of the work for you. Just set it and go. Another member here MikeK8LH wrote a baud rate calculator.
**broken link removed**
Thanks, but I will have to try with the original formula that is located in the Microchip Document because this program doesn't calculate 14400 Baud Rate.
Another way to give an approximation would be to look at the Baud table on the datasheet [brgh=1]
for the 7.16MHz xtal, 57600 baud is 4 times 14400 and it specifies a figure of 7.
So for 14400 it would be 28.
So 4MHZ/7.16MHz * 25 = 15.6 , nearest integer value is 16.
I didnt calculate the error.
Another way to give an approximation would be to look at the Baud table on the datasheet [brgh=1]
for the 7.16MHz xtal, 57600 baud is 4 times 14400 and it specifies a figure of 7.
So for 14400 it would be 28.
So 4MHZ/7.16MHz * 25 = 15.6 , nearest integer value is 16.
I didnt calculate the error.