Need 4 modes with just 3 switches - need all modes to be selectable QUICKLY!


Results 1 to 40 of 68

Threaded View

  1. #29
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    Ok, I'm home now.....here are the compile errors...

    Error[116] : Address label duplicated or different in second pass (_305AfterUserRoutine)
    Error[116] : Address label duplicated or different in second pass (_305NoInt)
    Error[116] : Address label duplicated or different in second pass (INT_EXIT)
    Error[116] : Address label duplicated or different in second pass (_290OverCREATE)
    Error[116] : Address label duplicated or different in second pass (L00001)
    Error[116] : Address label duplicated or different in second pass (L00002)
    Error[116] : Address label duplicated or different in second pass (L00003)


    .....and so on.

    Like I say I think it's to do with both interupt handlers being enabled?

    Which prompts me, how should two interupt handlers be coded wrt 'returns'. Should it look like this (wrt IOC Interupts, I've stripped it back to basics & removed the disabling/enabling in the interupt handler here.... just for easiness on the eye)

    Code:
    LED1   VAR  PORTB.1
    
    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  RABC_INT,  _Switch_Interupt,   PBP,  no
            INT_Handler   TMR1_INT,  _ToggleLED1,   PBP,  yes
        endm
        INT_CREATE               ; Creates the interrupt processor
    ENDASM
    
    T1CON = $31                ; Prescaler = 8, TMR1ON
    @ INT_ENABLE  TMR1_INT     ; enable Timer 1 interrupts
    @ INT_ENABLE RABC_INT 
    
    Main:
      PAUSE 1
    GOTO Main
    
    '---[TMR1 - interrupt handler]--------------------------------------------------
    ToggleLED1:
         TOGGLE LED1
    @ INT_RETURN
    
    '---[ioc Interupt Handler]------------------------------------------------------
    Switch_Interupt:
    TOGGLE LED2
    @ INT_RETURN

    Many thanks.
    Last edited by HankMcSpank; - 12th August 2010 at 18:52.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts