I'm hollering "Uncle!" on this right now.
Attached are two segments from a larger program that, as of right now, works perfectly. It records keypresses (TRIGR) at 8 frames per second and plays them back. This is running on a 12F683 and uses Darrel's interrupts for timing.
What I've been trying is to add (somewhere) a test: If the key is stuck or still held down, I want further execution to stop until the key is released.
And that's where the trouble begins. Sounds silly, simple, and should be straightforward, right? But I've tried an amazing number of combinations of IF . . . ENDIF, WHILE . . . WEND, GOTOs, and GOSUBs. Nothing works quite right. Obviously, I'm not seeing something.
The most common result is that the test "sticks" on odd-numbered attempts and won't release back to the program when the key is released until the key is pressed again. (I've even used ALED as a blinky/status indicator.)
Did I fry one too many brain cells back in the 1960s?
Bookmarks