Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

Reply To: Ping pong game in C

Home Forums MPLAB XC8 Project Discussions Ping pong game in C Reply To: Ping pong game in C

#3036

Viga uk
Participant

On the Pic18f8722 which  uses the pin for Rb2 is also the pin for INTO2.the two buttons on the board are rb0 and ra5 so i  used rb2 and connected it two ra5 with a wire.so the two buttons now work as interrupt source.Ra5 has no interrupt feature,on this board only rb0 ,rb1 and rb2 can be  used for interrupt .</p>
In the isr  the go to my isr is assembly language used on this board to jump to isr once either of the buttons are pressed.

 

If(intconbits.INTOIF==1)  ONCE interrupt occurs flag is 1 and the flag is immediately cleared.by INTCONbits.INTOIF=0

 

  • This reply was modified 7 months, 1 week ago by  Viga uk.
  • This reply was modified 7 months, 1 week ago by  Viga uk.