Searching \ for 'Buad timing- How close do I have to be?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=buad+timing+how
Search entire site for: 'Buad timing- How close do I have to be?'.

Truncated match.
PICList Thread
'Buad timing- How close do I have to be?'
1998\05\24@124658 by PHXSYS

picon face
Hi everyone

I hace a project where a stamp BS2 and a Pic16F84 are talking back and forth
on the same board (about an inch apart). The code utilizes 9600 baud. I have a
couple of questions.

1) For 9600 baud and bit timing should be 104us. The best I have been able to
do in my 16F84 program is 116us between bits, due to the way I have
implemented the code. This  is consistent for both the serout and serin
routines. Can I communicate effectively with the BS2 with the slight offset in
timing? The BS2 will utilize its standard serin/out commands.

2) What kind of limitations do I have for baud rate in this application? Can I
run at 19,200 or even higher?

Thanks in advance

Jon

1998\05\24@191842 by Mike Keitz

picon face
On Sun, 24 May 1998 12:46:23 EDT PHXSYS <spam_OUTPHXSYSTakeThisOuTspamAOL.COM> writes:

>1) For 9600 baud and bit timing should be 104us. The best I have been
>able to
>do in my 16F84 program is 116us between bits, due to the way I have
>implemented the code. This  is consistent for both the serout and
>serin
>routines. Can I communicate effectively with the BS2 with the slight
>offset in
>timing? The BS2 will utilize its standard serin/out commands.

You can have a slight difference, but 10% is too much.  About 5% is the
limit.  Usually a PIC crystal can be selected so the baud rate works out
exactly with your software approach.

>2) What kind of limitations do I have for baud rate in this
>application? Can I
>run at 19,200 or even higher?

There is no problem running high baud rates over a short TTL-level link.
It will work as fast as your software can go.

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\05\25@005113 by tjaart

flavicon
face
PHXSYS wrote:

> Hi everyone
>
> I hace a project where a stamp BS2 and a Pic16F84 are talking back and forth
> on the same board (about an inch apart). The code utilizes 9600 baud. I have a
> couple of questions.
>
> 1) For 9600 baud and bit timing should be 104us. The best I have been able to
> do in my 16F84 program is 116us between bits, due to the way I have
> implemented the code. This  is consistent for both the serout and serin
> routines. Can I communicate effectively with the BS2 with the slight offset in
> timing? The BS2 will utilize its standard serin/out commands.
>
> 2) What kind of limitations do I have for baud rate in this application? Can I
> run at 19,200 or even higher?

Start off with a crystal that will give you zero error. They are available closeto most 'popular'
frequencies. 1.8432MHz, 3.6864MHz, and 11.0592MHz
spring to mind.

You can get all the standard baud rates with these crystals.

I can't remember the other frequencies, but I'm sure someone would
add to this message.

--
Friendly Regards

Tjaart van der Walt
.....tjaartKILLspamspam@spam@wasp.co.za

|--------------------------------------------------|
|                WASP International                |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
|SMS 0832123443spamKILLspamwasp.co.za  (160 chars max)|
|     http://www.wasp.co.za/~tjaart/index.html     |
|Voice: +27-(0)11-622-8686  Fax: +27-(0)11-622-8973|
|          WGS-84 : 26¡10.52'S 28¡06.19'E          |
|--------------------------------------------------|

1998\05\25@114743 by Matt Bonner

flavicon
face
Tjaart van der Walt wrote:
>  1.8432MHz
  2.4576MHz ... Any more?
>  3.6864MHz
>  11.0592MHz

> You can get all the standard baud rates with these crystals.
>
> I can't remember the other frequencies, but I'm sure someone would
> add to this message.

1998\05\25@124208 by Mike Keitz

picon face
On Mon, 25 May 1998 09:44:04 -0600 Matt Bonner <.....mbonnerKILLspamspam.....SUNADA.COM>
writes:
>Tjaart van der Walt wrote:
>>  1.8432MHz
>   2.4576MHz ... Any more?
>>  3.6864MHz
>>  11.0592MHz
>
>> You can get all the standard baud rates with these crystals.

