Menu

problems with interrupts

2011-10-11
2013-05-30
  • Patrice Kempynck

    hello
    i' m newbie with pics and GCBG and my english is very poor.
    I had a problem with interupt routine

    Interrupt

    ;********************************************************************************

    ;Save Context
    movwf SysW
    swapf STATUS,W
    movwf SysSTATUS
    incf SysIntOffCount,F
    banksel STATUS
    ;Store system variables
    movf SysWaitTempMS,W
    movwf SaveSysWaitTempMS
    movf SysWaitTempMS_H,W
    movwf SaveSysWaitTempMS_H
    movf DelayTemp2,W
    movwf SaveDelayTemp2
    movf DelayTemp,W
    movwf SaveDelayTemp
    movf PCLATH,W
    movwf SavePCLATH
    clrf PCLATH
    ;On Interrupt handlers
    btfss INTCON,INTE
    goto NotINTF
    btfss INTCON,INTF
    goto NotINTF
    call INTERRUPT
    bcf INTCON,INTF
    goto INTERRUPTDONE
    NotINTF
    ;User Interrupt routine

    this is generated by gcb and you can see  test of interupt b.0 call interrupt and the stack overflow

    Actually i correct this handly with mpasm but i lovely use only gcbc, cause is  a great job. Thanks.

     
  • Nobody/Anonymous

    sorry, the mistake is my fault.
    my subroutine was named 'Interrupt' who seems a reserved word. I had the same problem with the constant out = Portb, out seems also a reserved word
    thanks for the program . Very useful. Very good job

     

Log in to post a comment.