Re: PIC10LF320 燒錄完成卻沒有動作
|
||||
---|---|---|---|---|
新會員
|
另外請教我用以下寫法編譯OK
#define LED_W PORTAbits.PORTA1 //PWM #define LED_Y PORTAbits.PORTA0 #define SW PORTAbits.PORTA3 但是使用下面的寫法卻出現錯誤訊息, #define LED_W RA1 //PWM #define LED_Y RA0 #define SW RA3 ,錯誤訊息是: "PIC10LF320-Pickit_4.c:26: error: (192) undefined identifier "RA1" PIC10LF320-Pickit_4.c:27: error: (192) undefined identifier "RA0" PIC10LF320-Pickit_4.c:28: error: (192) undefined identifier "RA3"" 請問為甚麼呢?
發表於: 2020/6/11 15:01
|
|||
|
Re: PIC10LF320 燒錄完成卻沒有動作
|
||||
---|---|---|---|---|
版主
|
HI-TECH PICC V9.83 是舊的編譯器,建議使用新的編譯器 XC8。
RA0 等位元定址要看 p10f320.h 檔裡是否有定義? 尋找一下: C:\Program Files (x86)\Microchip\xc8\v1.45\include C:\Program Files (x86)\Microchip\xc8\v2.05\pic\include
extern volatile __bit RA0 @ (((unsigned) &PORTA)*8) + 0;
發表於: 2020/6/12 11:05
|
|||
|