CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Hardware rs232 baud rate limit

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Anders Svensson
Guest







Hardware rs232 baud rate limit
PostPosted: Tue Apr 05, 2005 5:06 am     Reply with quote

Hi,
I am new to PIC, so would appreciate somebody can help.
I am using pic16c73 with 32.768Khz crystal. The pin C6, C7 connect to a maxim rs232 transceiver, then to a DB9 connector.
Can i get 115bps baud rate? What is the maximum baud rate i can get using this crystal and 115kbps rs232 transceiver?
Thanks.
Svensson
Anders Svensson
Guest







PostPosted: Tue Apr 05, 2005 7:10 am     Reply with quote

should be: "Can i get 115kbps baud rate?"
Sorry
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Tue Apr 05, 2005 7:12 am     Reply with quote

With a 32Khz crystal you should be able to get 115 baud, but certaily not 115 kilo baud! You may be lucky to get 1200 baud. Look at the UART section of the datasheet and see what UART divisors are available.
The speed of the transciever only puts an upper limit on the baud rate. It can't help a slow uP clock.
_________________
The search for better is endless. Instead simply find very good and get the job done.
Ttelmah
Guest







PostPosted: Tue Apr 05, 2005 7:16 am     Reply with quote

The 'range', depends slightly on the chip. Latter chips, have a more complex baud rate generator, than the older processors, allowing larger divisors. The rates available on the normal chips, are the (crystal frequency/16)/(1 to 256)
and the same with a 64 for the first divisor.
So for a 32768Hz crystal, the maximum baud rate available, is:
(32768/16)/1 = 2048bps. The slowest rate available, is:
(32768/64)/256 = 2bps.
115bps, can be got 'close', with a primary divisor of 16, and a secondary of 18 (actual value=17 in the internal register), giving:
(32768/16)/18 = 113.7bps, which is only just over a 1% error.
Unfortunately most 'standard' rates are not even divisions from the 32768 crystal, which is generally designed/used for timekeeping functions, rather than serial comms.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group