Hi picster,
It just needs to be compiled with MPASM. You don't need to use MPLAB.
But you might consider dumping CDlite for MicroCode Studio. Not needed for the interrupt routines, just a better program.
<br>
Hi picster,
It just needs to be compiled with MPASM. You don't need to use MPLAB.
But you might consider dumping CDlite for MicroCode Studio. Not needed for the interrupt routines, just a better program.
<br>
DT
Hi Darrel, and Kudos to you for the work...Originally Posted by Darrel Taylor
Will MicroCode Studio run these interrupt routines "out of the box", or will I need to do some configuring/jockeying?
Thanks
Darrel,
Unfortunately, I could still use a little help here...
I regurgitated your little LED program in MicroCode Studio, and here's what I receive in errors:
--------------------------------------------------
'Interrupt test - PIC16F88
LED1 VAR PORTB.1
INCLUDE "DTINTS.BAS" 'base interrupt system (renamed only, not edited)
INCLUDE "REPBP.BAS" 'include if using PBP interrupts (as above)
Asm
INT_LIST macro ;IntSource, Label, Type, Resetflag?
INT_Handler INT_INT, _ToggleLED1, PBP, yes
endm
INT_CREATE ;creates the interrupt processor
INT_ENABLE INT_INT ;enable external (INT) interrupts
EndAsm
Main:
Pause 1
GoTo main
'----------[INT - interrupt handler]----------------
ToggleLED1:
Toggle LED1
@ INT_RETURN
------------------------------------------
Errors are as follows:
Error[113] g:\pbp\inttst.asm 115 : Symbol not previously defined (PIR2)
Warning[207] g:\pbp\inttst.asm 288 : Found label after column 1. (L?GoTo)
Error[122] g:\pbp\inttst.asm 288 : Illegal opcode (_SavePBP)
Warning[207] g:\pbp\inttst.asm 297 : Found label after column 1. (L?GoTo)
Error[122] g:\pbp\inttst.asm 297 : Illegal opcode (_ToggleLED1)
Warning[207] g:\pbp\inttst.asm 241 : Found label after column 1. (L?GoTo)
Error[122] g:\pbp\inttst.asm 241 : Illegal opcode (_RestorePBP)
(is there an easy way to copy this error list to clipboard? It seems to get lost every time I try, so I had to retype it manually here)
Attached is the inttst.asm file renamed to .txt
It should. It's been awhile since I installed MCS, but I remember it being pretty easy. Just select "use MPASM" in the View|Compile and Program options|Assembler dialog. Of course MPASM has to be installed already.Will MicroCode Studio run these interrupt routines "out of the box",
And for the program, the post says it's for a 16F88, but the ASM file shows it was compiled for a 16F84. Could be part of the problem.
<br>
DT
Thanks Darrel, you were right about the chip... the '84A doesn't have the PIR2 register, so it was undefined - this led to two of the errors.
I also found that in the DT_INTS-14.BAS file, I had to change the instances of "L?GoTo" to "LGoTo" to get rid of the other errors.
Now I can't wait to be interrupted!
Thanks again.
------------------Picster-------------------
picster,
When I compile your code from Post #4 for a 16F88, I don't get any errors. (except for the file names)
And, the L?GOTO's are there for a reason, and will not work if changed to LGoTo.
Since we know that you've edited the files, I would suggest downloading them again, without renaming or editing.
<br>
DT
Darrel,
I just reproduced what you got. For some unknown reason, I wasn't getting that before, and I have NO clue why. I suspect I was messing something up in the MCS (not having the right window selected, or the right PIC selected, or something equally daft).
All is "back the way it was" and it seems to compile fine now. Anyway, thanks for sorting this out with me, much appreciated.
----------------------Picster---------------------
Bookmarks