DT Interupts and ICD?


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2009
    Location
    Boise, Id
    Posts
    44

    Cool DT Interupts and ICD?

    So, I'm back to breaking things again...I've been using the ICD and boot loader in MicroCode Studio Plus with much joy! I haven't however been able to get the Interupts and ICD to work together. I get an error "ICD Address Mismatch".

    I have tried the debug disable and debug enable with the same results.

    Is it possible to use ICD and DT Interupts together? Both are working great until combined.

    ICD works until I include the following code. I'm using an 18F2550

    Code:
    Disable debug
    INCLUDE "DT_INTS-18.bas"     ; Base Interrupt System
    INCLUDE "ReEnterPBP-18.bas"     ; Include if using PBP interrupts
    INCLUDE "Elapsed_INT-18.bas"  ; Elapsed Timer Routines
    
    ASM
    INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
                INT_Handler    TMR1_INT,  _ClockCount,   PBP,  yes
                  
            endm
            INT_CREATE               ; Creates the interrupt processor
        ENDASM
    @ INT_ENABLE    TMR1_INT 
    enable debug
    Thanks for any input you may have
    Shane

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I find it's best to put a PAUSE 100 at the very top of the program (before anything) so that the ICD has something to latch onto before it goes wacko with interrupts.

    Each of the include files disables debugging within that include by default.
    But they also ENABLE it again at the end of each file.
    Moving the first disable down to after the includes might help.
    Code:
    INCLUDE "DT_INTS-18.bas"     ; Base Interrupt System
    INCLUDE "ReEnterPBP-18.bas"     ; Include if using PBP interrupts
    INCLUDE "Elapsed_INT-18.bas"  ; Elapsed Timer Routines
    
    Disable debug
    ASM
    INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
                INT_Handler    TMR1_INT,  _ClockCount,   PBP,  yes
                  
            endm
            INT_CREATE               ; Creates the interrupt processor
        ENDASM
    @ INT_ENABLE    TMR1_INT 
    enable debug
    You must also disable ALL code used by the interrupt handlers.

    You can not debug the actual interrupt code because it could interrupt any debug information already being sent at the time the interrupt occurs.

    Well, I should say that you CAN debug the interrupts, but only if the entire rest of the program is disabled. And the time it takes to communicate with the ICD makes it so you will miss many hundreds of interrupts in the process, so what you see may not be what you expect.
    <br>
    DT

Members who have read this thread : 1

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