In message <19971224.014451.6742.0.mkeitz@juno.com>, Mike Keitz writes >On Wed, 24 Dec 1997 04:45:04 +0100 ZyLog writes: > >> >>- I could set interrupt on PORTB change. >> * Not recommended.(I heared this, near here) > >Don't do this. The RB on change interrupt is only suitable for >restarting the PIC from sleep. It should not be used while the PIC is >awake. What is the problem with RB change interrupts, other than the caution mentioned in the data sheets regarding mixing of polling with interrupt detection? I've used it to detect edges in order to track a quadrature encoder and it seems rock solid. The interrupt routine just reads and processes the quad inputs as recently discussed, but this way the routine only has to run when there has been a change, rather than having to poll at high speed. I would probably have to poll at 1 mSec intervals otherwise, to avoid missed states. -- Alan Hall, Ipswich, UK (01473) 652301