Assembler and interrupt problem


Closed Thread
Results 1 to 3 of 3
  1. #1
    milanche's Avatar
    milanche Guest

    Default Assembler and interrupt problem

    I have a program written in PBP(ver.2.44 and 16F870) with part of code in assebler. Assembler code is used for pause. Without assebler code everything works fine. It looks like that if interrupt occures during assebler code, it can not go back.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    More you give details (code, schematics) more you have chance to have solutions. As now, i don't see how we can help you.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by milanche
    I have a program written in PBP(ver.2.44 and 16F870) with part of code in assebler. Assembler code is used for pause. Without assebler code everything works fine. It looks like that if interrupt occures during assebler code, it can not go back.
    Why do you need assembly code for the delay? At least show the assembler portion of the code. It sounds like your variable for counting the delay increment is being overwritten by your interrupt routine. If the mL code is used for a very short delay...only reason I can think to use it, turn off interrupts while in the delay code, and turn it back on after. Or... If you need to go to the interrupt routine ASAP, disable the interrupt, and poll the interrupt flag regularly during your delay loop.

    Ron

Similar Threads

  1. Won't go back to SLEEP after 1st Interrupt
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 29th June 2009, 09:00
  2. Battery powered applications
    By NavMicroSystems in forum Off Topic
    Replies: 7
    Last Post: - 22nd June 2009, 07:12
  3. Can't ID interrupt source with this IntHandler??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd June 2009, 02:35
  4. How to put data into arrays under assembler interrupt ?
    By Chris Barron in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 26th March 2009, 16:29
  5. 18F2480 asm interrupt
    By Richard Storie in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 5th March 2009, 19:40

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