It still appears keys in rapid succession are causing at least 90% of the repeats. I would estimate the repeats are happening less than 20% of the time but this probably correlates to your programming. In my case, I use a lot of macros - some of which repeat the same key.
I've only done limited testing but I couldn't tell any difference with 2 NOPs versus 3 NOPs. Before, 3 NOPs were required to prevent the Extender from locking up right away and this is no longer a problem.
I have experienced a lockup or two - this could be something I caused. I also had two "sit over-night" lockups after I tried just the "DI" mod at L50. I'll continue to test tonight. Again, this is the best fix yet with the possible exception of a lockup.
In case I made a dumb error making the code delta changes, here is my L5-L50 (sorry for formatting):
Code: Select all
L05: TM R_Flags, 1 ;Light enabled
JREQ L18 ;No
CALL LightOn ;Yes: Turn it on
L10: CALL WaitNoKeys ;Wait for no keys pressed
DI
LD RF1, WC ;Enable button sense interrupts
CLR RF2 ;Clear pending interrupts (buttons)
CALL LedOff ;11; Turn LED off
L18: CALL SelectTimeout ;Select timeout value
JRNC L40 ;No Timeout needed
L20: LD R4A, 4C ;Set timeout
timeout_patch = $$-1
CLR R_IFlags ;Interrupt flags
CALL StartT0 ;Start timer0
L30: IDLE
RL R_IFlags ;Test interrupt flags
JREQ L30 ;No interrupt flags set
JRC L50 ;Keyboard interrupt flag set
CALL HandleTimeOut ;Turn off backlight and Clear shift flag
JR L10
L40: EI
LD RFB, A5 ;Enable stop
STOP
NOP
NOP
L50: DI
CALL LightOff
CALL DebounceKeys ;Keypad scan
DEC R_Closures ;Exactly one key pressed?
JRNE L05 ;No
.
.
Thanks for your help.