Re: PIC18 RS232無法定義問題
|
||||
---|---|---|---|---|
資深會員
|
你可以從C:\MCC18\src\pmc_common\USART下去看,v7簡言之,每個ic好像都有它的指令的版本, 我覺得只有稍有不同而以,我用pic4520就是v5的
發表於: 2010/1/30 19:12
|
|||
|
Re: PIC18 RS232無法定義問題
|
||||
---|---|---|---|---|
版主
|
看一下這個檔案的說明:
C:/MCC18/doc/periph-lib/USART.htm 該文件裡指出 PIC18F8722 是歸類在 V7 的元件... EAUSART_V7 18F6527, 18F6622, 18F6627, 18F6722, 18F8527, 18F8622, 18F8627,18F8722, 18F65J10, 18F65J15, 18F66J10, 18F6615, 18F67J10,18F85J10, 18F85J15, 18F86J10, 18F86J15, 18F87J10
發表於: 2010/1/29 16:32
|
|||
|
Re: PIC18 RS232無法定義問題
|
||||
---|---|---|---|---|
新會員
|
感謝版主
1.我改成ZIP了!麻煩查收 2.V7是什麼阿@@?能說明一下嗎.. 謝謝
發表於: 2010/1/29 16:15
|
|||
|
Re: PIC18 RS232無法定義問題
|
||||
---|---|---|---|---|
版主
|
1. rar 壓縮檔在本網站無法使用,請改用 zip
2. PIC18F8722 有兩組 USART 的 (USART1 & USART1),且被歸類在 V7 的版本,你用 USART 就會找不到,你要將程式都指向 USART1 才可以的。參考一下 C:\MCC18\doc\periph-lib.uart.html 檔案的說明。還有 v7 版的 UART 定義檔案 UART.H 也要參考一下其參數的定義字,並將此 UART.H 檔 include 進來後才不會有找不到 prototype 的警告。
發表於: 2010/1/29 15:55
Edited by Ryang on 2010年01月29日 17:02:42
|
|||
|
PIC18 RS232無法定義問題
|
||||
---|---|---|---|---|
新會員
|
----------------------------------------------------------------------
Debug build of project `C:\TEST\RS232\111.mcp' started. Language tool versions: mpasmwin.exe v5.34, mplink.exe v4.34, mcc18.exe v3.34 Preprocessor symbol `__DEBUG' is defined. Fri Jan 29 14:20:21 2010 ---------------------------------------------------------------------- Clean: Deleting intermediary and output files. Clean: Done. Executing: "C:\MCC18\bin\mcc18.exe" -p=18F8722 /i"C:\MCC18\h" "11.C" -fo="11.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- MPLAB C18 v3.34 (evaluation) Copyright 2000-2009 Microchip Technology Inc. Days remaining until evaluation becomes feature limited: 18 C:\TEST\RS232\11.C:39:Warning [2058] call of function without prototype C:\TEST\RS232\11.C:81:Warning [2058] call of function without prototype C:\TEST\RS232\11.C:115:Warning [2058] call of function without prototype C:\TEST\RS232\11.C:116:Warning [2058] call of function without prototype C:\TEST\RS232\11.C:121:Warning [2058] call of function without prototype C:\TEST\RS232\11.C:122:Warning [2058] call of function without prototype C:\TEST\RS232\11.C:127:Warning [2058] call of function without prototype C:\TEST\RS232\11.C:128:Warning [2058] call of function without prototype C:\TEST\RS232\11.C:130:Warning [2058] call of function without prototype C:\TEST\RS232\11.C:131:Warning [2058] call of function without prototype C:\TEST\RS232\11.C:132:Warning [2058] call of function without prototype C:\TEST\RS232\11.C:133:Warning [2058] call of function without prototype Executing: "C:\MCC18\bin\mplink.exe" /p18F8722 /l"C:\MCC18\lib" /k"C:\MCC18\bin\LKR" /k"C:\Program Files\Microchip\MPASM Suite\LKR" "11.o" /u_CRUNTIME /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /m"111.map" /w /o"111.cof" MPLINK 4.34, Linker Copyright (c) 2009 Microchip Technology Inc. Error - could not find definition of symbol 'ReadUSART' in file './11.o'. Errors : 1 Link step failed. ---------------------------------------------------------------------- Debug build of project `C:\TEST\RS232\111.mcp' failed. Language tool versions: mpasmwin.exe v5.34, mplink.exe v4.34, mcc18.exe v3.34 Preprocessor symbol `__DEBUG' is defined. Fri Jan 29 14:20:23 2010 ---------------------------------------------------------------------- BUILD FAILED -------------------------------------------------------------------------- 我是用書的範例去跑,該設定的都有設定了,就是無法編譯成功... 就卡ReadUSART這句話上面,麻煩各位大大救救小弟吧... Mplab IDE 8.40 mcc18 3.34 有附加檔案 解壓縮兩個資料夾 ex12_1_UART資料夾為書本的範例程式 完整沒動過的 打開會有找不到路徑...LKR的困擾 有稍微改過之後是可以編譯成功的!但我要用的IC是18F8722 改了之後就完全不能編譯@@" 所以又再建一個新的專案 RS23資料夾就是新專案 程式碼是複製貼上的,但編譯之後就會有上面的那些錯誤訊息!~ --------------------------------------------------------------- 另一個問題,就是範例程式改個IC使用需要設定哪些部份?? 我改過就完全不能編譯, 我只改兩個部分 #include <p18f8722.h> //納入微控制器定義檔 還有configure=>SELECT DEVICE選擇8722 然後改回原本的4520也變成不能編譯... 真是神奇~"~大大們救救我這個新手吧= = Attach file: Link only for registered users
發表於: 2010/1/29 15:36
Edited by po6666 on 2010年01月29日 16:04:03
|
|||
|