Got a couple problems going on here ...
First the funky Config lines...
I came up with that quite some time ago as a way to shorten the __CONFIG lines in the editor.
It's been passed around a bit, and Hank had it right(almost) in the first post.
With the exception that _MCLRE_ON was duplicated(not a problem) it was perfect.
After time moves on, I tend to do it more like this now ... (16F690)
Code:
ASM
cfg= _XT_OSC ; Oscillator Selection
cfg=cfg& _FCMEN_OFF ; Fail-Safe Clock Monitor
cfg=cfg& _IESO_OFF ; Internal External Switchover
cfg=cfg& _BOR_OFF ; Brown-out Reset
cfg=cfg& _CPD_OFF ; Data Code Protection
cfg=cfg& _CP_OFF ; Code Protection
cfg=cfg& _MCLRE_ON ; Master Clear Reset
cfg=cfg& _PWRTE_ON ; Power-up Timer
cfg=cfg& _WDT_OFF ; Watchdog Timer
__CONFIG cfg
ENDASM
The second problem here is Indentation.
The forum tends to scrunch everything up to the left side if you don't use a [code][/code] block.
Copying snippets from the forum often leads to problems if you forget about the indentation. Especially when it's ASM code.
Take a look at the original examples for DT_INTS and you can see the proper indentation for the ASM statements.
Indentation applies to the @ operator too.
Removing the space between the @ and INT_ENABLE etc, does not do what you want it to do. That space must be there.
<br>
Bookmarks