Hi,
BUTTON Command could be fine here ... let's suppose button tie pin to ground.
As the debouncing do not occur if button is not pressed ( Mr de la Pallice )... scanning is very fast !Code:SCAN: FOR I = 0 to 4 BVar = 0 BUTTON PORTB.0[I],0,255,0,BVar,1,Action NEXT I I = 255 ' just to allow CASE 0 ... Action : SELECT CASE I CASE 0 ... ... CASE ELSE GOTO SCAN END SELECT
CQFD
Alain
Bookmarks