Re: 不好意思..我用8720的ic載入USART讀RS232似乎無法?
|
||||
---|---|---|---|---|
中級會員
|
解決了
後來我發現 如果可以載入 ReadUSART() 的ic..像是4620之類的 那就算不 #include<usart.h> 神奇的是他竟然也能讀到函式.. 似乎讀不讀的到 ReadUSART 的關鍵不是在於有的有#include<usart.h> 而我這個7820讀不到ReadUSART的原因是..7820有兩個TX RX腳 要載入 Read1USART 或 Read2USART 即可
發表於: 2009/2/17 9:41
|
|||
|
Re: 不好意思..我用8720的ic載入USART讀RS232似乎無法?
|
||||
---|---|---|---|---|
中級會員
|
還是無法呢...
主要是他的錯誤訊息是 Error - could not find definition of symbol 'ReadUSART' in file './a.o'. 感覺上, 它不是沒找到 .h 檔...而是在ojb和lib裡面找不到函式 我有試著不要用使用ReadUSART..且把所有的#include< >改為#include" " 發現 " " (雙引號) 他找.H的流程是...先在自己的project找尋 如果找不到的話, 也會至設定目錄找... 所以, 應該不是#include的地方有問題 我程式改成 < > 上傳一下 Attach file: Link only for registered users
發表於: 2009/2/12 12:01
|
|||
|
Re: 不好意思..我用8720的ic載入USART讀RS232似乎無法?
|
||||
---|---|---|---|---|
版主
|
抱歉! 出在 Windows 所提供的ZIP程式打不開,改安裝正式版的 ZIP就好了。
看你的程式對 H 檔的路徑錯誤 : #include <P18F8720.H> #include "usart.h" #include "stdio.h" 使用 ”xxxxx" 的引號是叫 MPLAB IDE 到目前 Project 的目錄下去尋找 H 檔。請改用 <xxxxx> 的方式,如此 MPLAB IDE 就會到 Default mcc18\h 的目錄去尋找。 #include <P18F8720.H> #include <usart.h> #include <stdio.h>
發表於: 2009/2/12 10:15
|
|||
|
Re: 不好意思..我用8720的ic載入USART讀RS232似乎無法?
|
||||
---|---|---|---|---|
版主
|
參照:
抱歉!我用 Wondows 所附的 UNZIP 程式打不開你的檔案。
發表於: 2009/2/12 9:49
|
|||
|
Re: 不好意思..我用8720的ic載入USART讀RS232似乎無法?
|
||||
---|---|---|---|---|
中級會員
|
奇怪了
我都有設定啊 我剛剛看了一下 設定的沒錯...@@
發表於: 2009/2/11 11:34
|
|||
|
Re: 不好意思..我用8720的ic載入USART讀RS232似乎無法?
|
||||
---|---|---|---|---|
新會員
|
應該是MPLAB include 路徑沒指定吧
Projece→Buidle Options→Project 在Directories頁面將include路徑指到C18安裝目錄的.\h 應該就可以使用了
發表於: 2009/2/10 23:37
|
|||
|
Re: 不好意思..我用8720的ic載入USART讀RS232似乎無法?
|
||||
---|---|---|---|---|
中級會員
|
這些我都有載進去
真奇怪 到現在還是不行 可否幫忙看一下... 我上傳程式 Attach file: Link only for registered users
發表於: 2009/2/9 19:53
|
|||
|
Re: 不好意思..我用8720的ic載入USART讀RS232似乎無法?
|
||||
---|---|---|---|---|
版主
|
抱歉 RAR 打不開,只用 ZIP 格式。
兩種原因 1. 是否忘了使用 UART 的函數要 #include <usart.h> 的宣告。2. lkr 檔一定要使用 MCC18 所提供的 LKR 檔,MPLAB IDE 目錄下所提供的LKR檔是給組合語言使用的,這兩者檔案名稱相同但內容不同,需注意。
發表於: 2009/2/6 15:34
|
|||
|
不好意思..我用8720的ic載入USART讀RS232似乎無法?
|
||||
---|---|---|---|---|
中級會員
|
我程式寫好後
像一般的方式使用Usart..結果似乎讀不到ReadUSART的lib 出現如下的訊息 Error - could not find definition of symbol 'ReadUSART' in file 不知道板大的經驗, 知道是發生什麼錯誤嗎? 我幾天前初學當晶片, 下載的程式都是滿新的板本, 應該不是版本問題吧?? 我把有問題的專案上傳了 Attach file: Link only for registered users
發表於: 2009/2/5 20:19
|
|||
|