Re: 30f4011 uart問題請教
|
||||
---|---|---|---|---|
資深會員
|
感謝jackylts/cct1210/master前輩的指點,已解決,問題就是在這理,直接設定是不錯的選擇
發表於: 2010/2/2 8:55
|
|||
不怕苦...苦半輩子;怕苦...苦一輩子
|
||||
|
Re: 30f4011 uart問題請教
|
||||
---|---|---|---|---|
資深會員
|
參照:
請參考http://www.microchip.com.tw/modules/n ... de=flat&order=ASC&start=0 拿掉UART_TX_PIN_NORMAL 這一行,編譯雖然過了,實際燒錄至硬體中uart中的TX,是完全沒訊號的,所以等於白搭. 順便小聲告訴你,若可以,直接設定有關uart暫存器的值會比較穩當的.
發表於: 2010/2/1 23:10
|
|||
|
Re: 30f4011 uart問題請教
|
||||
---|---|---|---|---|
資深會員
|
偷懶的話直接手動定義
#define UART_TX_PIN_NORMAL 0xF7FF 這行找不到似乎是因為用了4011以後,MACRO用了_dsPIC30F4011__後面定義區段,而不幸的的 UART_TX_PIN_NORMAL並沒有在其中。
發表於: 2010/2/1 19:46
|
|||
不要問我哪裡來,我只是個流浪天涯的工程師
|
||||
|
30f4011 uart問題請教
|
||||
---|---|---|---|---|
資深會員
|
請教各位前輩
我使用mplab 8.43 +C30 IC為dsPIC30F4011 使用周邊函式庫,我有加入<uart.h>header file 參考dsPIC30F_dsPIC33F_PIC24H_UART_Help.htm 為何下以下的參數時會有問題 U1STAvalue = UART_INT_TX_BUF_EMPTY & UART_TX_PIN_NORMAL & UART_TX_ENABLE & UART_INT_RX_3_4_FUL & UART_ADR_DETECT_DIS & UART_RX_OVERRUN_CLEAR; 出錯的地方在UART_TX_PIN_NORMAL 這一行 拿掉就OK了,以下為錯誤訊息 test.c:170: error: 'UART_TX_PIN_NORMAL' undeclared (first use in this function) test.c:170: error: (Each undeclared identifier is reported only once test.c:170: error: for each function it appears in.) test.c:195:2: warning: no newline at end of file 請問這是何原因,一直找不出來,謝謝!!!
發表於: 2010/2/1 10:47
|
|||
不怕苦...苦半輩子;怕苦...苦一輩子
|
||||
|