14400 Baud 8N1

Status
Not open for further replies.

e.chain

New Member
Looking for some source code to send and receive hex files through RS232, with this settings 14400 Baud Rate, 8 Data, Parity none, 1 Stop bit, Thanks.
 
hi,
This should help with the baud rate calculations.

Which type of MCU and programming language ?
 
Last edited:
Thanks for your quick reply, assembler is what I understand better. It could be 16F628A or 12F series.
 
Last edited:
Check my tutorials, they give assembler for both software and hardware UART's, actually at 9600 baud, but it's trivial to chnage to 14400 baud.
 
Hi Nigel, I am working on your 7.1 Tutorial, do you think this will be accurate for 14400 Baud Rate. Sorry I am a beginner.

Code:
Start_Delay MOVLW   0x06
            MOVWF   Delay_Count
Start_Wait  NOP
            DECFSZ  Delay_Count , f
            GOTO    Start_Wait
            RETURN

Bit_Delay   MOVLW   0x0C
            MOVWF   Delay_Count
Bit_Wait    NOP
            DECFSZ  Delay_Count , f
            GOTO    Bit_Wait
            RETURN
 
Last edited:
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**
 
blueroomelectronics said:
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.
 
e.chain said:
I think the correct calculation for the SPRBG is 16.36 using BRGH=1.

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.

Ideally you want a 7.16MHz xtal

Does this help?
 
Yes, Thank you.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…