There are two major 'series' of frequencies, with standard crystals
available at each power of 2 in the series:

(9600 * 192): 1.8432, 3.6864, 7.3728, 14.7456 MHz
(9600 * 256): 2.4576, 4.9152, 9.8304, 19.6608 MHz

A 9.8304 is a good match for a 10 MHz PIC16F84, or 19.6608 with a PIC
rated for 20 MHz.  Most 4 MHz PICs have no problem with 4.9152, but use
3.6864 to be safe.  Also fairly common are 18.432 (1.8432 * 10) and
11.0592 (1.8432 * 6).  The latter is very popular with 8051 type
controllers because of the way they divide the clock.  Frequencies of
6.144 (9600 * 640) and 12.288 MHz were commonly used with Intel parts
rated for 6 or 12 MHz respectively.


_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\05\25@132825 by White Horse Design

flavicon
face
At 09:44 25/05/98 -0600, you wrote:
>Tjaart van der Walt wrote:
>>  1.8432MHz
>   2.4576MHz ... Any more?
>>  3.6864MHz
>>  11.0592MHz
>
>> You can get all the standard baud rates with these crystals.
>>
>> I can't remember the other frequencies, but I'm sure someone would
>> add to this message.

7.3728
9.2160 etc (I'm using these 2)

Basically if it's correct (0% error) for 1.8432MHz (or for a lower Xtal
frequency) then (because the baud rate divisor is a power of 2) then take
any multiple you like!

(Except I get 2.7648 instead of the above 3.4576)

The above is for BRGH=0, modify accordingly (factor of 16) for BRGH=1 (or
whatever).

Regards

Adrian

WWW    WWW   Adrian Gothard
WWW WW WWW   White Horse Design
WWWWWWWWWW   +44-385-970009 (Mobile/SMS), +44-118-962-8913/4 (voice/fax)
WWWW  WWWW   EraseMEwhdspam_OUTspamTakeThisOuTzetnet.co.uk, http://www.users.zetnet.co.uk/whd
---
Developers of GPS satellite-based tracking systems

1998\05\25@133836 by White Horse Design

flavicon
face
At 12:46 24/05/98 EDT, you wrote:
>Hi everyone
>
>I hace a project where a stamp BS2 and a Pic16F84 are talking back and forth
>on the same board (about an inch apart). The code utilizes 9600 baud. I
have a
>couple of questions.
>
>1) For 9600 baud and bit timing should be 104us. The best I have been able to
>do in my 16F84 program is 116us between bits, due to the way I have
>implemented the code. This  is consistent for both the serout and serin
>routines. Can I communicate effectively with the BS2 with the slight
offset in
>timing? The BS2 will utilize its standard serin/out commands.
>
>2) What kind of limitations do I have for baud rate in this application?
Can I
>run at 19,200 or even higher?

I just replied to your later message.

If you're doing this in software (or hardware for that matter) I always aim
for an error of less than 1%, and I try to get the best I possibly can
especially when using equipment with different UARTs or unknown UARTs.

For a software implementation, check for the start bit periodically (or
have it interrupt driven) then start a (software or hardware) timer for
half the bit time. Resample the start bit if valid, start a counter for one
bit time (then you'll be in the middle of bit 0 (lsb comes first of
course), repeat 5/6/7/8 times (or 1 more than each of these if you have a
parity bit).

As a "slight cheat" I sample about 1/4 after the bit transition time since
I am using a software implementation with various polling delays within the
start bite period time.

Regards

Adrian

WWW    WWW   Adrian Gothard
WWW WW WWW   White Horse Design
WWWWWWWWWW   +44-385-970009 (Mobile/SMS), +44-118-962-8913/4 (voice/fax)
WWWW  WWWW   whdspamspam_OUTzetnet.co.uk, http://www.users.zetnet.co.uk/whd
---
Developers of GPS satellite-based tracking systems

1998\05\25@145422 by Karsten Krause

flavicon
face
Hi Matt,

