Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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
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.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**
Yes I plan to use the internal 4Mhz of the 16F628A.blueroomelectronics said:What clock frequency are you using? 4MHz?
e.chain said:I think the correct calculation for the SPRBG is 16.36 using BRGH=1.
Yes, Thank you.ericgibbs said: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?