for the next code block, the one that does the range-test for RPM's this message purpose is to
propose that you now take a look at the simulator tool that comes with MPLAB IDE. the reason is
that the code is tricky to follow.
oh, the idea is simple enough, compare 2 numbers and decide
which is bigger ... and the simulator will let you follow the action one line at a time. and see the
changes to the registers and flags and program counter. this is the path i took to learn this
block of code well. and to better understand what it is doing.
as an aid i went to U-Tube and watched videos of this simulator tool. here is one link.
as you find others take care to focus on PIC12 uC's and assembly not 'C' language.
my approach was to just fool with and play with the simulator software. trial and error.
until i finally figured out how to work it. this took weeks of part time effort. and when there
was a gap of time on returning it'd be necessary to go thru it all again , stepping along one
line at a time, seeing the changes. and re-working out the range-test boundary values .
the next post will be a detailed description of what the range-test code is doing . it is likely to
consist of several postings. and could be several weeks to complete. this range-test code has
been the toughest part of the whole program to work out.
one idea i have to assist you learning this is to post a stand-alone piece of code that does
a range-test with a fixed value for 'nmbr'. then when you run the simulator you can edit the
value for 'nmbr' , re-build the code and run the simulator again.
later on , once all these flow diagram blocks are posted with their detailed descriptions
the plan is to then post the whole ignition CDI program