Code Explorer pane stops updating
Posted: Wed Sep 24, 2014 1:49 pm
I noticed that if the IDE Code Explorer ever sees a divide by 0 exception then it quits updating and you have to close/reopen the IDE to get it working again.
In the following, while editing BUSFREQ if it's ever = 0 then updates to the explorer pane stop. If the division is protected with a test, then it continues to work
In the following, while editing BUSFREQ if it's ever = 0 then updates to the explorer pane stop. If the division is protected with a test, then it continues to work
Code: Select all
clock = 20
#option BUSFREQ = 1200 // <<<<< EDIT THIS VALUE
#define _FCY = _clock*1000000/4
// this check is so the IDE never sees divide by 0 while editing BUSFREQ
// without this test, if BUSFREQ is set to 0 while editing it then the
// Code Explorer stops updating until the IDE is closed and re-opened
'#if (BUSFREQ > 0)
#define _HALF_PERIOD = (_FCY/(2*BUSFREQ))
'#endif // (BUSFREQ > 0)
// create the timer constants from the '#defines'
const HALF_PERIOD as word = _HALF_PERIOD