Hi,
I tried to compile the code, specifically:And it compiles and assembles for the 16F1509 without any error messages or warnings using PBPX 3.0.7.4 and MPASM 5.45.Code:#CONFIG __config _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _MCLRE_ON & _CP_OFF & _CLKOUTEN_OFF & _PWRTE_OFF & _BOREN_OFF __config _CONFIG2, _LVP_OFF & _LPBOR_OFF #ENDCONFIG #define OSC 4 OSCCON=%01101000 ' 4MHz internal TRISC=0 PORTC=0 LED0 var PORTC.0 Start: LED0=1 Pause 500 LED0=0 Pause 500 Goto Start
What version of MPASM are you using?
As for the DEFINE vs #DEFINE.... Yes both are valid but different and in this case you DO want DEFINE OSC 4 - without the # - but it's not related to the error message you get.
See section 2.3.3 (DEFINEs defined) as well as section 4.10 (#DEFINE) in the manual.
/Henrik.




Bookmarks