View previous topic :: View next topic |
Author |
Message |
HGHK
Joined: 29 Jun 2010 Posts: 33
|
UART problem in rate of it |
Posted: Sat Sep 18, 2010 10:22 pm |
|
|
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
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Sun Sep 19, 2010 1:48 am |
|
|
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 |
|
|
|