I am using a MC9S08QE32. I need to have a 125KHz square wave on one
of the PWM channels and a 115200 baudrate on one of the SCIs. I am
using a 16MHz crystal oscillator, and so far I have figured out the
Processor expert settings to get the 125KHz on PWM but cannot figure out
how to get the 115200 on the SCI at the same time.
How can I achieve this? If it is not possible with this clock source, what
changes do I need to make to achieve this? using an external clock source
is highly preferred.
Thanks
Hi,
Since you are using a 16MHz external crystal oscillator, the bus clock is 8M.
The SCI band Rate is 8M /(16*[ SBR12:SBR0]) . The nearest baud rate to 115200 is 131072bps, in this case SBR should be set to 4. The error is more than 10%. So 115200 is not a recommended SCI speed for your application based on the current hardware design.
Fiona Kuang
Technical Information & Commercial Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Fiona,
Thanks for your reply. 115200 baud rate is a requirement and so is the 125KHz square wave. Can you think of a way that I can have both at the same time?
I was looking at using an external clock source for one timer and the changing the 16MHz xtal to a 7.3728MHz to achieve the 115200 baud rate. But I just cannot figure out how to set up a timer module to work off of an external clock source in PE.
Any suggestions?