Serial Communications Interface Module

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Serial Communications Interface Module

Jump to solution
1,113 Views
JPSB
Contributor I

Hi,

 

I'm trying to do a simple RS-232 link that must work at 9600bps.

The problem is that the xtal conected to my cpu (MC68HC908AP64A) has a frequency of 4MHz. And according to the cpu datasheet the baud rate is given by the following formula:

baud rate = CGMXCLK / (64 x PD x BD)

 

Since PD allowed values are 1; 3; 4 or 13, and BD allowed values are 1; 2; 4; 8; 16; 32; 64; or 128, there is no combination that results at approximately 9600. The maximum speed that I can successfully transmit/receive is 4800bps. Strangely I've already seen the same hardware configuration working at 9600bps!

How can I manage to do that?

Is there any way to double the internal clock speed using the same xtal?

 

King Regards.

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
469 Views
Lundin
Senior Contributor IV
Perhaps the configuration you saw used the internal oscillator. You can choose to route the SCI clock from external or internal clock in the CONFIG2 register. How accurate the internal oscillator is, I have no idea.

The best & easiest solution seems to be changing the crystal to 4.9152 or 9.8304 MHz.

View solution in original post

0 Kudos
Reply
1 Reply
470 Views
Lundin
Senior Contributor IV
Perhaps the configuration you saw used the internal oscillator. You can choose to route the SCI clock from external or internal clock in the CONFIG2 register. How accurate the internal oscillator is, I have no idea.

The best & easiest solution seems to be changing the crystal to 4.9152 or 9.8304 MHz.
0 Kudos
Reply