mcs9212dt256b setting clock rates for serial communication

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

mcs9212dt256b setting clock rates for serial communication

1,429 Views
Franklin
Contributor I
Hi,

I'm trying to set up my mcu to use the serial port, at 115200 baud, and would also like the processor as fast as possible. The serial communication works when I set my oscillator freq. at 4.0 MHz, and enable PLL, and set internal bus clock at 24 (PLL clock at 48)

Is there any way I can increase my oscillator frequency and still have the serial communication work? how are these values calculated(so I can do it myself in the future) ? why is it like this?

Also, I keep getting a linker warning L1937 the LINK_INFO entries for OSCFREQUENCY have a multiple different contents. It was 4000000 before and in addition is 24000000 from AD2.c.o   (IO.Map.c.o)

If anyone can tell me how to set up the serial monitor that would solve my problem as well... I loaded the program SerMon on to the microcontroller, and now I'm trying to debug using the serial monitor, but keep getting error messages "could not connect to hardware."  "HI-WAVE Fatal Error" "


Message Edited by Franklin on 2009-01-28 05:09 AM
Labels (1)
0 Kudos
Reply
1 Reply

389 Views
mculater
Contributor III

OscFreq is defined in the Serial Monitor .def file as your board's crystal frequency.  You can use as high as a 16MHz crystal with the DT256.

From the Serial Monitor source code:
BusFreq = ((OscFreq/(initREFDV+1))*(initSYNR+1))
baud115200    equ    (BusFreq/16)*10/1152

The above equations come from the Device Guide sections detailing the clock and oscillator operations.

Again, make sure you choose the correct target MCU and OscFreq in the Serial Monitor .def file before assembling and loading the serial monitor into your board.

Best regards,
Carl Barnes
www.technologicalarts.com
A full line of HC11/HC12/HCS12 hardware.
Evaluate * Educate * Embed

0 Kudos
Reply