I was aware of the ATMega pin change interrupt facility and intended to write something using this, however -
ConclusionThe minimal impact of the pinChangeInt library is a very reasonable trade off for access to more than 20 external interrupts.Update: In subsequent tests, the performance impact of attaching an interrupt with PCintPort::attachInterrupt has been measured to be near negligible. In the worst case test there was a 5% overhead (over INT0,INT1 ), in the best case it was actually 15% faster.
So how do we use this library ?Part 1) Installation1) Download the zip file from the google code group http://code.google.com/p/arduino-pinchangeint/2) Copy the three directories cppfix, MemoryFree and PinChangeInt into the libraries folder of your Arduino directory, mine is here - 'C:\arduino-1.0-windows\arduino-1.0\libraries\PinChangeIn'Part 2) Adding the library to a project1) To add the library to a project, open the project in the IDE2) In the 'Sketch' menu you should see a menu item 'Import Library'3) Select import library and you should see a drop down list of the libraries you have installed, from this list select 'pinChangeInt'4) You should now see the line #include <PinChangeInt.h> added near the start of you sketchThe library is now installed and included in your project ready for use.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16