With a 12F629 my app gets lots of "beyond ram_end" messages; with a 12F683, only two, so I might be able to pare it down to fit.Originally Posted by Darrel Taylor
With a 12F629 my app gets lots of "beyond ram_end" messages; with a 12F683, only two, so I might be able to pare it down to fit.Originally Posted by Darrel Taylor
If you don't have any complex math formula's in the program, you can reduce the number of T?_Save variables.
From ReEnterPBP.bas...
T1_Save VAR WORD
T2_Save VAR WORD
T3_Save VAR WORD
T4_Save VAR WORD
Start with T4. Comment it out and recompile. If no error, try T3, etc.
Then try ...
RS1_Save VAR BYTE
RS2_Save VAR BYTE
Might save a few bytes of RAM.
Just remember to un-comment them if you write a program for another chip.
DT
I am trying to use the instant interrupts to add the funnctionality of interrupts to my programs but I am having problems with the example that found on Darryl's site. I was trying to do the example with turning a LED on and off with an external interrupt but I am having some problems. I have downloaded the latest files form Darryl's site and have saved them to same folder. I have copied the code from hiw webpage also.
I am using PICBASIC Pro vers.2.46
I am using the PIC16F687.
I am getting the following errors
Error TOGGLE~1.ASM 490 : [224] local directive only for use in macros
Error TOGGLE~1.ASM 490 : [225] undefined symbol 'iflagreg'
Error TOGGLE~1.ASM 490 : [226] numeric constant or symbol name expected
Error TOGGLE~1.ASM 490 : [201] ')' expected
Error TOGGLE~1.ASM 490 : [300] too many errors
I commented out the Wsave's that were not needed. I have some experiece with writing programs in assembly and working with interrupts. I have looked through the include files to see if I could make sense of what is going on but I am having problems figuring it out.
Can you direct to anywhere that will give me more information about macros? Any suggestions? Thanks for your time and help.
Josh
EDIT
Looking at the datasheet for the 16F687 there IS an External interrupt on RA2 instead of RB0. There is a Port change interupt on both Port A and B. Do I have to modify the file to include the interrupt on PortA? I would want to place any available interrupt pin that I can.
Last edited by jblackann; - 31st July 2006 at 17:31.
There's no math but it didn't help. I think I'll have to try to learn enough ASM for this application. I just need TMR0 to toggle a pin every 8-10mS and TMR1 to give me a 500µS or 1000µS interval after each TMR0 rollover.Originally Posted by Darrel Taylor
Hi Josh,
The INT_INT should work ok, even with it on PORTA.
For the Interrupt on change with PORTA and PORTB, just add these two lines in the ASM section right before the INT_LIST
RBIF = RABIF
RBIE = RABIE
(no space at the beginning of the line)
Then use RBC_INT. I'll add RABC_INT, C1_INT and C2_INT names in DT_INTS-14 later, but that should get you going for now.
HTH,
Darrel
dhouston,
For the 12F683...
Did you comment out the wsave2 and wsave3 variables in DT_INTS-14?
DT
Not until seeing your question. That seems to do it. It compiles and only uses 593 words so I think it will be OK, now.Originally Posted by Darrel Taylor
Will the pin change functions work with the 12F683?
Last edited by dhouston; - 1st August 2006 at 17:16.
Awesom,
Sure will.Will the pin change functions work with the 12F683?
Add these two lines in the ASM section right before the INT_LIST
RBIF = GPIF
RBIE = GPIE
(no space at the beginning of the line)
Then use RBC_INT.
<br>
DT
Bookmarks