code size using On Interrupt PBP instruction


Closed Thread
Results 1 to 4 of 4
  1. #1
    eduardojx's Avatar
    eduardojx Guest

    Question code size using On Interrupt PBP instruction

    Hi,

    I´m a coding a program that has something like 2AFFh ocuped into program memory (18F4520) until now without interrupts. But now, I´m needing to use interrupt (timer0) and when I put in my code the instruction
    ON INTERRUPT GOTO rotine_name, i put too the interrupt handler and so on. Whith this, my code get a 407Fh ocuped in program memory. Looking for the disassembly listing, after each PBP instruction, the compiler insert a CALL 0x366 (in this case a adress designated by own compiler ). Doing a test, when I take off a On INTERUPT instruction, the size back around to the first value.
    Someone Can help me?
    Could I handle my interrupt rotine through asm instead of PBP directives?

    Best Regards.
    EJx.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,121


    Did you find this post helpful? Yes | No

    Default

    After ON INTERRUPT GOTO command put DISABLE up to the point you want to use the interrupts.

    After that point use ENABLE for the block of code that interrupt should be on and then again DISABLE.

    PBP puts a check every after a command to check for interrupts. So the numbers you report seem very true.

    Ioannis

  3. #3
    Join Date
    Jul 2005
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    If the timer needs to running all the time, setup the interrrupt and write your interrupt routine in assembler. That way you will significant reduce the program size.

    Paul.

  4. #4
    eduardojx's Avatar
    eduardojx Guest


    Did you find this post helpful? Yes | No

    Thumbs up

    ok, friends,

    thanks for help... i´ll try these tips....

    Regards

Similar Threads

  1. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  2. 16F876A CCP1 Capture/Interrupt Question
    By TDonBass in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 17th January 2008, 03:25
  3. How to set TMRO & TMR3 as Counter?.
    By NatureTech in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 18th May 2007, 08:52
  4. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07
  5. ASM Interrupt
    By mikep in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 22nd November 2004, 20:06

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