Ive been wondering whats the main difference in using a MAIN loop over a NMI. On my demos some subroutines work better in NMI than in Main loop, or sometimes not at all. I've been wondering cause ive been realizing that sometimes my code begins to get buggy after a while, when run in the NMI.
For example in my debounce routine. I never used a delay routine only a STATE to check for a closure. But then i realized that after my code started getting longer and putting more strane on the NMI I had to eventualay add a delay routine b/w closures so that it wouldnt skip a number or so.
After only using NMI to run my code i eventually got lazy and just kept using them to run my code. so i program my code to always looking for closures and then branching. updating what ever it needed when needed and then returning to look for new closures.
I guess what im trying to say is. when it feaseable to use code in your MAIN loop over the NMI? My impression is that while NMI is always updating. MAIN loop is always setting up.
thanks for looking
el
p.s. sorry for the format its better on the eyes and reading flows better
For example in my debounce routine. I never used a delay routine only a STATE to check for a closure. But then i realized that after my code started getting longer and putting more strane on the NMI I had to eventualay add a delay routine b/w closures so that it wouldnt skip a number or so.
After only using NMI to run my code i eventually got lazy and just kept using them to run my code. so i program my code to always looking for closures and then branching. updating what ever it needed when needed and then returning to look for new closures.
I guess what im trying to say is. when it feaseable to use code in your MAIN loop over the NMI? My impression is that while NMI is always updating. MAIN loop is always setting up.
thanks for looking
el
p.s. sorry for the format its better on the eyes and reading flows better