terça-feira, novembro 13, 2007

Fucking 4X4 matrix keyboard

Still don't get it totally, well... based on the code I got anyhow.

The idea of a 4X4 matrix printing in to a 16 keys keyboard seems rather easy if one thinks the numbers are actually written in base 4. Then any number n= (line/4)*4 + (col%4);

now if one intends to save such a result in a counter, one shall evaluate the lower bits to match the col, and the higher bits to match the line. Sounds easy, either multiplexer or decoder should do the job and we'd all be happy. But this implementation I got, makes the cols independent of any input. And this I find at minimum ; QUITE ODD and am going crazy. And simulated the got deamn keyboard on a JAPPLET. And found my own got deamn solution for the problem and it works. So in case your busting your brain against the monitor searching for google on "keyboard 4x4 decoder" "keyboard 4x4 matrix" ... etc sick of reading datasheets and pic code...

Try the JApplet :P 'cause I'm such a nice person I've included the code. (not that I have issues with disassemblers but they mess up variable names anyhow).


well I guess I'm not a genious... but fortunately there are many shades of gray between Angelina Jolie's face and Bush's Ass hole and today I feel rather close to the neck.

need sleep.

root@desktop# shutdown -h -t secs now;

Sem comentários :