Well I think I'm finally there - the solution?
A combination of things....
the main one being a very bouncy tactile switch (China's litle way of making me lose two days!) - I was using a 100nf cap across it, but that wasn't sufficient - in the end it took a 1uf to stop whacky results. (I've a theory that when the interrupt routine was exiting with IOC interrupts then being ren-eabled - every now & then the switch would still be bouncing, which would cause unanticipated results)
poor coding - no surprises there (& which is why I'm reticent to post my code from the outset!)
A few more splatterings of wend (to wait for the switch to be released - particularly important when you're interrupting on change!)
I think the gosubs I thought was causing me an issue *might* be a misnomer - but for now, I'm leaving them out!
I'm still not 100% confident - but hey, you can only press a switch so many times to test, restest & restest again! (so for now I'm calling it fixed and scurrying out the side door!)




Bookmarks