Cool / obscene circuits, too short for an article. Scan a dozen keys on a single...
lcamtuf :verified: :verified: :verified: @lcamtuf@infosec.exchange
Cool / obscene circuits, too short for an article.
Scan a dozen keys on a single digital I/O pin. You first configure the pin as output and write 0 to it to discharge the capacitor. Then, you switch the pin to Hi-Z input and measure the time before the value toggles to 1. This depends on how quickly the capacitor is charging, which depends on how many resistors are between it and the positive supply rail, which depends on the currently-pressed key.