Instant Interrupts - Revisited


Closed Thread
Results 1 to 40 of 773

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    What do you have in the main program?

    Error [113] c:\pbp\pbppic14.lib 1141: Symbol not previously defined (INT_ENTRY)
    Usually means there isn't an INT_LIST macro.

    The files won't compile without it.
    DT

  2. #2
    Join Date
    Jun 2007
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    As of yet I have not put your code into my main program. I was just trying to compile each on their own. If I understand you correctly, your code needs to be put of another program or it will not compile. Is that correct?

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


    Did you find this post helpful? Yes | No

    Default

    That's correct!
    DT

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


    Did you find this post helpful? Yes | No

    Default

    Alain,

    Well, you may have noticed I didn't get the "GLOBAL" for INT_ENABLE/DISABLE put in the last version of DT_INTS-18.
    It turns out that GLOBAL is a reserved word for MPASM. It's used with relocatable code.

    I could have used GLBL or GLBAL I suppose, but somehow

    @ INT_DISABLE GLBL

    Seems even more cryptic than

    GIE = 0

    I still think it should be in there, as should PERIPHERAL, HIPRIORITY and LOWPRIORITY.

    But I'm not sure what the best way is, AKA less confusing.

    Any thoughts?
    <br>
    DT

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Alain,

    Well, you may have noticed I didn't get the "GLOBAL" for INT_ENABLE/DISABLE put in the last version of DT_INTS-18.
    It turns out that GLOBAL is a reserved word for MPASM. It's used with relocatable code.

    I could have used GLBL or GLBAL I suppose, but somehow

    @ INT_DISABLE GLBL

    Seems even more cryptic than

    GIE = 0

    I still think it should be in there, as should PERIPHERAL, HIPRIORITY and LOWPRIORITY.

    But I'm not sure what the best way is, AKA less confusing.

    Any thoughts?
    <br>

    Hi, Darrel

    What about

    @ G_INT_DISABLE and @ G_INT_ENABLE ??? ... would be simple enough. ... and it's just "ordinary" macros !!!

    Remember the goal was only to use something simple to remind ( in other words: to use for datasheet non-lovers !!! )

    To me, GIE = 0 is also the simpler ... But, as you've seen, nowadays nobody dares to read the datasheets !!!




    The Tractor computer soft is just finished (!)... I had some precedence headaches ( particularly with // !!! ), and it was really difficult to see what was wrong ...

    despite result was good for setting a flag, operation was wrong !!! ... and was no way to cancel that flag ...

    Now, I must translate my comments to English ...

    Regards
    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Nov 2003
    Location
    Sao Paulo - Brazil
    Posts
    92


    Did you find this post helpful? Yes | No

    Default Button and Instant interrupts

    Hello Darrel !

    I´m using your Instat interrupts to work with TIMER1, TIMER2 and CCP1 with a 16F877 @ 4Mhz, like this :

    ASM
    ;T0IF = TMR0IF
    ;T0IE = TMR0IE
    INT_LIST macro ; IntSource, Label, Type, ResetFlag?
    INT_Handler CCP1_INT, _Capture, PBP, yes
    INT_Handler TMR1_INT, _Timer1, PBP, yes
    INT_Handler TMR2_INT, _tick, PBP, yes
    endm
    INT_CREATE ; Cria a interrupção
    ENDASM

    Everything is working very, very well.

    I´m doing a On-board computer for my small Opel Corsa, and this interrupts are just great !
    Me and Sirvo (remember him ?) are doing almost the same on-board computer.

    But now, I would like to implement 4 Buttons to my application (Start, Stop, Pause, Funcition Keys).

    I´m trying to do that with the button statement without success / good results.

    I read your sample (hello word for instant interrupts) but the INT_INT read just the RB0/INT right ?

    Is that possible to use the Instant Interrupts to create/read, let´s say, 4 different buttons on PORTC ?

    Tahank You very much !

    bye


    Sérgio Pinheiro

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


    Did you find this post helpful? Yes | No

    Default

    Is that possible to use the Instant Interrupts to create/read, let´s say, 4 different buttons on PORTC ?
    Yes, that's possible. But it would be a lot easier if you used RBC_INT "Port B change interrupts". It uses PORTB.4 thru PORTB.7

    But if those pins aren't available, you could do something like this, which uses only 1 interrupt (INT_INT on Falling Edge), then the interrupt handler can read PORTC to figure out which one was pressed.


    <br>
    DT

Similar Threads

  1. Clock using Instant Interrupts
    By PICpocket in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th February 2009, 21:43
  2. DT instant interrupts with mister_e keypad
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th November 2008, 20:02
  3. DT's Instant Interrupts trouble
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th November 2008, 20:48
  4. Keypad and DT's Instant Interrupts
    By Homerclese in forum General
    Replies: 11
    Last Post: - 27th April 2007, 06:32
  5. Replies: 1
    Last Post: - 1st November 2006, 03:11

Members who have read this thread : 6

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts