Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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
 
This IDE option allows you to include "Includes" with many different functions, but only those that are actually used are compiled.

ConfigIDE.JPG
 
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.
 
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.
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.

Latest threads

New Articles From Microcontroller Tips

Back
Top