Do NOT use the UART BPS tables in the data sheet. A few of the tables are known to be incorrect. The equation given in the data sheet is correct. Use that to determine spbrg. -Adam Rick Mann wrote: >Hi. I'm trying to get a PIC16F877 to work at 9600 baud. It works fine at >2400, with BRGH=0, but I can't seem to get reliable operation at 9600 with >BRGH=1. > >I thought I read somewhere that one shouldn't even try to use BRGH=1, but >all of the examples I've seen on the Microchip website and Piclist.com seem >to do it. > >FWIW, it seemed to work better when the SPRG value was set to 26 instead of >25, the value everything says I should use. > >I have a MAX232 from TI between the PIC and the PC. The handshaking lines >are all hard-wired. > >I try to send ascii '0' through '9' from my terminal program, and display >those values on 8 LEDs. At 2400 baud, it works great. At 9600, I get >incorrect (although consistently) values. > >Any ideas? Thanks! > >-- >Rick > >-- >http://www.piclist.com hint: PICList Posts must start with ONE topic: >[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > > > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.