發新話題
打印

[問題]請教F320 Target board RS232輸出的疑問

[問題]請教F320 Target board RS232輸出的疑問

請教版主,我在試著用F320的Target board做rs232的資料輸出時發生一個奇怪的問題?不知是否可以幫助解答。

當F320的板子是吃外部電源或是小白的電源時,RS232的資料輸出是正確的;
但是當板子改成吃USB的電源時,RS232的資料輸出,就會產生錯誤,這是為什麼?
還是我設定上出錯,以下是小弟的設定,若有錯誤,煩請教正。

IO Port設定:
P0MDOUT=0x54;
XBR0=0x01;
XBR1=0x40;

SYSTEM CLOCK設定:
unsigned char loop= 0;
OSCICN|= 0x83;
CLKMUL= 0x80;
for(loop= 0; loop< 20; loop++);
CLKMUL|= 0xC0;
while((CLKMUL& 0x20)== 0);
CLKSEL= 0x02;

鮑率設定為: 19200 bps

TOP

應該是你板子上的jmp設定問題
還有 Vbus+regin要短路
就是 Vdd 與 3dv要短路 大概是這樣~

TOP

謝謝版主的指導,我試了結果是將JP2和JP11各自都短路就可以正常了,但是C8051F32X  DEVELOPMENT  KIT  US E R ’S GU ID E卻寫只能單一個,那我這麼做會不會有什麼問題呢?

6.5.  USB Self-powered Configuration (J2, J11)
The C8051F320 target board can be configured as a self-powered USB device to take power from the USB cable instead  of  the  ac/dc  adapter  connected  at  P1.  To  configure  the  target  boards  as  a  self-powered  USB  device, remove the shorting block from J2 and install on J11. (A shorting block should only be installed on J2 or J11, never
both at the same time.) Install shorting blocks in the following manner:
J2(ON) & J11(OFF) →Target Board is powered from the ac/dc Adapter at P1.
J2(OFF) & J11(ON) →Target Board is powered from the USB connection

[ 本帖最後由 ping 於 2009-10-8 13:57 編輯 ]

TOP

usb供電 是vdd輸出電壓
power供電是 vdd輸入電壓
兩個都接 ,vdd有可能會輸出電壓  也會輸入電壓
所以不可以這樣接

TOP

發新話題