From: Spehro Pefhany
Subject: Re: RS232 newbie - in need of assistance!
X-Newsreader: Forte Agent 1.92/32.572
Date: Sat, 04 Jan 2003 02:26:41 GMT
NNTP-Posting-Date: Fri, 03 Jan 2003 21:26:41 EST
On Sat, 04 Jan 2003 01:07:29 GMT, the renowned "Michael F. Coyle"
>"Spehro Pefhany" wrote in message
>> On Fri, 03 Jan 2003 23:56:08 GMT, the renowned "Michael F. Coyle"
>> >The PIC BRG works well with 2.4576 MHz, 3.6864 MHz and 4.915 MHz. These
>> >frequencies will allow the BRG to be programmed to give the standard baud
>> >rates *exactly*. Why settle for less?
>> The errors @ 4MHz Fosc at 2400 and 9600 baud (BRGH = 1) are only about
>> 0.15%, which isn't much. More error in Fosc if you're using a 0.5%
>The 0.15% errors are for Fosc=16MHz, not 4.
Refer to table 12-5 on page 75:
9600 baud is actually 9615 (+0.16%) SPRG = 103
2400 is 2403 (+0.13%) SPRG = 25
>for example with Fosc = 4 MHz
>and BRGH=0 (low speed mode), the closest realizable baud rates to 9600 are
>8928 (7% low) and 10416.67 (8.5% high). This is with SPBRG set to 6 and 5,
Why would you use BRGH = 0? That increases the error to unacceptable
>> Is this a problem with the older PIC designs?
>Older PICs did have a problem with lots of receive errors in high-speed mode
Ah, okay, right, I have half a memory of that limitation. Here it is
from the (now obsolete) PIC16C73 errata:
1. Module: USART
When the USART (SCI) is configured in asynchronous
mode with the BRGH bit set, a high number of
receive errors may be experienced. For asynchronous
receive operations, it is recommended that the
USART be configured with the BRGH bit cleared.
> Most of these older parts have been fixed and hopefully new parts
>don't have the bug.
I just finished a design, using the 16F628, with a calibration/setup
port running at 9600 baud/4MHz and noticed NO problems at all. I'd say
not to worry about it; it's history.
"it's the network..." "The Journey is the reward"
email@example.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com