PDA

View Full Version : Interrupt Newb Question:



Tear
- 27th June 2005, 16:17
Hello Everyone,

I was wondering where I can find some good example code of using interrupts in PBP?

What I am trying to do is have 2 push buttons one for increasing a delay and the other for decreasing the delay. When the button is pushed it will jump to the interrupt and increase/decrease the delay depending on the button. Since I will be using delays as long as 30 sec I dont want to have to hold the button the whole time waiting for the PIC to see that the button is pressed while it is in it NOP delay loop. I have the 2 buttons attached to I/O Port B line 4 and 7 on the PIC16F84. This is according to the PIC16F84 datasheet. Also, on the datasheet they talk about how the change on the I/O pin sets the RBIF flag on interrupt. With PBP do I need to worry about this?

Since I am brand new to the PIC and PBP world I really am not sure where to look for help on this.

Thanks,
MIchael

Bruce
- 27th June 2005, 19:04
There are several examples here http://www.microengineeringlabs.com/resources/samples.htm