please excuse my writing to you, but I just subscribed to the piclist.
I subscribed for the digest version. Since all my emails are answered
by their machine :( - do you have any ideas if there is such an option
as digest possible ?

Thanks,
Karsten

1998\05\25@174847 by Matt Bonner

flavicon
face
Karsten Krause wrote:
>
> Hi Matt,
>
> please excuse my writing to you, but I just subscribed to the piclist.
> I subscribed for the digest version. Since all my emails are answered
> by their machine :( - do you have any ideas if there is such an option
> as digest possible ?
>
Since I seem to be the only Matt who has contributed to the baud timing
thread, I'll assume this is addressed to me :-)

The following is from an Andy Warren post this morning (easier than
going into my 'Lists' folder where I keep _all_ my list subscribe
information - don't we all?):

To subscribe to the PICLIST, send a message to:

   @spam@listservKILLspamspammitvma.mit.edu

with the following in the BODY of the message (the message subject is
unimportant):

   subscribe piclist
   set piclist repro
   end

Once you're subscribed, you can switch to digest mode by sending
the following to the same address:

   set piclist digest
   end

--Matt

1998\05\26@153819 by rank A. Vorstenbosch

flavicon
picon face
Mike Keitz wrote:
>
> On Mon, 25 May 1998 09:44:04 -0600 Matt Bonner <KILLspammbonnerKILLspamspamSUNADA.COM>
> writes:
> >Tjaart van der Walt wrote:
> >>  1.8432MHz
> >   2.4576MHz ... Any more?
> >>  3.6864MHz
> >>  11.0592MHz
> >
> >> You can get all the standard baud rates with these crystals.
>
> There are two major 'series' of frequencies, with standard crystals
> available at each power of 2 in the series:
>
> (9600 * 192): 1.8432, 3.6864, 7.3728, 14.7456 MHz
> (9600 * 256): 2.4576, 4.9152, 9.8304, 19.6608 MHz

Also, you can buy 3.579545MHz and 14.318MHz crystals -- these are based on the
NTSC colour burst frequency, and due to their appearance in colour TVs
(especially the former) they are very cheap.

For the 3.58MHz crystal you need a bit loop of 93 instructions, with an
accuracy of better than 0.07%.

Frank
------------------------------------------------------------------------
Frank A. Vorstenbosch    <UCE_ACCEPT="NONE">    Mobile:  +44-976-430 569
Wimbledon, London SW19                          Home:   +44-181-544 1865
RemoveMEfrankTakeThisOuTspamfalstaff.demon.co.uk                      Office: +44-181-636 3391

1998\05\26@175800 by Tom Handley
picon face
  Mike, to follow-up, I've been looking into crystals as part of my
PIC-based logic analyzer. For folks using the 16C76/77 parts, the following
common crystals will provide 115.2Kbaud and 0% error with BRGH = 1:

      3.6864 Mhz -> SPBRG = 1
      7.3728 Mhz -> SPBRG = 3
     11.0592 Mhz -> SPBRG = 5
     14.7456 Mhz -> SPBRG = 7
     18.4320 Mhz -> SPBRG = 9

  - Tom

At 12:39 PM 5/25/98 -0400, Mike Keitz wrote:
{Quote hidden}

1998\05\27@005303 by tjaart

flavicon
face
Frank A. Vorstenbosch wrote:

{Quote hidden}

True. If you calculate BRGH for 3.6864MHz for 2400 baud or 9600 baud,you can get away with the
3.579545MHz crystal if you can't get any 3.6's.

--
Friendly Regards

Tjaart van der Walt
RemoveMEtjaartspamTakeThisOuTwasp.co.za

|--------------------------------------------------|
|                WASP International                |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
|SMS 0832123443EraseMEspam.....wasp.co.za  (160 chars max)|
|     http://www.wasp.co.za/~tjaart/index.html     |
|Voice: +27-(0)11-622-8686  Fax: +27-(0)11-622-8973|
|          WGS-84 : 26¡10.52'S 28¡06.19'E          |
|--------------------------------------------------|

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...