Ping Darrel Taylor - Timer0 Instant Interrupt


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2004
    Posts
    61

    Default Ping Darrel Taylor - Timer0 Instant Interrupt

    (Instant Interrupt Timer0 Question)

    Hi Darrel,

    I just downloaded a fresh copy of the DT_INTS-14 and ReEnterPBP files from your website and intalled them in a new directory, along with my program file.

    I have PBP 2.46 and the newest version of MPASM (5.03) running inside MicroCode Studio.

    My target processor is a 16F88 @ 20 MHz.

    I'm attempting to use a TMR0 interrupt.

    The relevant PBP code looks like this:

    ASM
    INT_LIST macro ; IntSource, Label, Type, ResetFlag?
    INT_Handler TMR0_INT, _ClockCount, PBP, yes
    endm
    INT_CREATE ; Creates the interrupt processor
    INT_ENABLE TMR0_INT
    ENDASM

    When I compile, PBP tells me that T0IF can't be found and the program won't compile.

    So I opened up the MPASM's .inc file for the 16F88 and discovered that T0IF and T0IE aren't mentioned anywhere. Rather, it's TMR0IF and TMR0IE.

    So I made these two changes to the DT-INTS-14.bas file:

    ifdef T0IF ;----{ TMR0 Overflow Interrupt }-------------[INTCON, TMR0IF]---

    ;INT_Source INTCON, T0IF, INTCON, T0IE
    INT_Source INTCON, TMR0IF, INTCON, TMR0IE

    endif

    ;#define TMR0_INT INTCON,T0IF ;-- TMR0 Overflow Interrupt 16F
    #define TMR0_INT INTCON,TMR0IF ;-- TMR0 Overflow Interrupt 16F


    ------------

    And now I get the error 'Interrupt source INTCON, TMR0IF not found.'

    I've checked to make sure that zeros are used instead of the letter 'O' everywhere.

    The errors are the same using a pervious version of MPASM - 3.90 I think.

    Any ideas?

    John
    Last edited by JEC; - 5th January 2007 at 04:39.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,519


    Did you find this post helpful? Yes | No

    Default

    Hi,
    See post #141 in this thread:
    http://www.picbasic.co.uk/forum/show...ant+interrupts

    /Henrik Olsson.

  3. #3
    Join Date
    Nov 2004
    Posts
    61


    Did you find this post helpful? Yes | No

    Default

    Thanks - that fixed the problem and I'm able to compile.

    By the way, what's up with entering a CAPTCHA when searching the forum these days?

  4. #4
    Join Date
    Jul 2006
    Posts
    60


    Did you find this post helpful? Yes | No

    Default desable the interrupt?

    Hello Darrel

    the line
    @ INT_ENABLE INT_INT ; enable external (INT) interrupts

    and how can i desable the interrupt?

    Thanks

    Regards
    Pedro

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,519


    Did you find this post helpful? Yes | No

    Default

    Hi,
    Darrel will most definetly correct me if I'm wrong but I think you do:
    Code:
    @INT_DISABLE   INT_INT
    /Henrik Olsson.

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  2. darrel taylor's instant interrupt compiler error
    By delta_boogie in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 20th October 2009, 19:07
  3. DT Instant Interrupt counting
    By jderson in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 9th March 2008, 22:47
  4. Usart with Darrel Instant Interrupt
    By Pedro Pinto in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th February 2008, 00:09
  5. Replies: 1
    Last Post: - 2nd November 2006, 23:24

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