mcs9212dt256b setting clock rates for serial communication

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

mcs9212dt256b setting clock rates for serial communication

1,433件の閲覧回数
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
ラベル(1)
0 件の賞賛
返信
1 返信

393件の閲覧回数
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 件の賞賛
返信