Interrupts in Assembler


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Location
    Paris
    Posts
    101


    Did you find this post helpful? Yes | No

    Default

    Thanks for this nice wrap-up of interrupt handling. I think I may have a related problem using DT_INTS18: In my main program I use INT0, TMR1, and USBINT, but as I was adding function and the code grew INT0 and then TMR1 stopped working. The interrupt is called but I think the handler is not running properly (or as you said, does crash when it has to go back to the main program).

    As far as I understand, Page locations in RAM should be dealt within DT_INTS, but should the program reside in specific page of the code memory in order for everything to work?

    I remember seeing a piece of code to trigger an error if interrupt handler is not located in the appropriate memory bank but cannot find it back... could that be useful for debug?

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


    Did you find this post helpful? Yes | No

    Default

    The post above is refering to 14-bit cores (12F/16F).
    18F's are completely different. There are no "Pages" in program memory.

    Make sure you have the handler's "Type" set to "PBP" for anything you've written.
    DT

  3. #3
    Join Date
    Dec 2007
    Location
    Paris
    Posts
    101


    Did you find this post helpful? Yes | No

    Default

    I did use the PBP type for each interrupt. The USB interrupt is working fine, the INT0 is working only once and the TMR1 int does not work anymore. It started to malfunction after adding more code that is unrelated to the interrupt function. Even if I bypass everything using a GOTO to enter directly in the operating mode that use the timer interrupt it does not work (the idle loop is running but the interrupt is never triggered).

    I'm a bit clueless on this

  4. #4
    Join Date
    Dec 2007
    Location
    Paris
    Posts
    101


    Did you find this post helpful? Yes | No

    Default

    Now that is impressive... I've been on this for a week, and I don't know how I managed to remove the "blinking led" line that goes with my interrupt code!!! no wonder why it was not blinking...

    Well everything does work perfectly now, TMR1 and also INT0 (fixed a little glitch on slope detection so it can work as expected).

    Your interrupt code is doing wonders, I really enjoy using it

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


    Did you find this post helpful? Yes | No

    Default



    Whew, had me worried there for a bit.
    Glad you got it working.
    DT

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