So far I have a main that just moves porta to latc on every iteration. It also checks that enable is high. If enable is low, it gosubs to disable drives, and waits there for a high again on the enable line. At which point it returns to the main to keeep passing values from porta to latc.
Also have a DT_INT every 5 mS. this does nothing but inc a counter used to flash a LED every .5 sec. That is also handled in the main. If count=100 then toggle LED
This all works
Now its time to step up the function here. I want to move the port passing to the int. But I am having a brain fart about the timming. The pulses last for 10uS high and 10uS low. I am thinking a 5uS interupt will ensure I NEVER miss a pulse, but my mind is cloudy on this. My int will be ASM, so no PBP context saving for entry and exit. I want to do this so I can do more stuff and never worry about missing a step.
Does this seem right?
Bookmarks