Interrupt in picbasic (Hardware and Software)


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2006
    Posts
    747

    Default Interrupt in picbasic (Hardware and Software)

    Hi,

    I have a program in picbasic pro using external interrupt on RB0 (user input). I would like to have a second interrupt (temperature sensor) Lets say TMR0. What I can read so far, both interrupt are called using the 'ON INTERRUPT Goto MyInterrupt' command. I know fron Darrel's interrupt page it is possible to have multiple interrupt in ASM, but I am using picbasic. Is it possible to have two different interrupt in picbasic?

    K

  2. #2
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Yes. As soon as you enter the interrupt service routine, you check the interrupt flags that you are expecting (the ones you turned on) and service the one that triggered.

    Are you using PicBasic, or PicBasic Pro? If the latter, while I haven't personally used DT's Ints, I would advise you go for it. It's all scripted so you don't do any asm coding yourself. It was designed just for PBP, and isn't difficult to implement, from what I've seen. You'll get the best response time with the least headache.

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