the different flow-diagram blocks of code were put into one program. and it built. then was
tested with a signal generator and the rigol 1054 scope.
to see if the -71 deg simulated signal from the flywheel would lead to a fire signal.
nothing. no fire signal pulses were observed.
oh , there could of been a been a pulse way later than the viewed
scope timebase would have displayed.
this failure led to taking a closer look at the code. there it was found that there were both lines
not needed, and possibly causing problems. also a lack of needed code lines(s) was found in at least
one instance. these lines are leftovers from the individual blocks of code being tested one at
a time. then thrown together obliviously to un-needed testing leftover lines of code.
this faulty code is being posted. some of you may welcome the chance to study it as is to find
out what you think it needs in the way of fixes. its the same sort of exercise common to most all
coding projects. and is included for its reality nature.
in my view you are being cheated out of good lessons when the code works right
the very first time.
sure , it was a pisser to not work fresh out of the starting blocks. however once that fact is
absorbed then one can begin to look at it all and think what is wrong.
and take what it does do as a clue .
on doing this several new lessons were learned. valuable ones. for instance it was learned :
a. what is causing the 'Set PC at Cursor' and 'Run to Cursor' to grey out during the stopwatch tests.
b. that successive stopwatch tests can be run from the same starting point to a different stop point.
c. seeing the code in terms of 3 stretches of code with known run times. and these should add
to longer run times as the stop point for the stopwatch test is moved outward
the 3 code stretches that add up are 1. range test 2 . delay to fire 3. the fire pulse
c.1 to discover how valuable the simulator/stopwatch is for code testing
before you get to a hardware test.
d. also in the code building and then programming a 12F508 i learned the actual size of the code.
this is a big question to have an answer to. this uC has only 512 memory locations.
and this version of the ignition code used only about 120 of them. this was a lot smaller
than i expected it to be. now it is known there is plenty of space to add more range tests.
that is the range size can be reduced from 300 rpms to 200 or less. it'll take running
this version on the engine to learn if this change is needed or not
e. close to this was discovering how the number of lines of assembly code are a rough
approximation of the final size in the uC. 148 lines of code vs 120 uC ml's used.
i forgot to include a foto of the programmer screen. next time one will be posted. and
you can see how the uC memory contents are displayed by the PicKit-3 programmer s/w