UART/CODE problem Oshonsoft

Status
Not open for further replies.

camerart

Well-Known Member
Hi,
When setting the BAUD rate on a PIC, one of the settings is BRGH, the H stans for High.
what I want to know is, what is high and what is low?
In other words when is BRGH used?
Camerart
 
Hi C. BRGH is just to select FOSC / ( 16 x [baud+1]) or FOSC / ( 64 x [baud+1]) in 8 bit asynchronous mode.

One thing I need to tell you.. As your serial is up the swanny without a paddle. Have to checked BRGH16 to make sure it is zero? That puts the transmission / receive into 16bit mode.

Also.. SPBRGH and SPBRG make a 16 bit divisor for values on the table above 255 in 16bit mode. It isn't needed for 8 bit BUT!! (and I have a big butt), SPBRGH must be 0.
 
This IDE option allows you to include "Includes" with many different functions, but only those that are actually used are compiled.

View attachment 142883
Hi D,
Thanks.
I have adopted INCLUDES, but there is one we use, that doesn't want to work, so it was put back in the MAIN prog.
They are hard for me to jump backwards and forwards between. I think it's my short term memory?
C
 
Hi I,
I have played with the SBRGs and the OSH HSEROPEN.
A minute ago, I got the old CODE working, with HSEROPEN, then TXEN =0 immediately after it, as this pin is used for SS/CS.

Thanks, C.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…