when testing baud rate, usualy I start at 300 and up
when it stopped working then I set pace = 1
and re-start from the last baud rate tested.
16F690 Xtal 20Mhz
set pace to 1
sEROUT2 lcd,baudR,pace,[254,128,"ABCDEFGHIJKLMNOP"]
from my code here's the tested baud rate .
and when booting the PIC's at different baud rate the sender 12F683 and receiver 16F690 the LCD screen light up right away and start displaying text, and back light on/off
there's no lag for the first receiving if I remember correctly the pace for the sender is set = 0.
Also I add baud rate selection jumpers on the Backpack''
' Jumpers
'
J3 300 600 1200 2400 4800 9600 14400 19200 28800 38400
' 1--2 RB7 On On On On On On
' 3--4 RA2 On On On On
' 5--6 RA1 On On On On
' 7--8 RA3 On On On
' Baud Rate SW Selection (PCB J3)
If PORTA = 001110 And PORTB.7 = 1 Then BaudR = 3313 ' 300
If PORTA = 001110 And PORTB.7 = 0 Then BaudR = 1646 ' 600
If PORTA = 001010 And PORTB.7 = 1 Then BaudR = 813 ' 1200
If PORTA = 001100 And PORTB.7 = 1 Then BaudR = 396 ' 2400
If PORTA = 000110 And PORTB.7 = 1 Then BaudR = 188 ' 4800
If PORTA = 001010 And PORTB.7 = 0 Then BaudR = 84 ' 9600
If PORTA = 001100 And PORTB.7 = 0 Then BaudR = 49 ' 14400
If PORTA = 000110 And PORTB.7 = 0 Then BaudR = 32 ' 19200
If PORTA = 001000 And PORTB.7 = 0 Then BaudR = 15 ' 28800
If PORTA = 000000 And PORTB.7 = 0 Then BaudR = 6 ' 38400


Reply With Quote

Bookmarks