PDA

View Full Version : Hardware Interrupts and PBP



manumenzella
- 18th January 2007, 07:01
Hi. Im 15, and I live in Argentina. Okay, lets start coding. :)
I was wondering if I could use the hardware interrups in a 16F877A to ckeck the status of the USART receiver, and the status of some buttons (on portB change). I looked in the manual, and there seems to be two commands:
ON INTERRUPT and ON_INTERRUPT. The one that does it on software is really wasteful of memory, and makes the whole code run much slower, so how can I configure the other interrupts??? I would really appreciate it if you could give me some code examples. Thanks in advance, Manuel.

HenrikOlsson
- 18th January 2007, 08:16
Hi,
The easiest way by far is to use Darrel's Instant Interrupt routine. It alows you to code your interrupt service routine in basic without the obvious drawbacks of ON INTERRUPT. It does have an effect on performace compared to true assembler interrupts but it is SO much easier to use. Look at:

http://www.picbasic.co.uk/forum/showthread.php?t=3251&highlight=instant+interrupts

/Henrik Olsson.