|
Problem with interrupts on the PIC
All,
If you are attempting interrupts, please exercise extreme care if you are using any platform more powerful than the Edubot.
My issue is the lack of context saving. Please read section 9.9 of the "PIC18FXX20 Data Sheet" and section 10.3.1.7 of the "PICmicroŽ 18C MCU Family Reference Manual".
To quote the latter: "If both low and high priority interrupts are enabled, the shadow registers cannot be used reliably for low priority interrupts, as a high priority interrupt event will overwrite the shadow registers."
If you implement the low priority interrupt as per the IFI white paper "Using Polled or Interrupt-driven Timers", you are in for some problems as the WREG, BSR and STATUS registers will likely be trashed when a LPI is interrupted by an HPI.
I have a call in with IFI about this and have been promised that they will look at the issue.
I'll keep everyone informed.
__________________
Mike Betts
Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013
As easy as 355/113...
|