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 CCS Technical Support

UART problem in rate of it

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



Joined: 29 Jun 2010
Posts: 33

View user's profile Send private message Yahoo Messenger

UART problem in rate of it
PostPosted: Sat Sep 18, 2010 10:22 pm     Reply with quote

I need UART communication and I use 32.768KHz crystal for PIC16F876. I set 9600 baud rate. But my compiler report me an error about it. Please help me ASAP.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Sep 18, 2010 10:41 pm     Reply with quote

See this thread about the Picbaud program:
http://www.ccsinfo.com/forum/viewtopic.php?t=37250
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Sun Sep 19, 2010 1:48 am     Reply with quote

And, 'think about it' for a moment. The UART divider is fed from the master clock/4. 32768/4 = 8192. What 'hope' is there to generate a clock at 9600Hz, by then dividing this...
You simply have no hope of operating at 9600bps, from a 32768 crystal. Now, if you switched to 38400Hz for your crystal, you might be able to get things working, but even then, you are going to need huge gaps between the characters, since it takes several dozen machine cycles to process a character...
You need more processor speed to have any chance of getting this to work.

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