Quote Originally Posted by Darrel Taylor View Post
I like the 683 too. If for nothing more than the CCP module. Of course the extra RAM and program space is also handy.

With the 629 only having 64 bytes of RAM,
PBP uses 24-26 bytes
and DT_INTS-14 and ReEnterPBP want 31 bytes of it (without T? vars)

Which only leaves about 6-7 bytes for the program. Not much you can do with that.

But, when using ASM interrupt handlers, DT_INTS-14 only needs 7 bytes of RAM, leaving around 38 bytes for the users program. Now that, is workable. It also uses less program space that way.

You mentioned earlier that you only needed to toggle a pin in the interrupt, so you might take a look at this page...

DT_INTS-14 (Assembly Language Interrupts)
http://www.darreltaylor.com/DT_INTS-14/asm_ints.html

The ToggleLED1: handler does just that. And if the other handlers aren't too tuff, you might still fit it in a 629.

HTH,
  DT
Hi Darrel,
I tried this above tip to get back some RAM space to try put my old 12F683 code into a 12F629, but I get a persistent PBP error when I try to compile it.

error[101] d:temp\8chppm~3.asm 450: Error: (ReEnterPBP must be INCLUDEd to use PBP type interrupts)

I also fiddled the wsave value to get past other errors, but this one escapes me, due to not being very familiar with assembly I'd expect.

Heres my ASM code at the start of the program, what did I mess up ?
Thanks Martin
'Interrupt driven 20mS timer for PPM frame timing. See also "my_handler". Uses Timer 1 interrupts.
INCLUDE "DT_INTS-14.bas" ' Base Interrupt System
'INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts

ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler TMR1_INT, _my_handler, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
INT_ENABLE TMR1_INT ; Enable Timer 1 Interrupts

ENDASM

T1CON = $1 ; TMR1ON
'@ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts