gnupic: PIC16F877 & USART


Previous by date: 28 Dec 2002 21:21:39 -0000 Re: Programming pic18F452, Hector Oron Martinez
Next by date: 28 Dec 2002 21:21:39 -0000 Re: PIC16F877 & USART, Edward Tiong
Previous in thread:
Next in thread: 28 Dec 2002 21:21:39 -0000 Re: PIC16F877 & USART, Edward Tiong

Subject: PIC16F877 & USART
From: Rick Mann ####@####.####
Date: 28 Dec 2002 21:21:39 -0000
Message-Id: <BA335426.105BD%rmann@latencyzero.com>

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


Previous by date: 28 Dec 2002 21:21:39 -0000 Re: Programming pic18F452, Hector Oron Martinez
Next by date: 28 Dec 2002 21:21:39 -0000 Re: PIC16F877 & USART, Edward Tiong
Previous in thread:
Next in thread: 28 Dec 2002 21:21:39 -0000 Re: PIC16F877 & USART, Edward Tiong


Powered by ezmlm-browse 0.20.