Re: MPLAB C18的使用
|
||||
---|---|---|---|---|
版主
|
master 大大已經告訴你了,找找看是不是少了一個 s 。
另外你有用 include 將相對應元件的 H 檔加進來嗎?
發表於: 2008/1/16 13:45
|
|||
|
Re: MPLAB C18的使用
|
||||
---|---|---|---|---|
資深會員
|
'PORTAbit' has not been defined
^^^^^^錯誤訊息告訴你打錯字了...
發表於: 2008/1/16 12:18
|
|||
不要問我哪裡來,我只是個流浪天涯的工程師
|
||||
|
Re: MPLAB C18的使用
|
||||
---|---|---|---|---|
版主
|
RA3 這隻腳通常都有ADC與 Comparator 的功能,所以要將 RA3 當作 I/O 功能的話,第一步就是要先 Disable RA3 AD輸入與Comparator的功能。disable analog function 後就可以這樣寫:
#define LED PORTAbits,RA3 TRISAbits.TRISA3 = 0 ; Setc RA3 as output LED = 1; Set RA3 = 1
發表於: 2008/1/16 10:23
|
|||
|
MPLAB C18的使用
|
||||
---|---|---|---|---|
新會員
|
我想在C18编译器下,把PORTA的RA3引脚指定为led_green,要怎么定啊!请高手帮忙一下,不要用define,最好是使用volatile
發表於: 2008/1/15 17:34
|
|||
|