geekhack
geekhack Community => Keyboards => Topic started by: Pul5ar on Wed, 20 April 2016, 10:24:23
-
I have created a matrix config for Soarer's firmware:
matrix
scanrate 1
debounce 5
blocking 0
sense PB0 PB1 PB2 PB3
strobe PF0 NUM_LOCK PAD_SLASH PAD_ASTERIX PAD_MINUS
strobe PF1 PAD_7 PAD_8 PAD_9 UNASSIGNED
strobe PF4 PAD_4 PAD_5 PAD_6 PAD_PLUS
strobe PF5 PAD_1 PAD_2 PAD_3 UNASSIGNED
strobe PF6 PAD_0 UNASSIGNED PAD_PERIOD PAD_ENTER
end
My question is which way round do the diodes go, or does it matter?
If they are in the wrong direction can I simply re-label the strobe rows to sense and change the sense to strobe. Like this:
matrix
scanrate 1
debounce 5
blocking 0
strobe PB0 PB1 PB2 PB3
sense PF0 NUM_LOCK PAD_SLASH PAD_ASTERIX PAD_MINUS
sense PF1 PAD_7 PAD_8 PAD_9 UNASSIGNED
sense PF4 PAD_4 PAD_5 PAD_6 PAD_PLUS
sense PF5 PAD_1 PAD_2 PAD_3 UNASSIGNED
sense PF6 PAD_0 UNASSIGNED PAD_PERIOD PAD_ENTER
end
I wouldn't want to have to desolder all the diodes.
-
It's been a while since I played with Soarer's but as long as your diodes are consistent you can make it work using a combination of rotating the layout and changing the strobe_mode and sense_polarity settings (see the 'Controller docs' folder)
It's only a small board so I would just build it and then make it work, but if you want the config to look like the pad as it does in your post you could flash the Teensy(?) then connect one of the assigned row/column pairs using a diode - if it outputs the desired number that's the right way round, if not turn the diode round. If it still doesn't output you may have a dead diode...
-
Awesome, thanks. Could you check my logic please.
If the defaults are strobe_mode 0 and sense_polarity 0, then the opposite of default would be strobe_mode 4, and sense_polarity 1?
strobe_mode
Various strobe modes can be selected, although it will be quite unusual to need anything other than the default, which is 0.
WARNING: exercise caution when using modes 1 or 5, since errors in the connections or lack of diodes can easily damage the Teensy!
Mode Active Inactive
0 low pullup
1 low high
2 low float
3 float high
4 pullup low
5 high low
6 float low
7 high float
sense_polarity
This setting should normally match the strobe mode, with 0 being used for strobe_modes 0 to 3, and 1 being used for strobe_modes 4 to 7.
Valid values are 0 (active low) or 1 (active high).
The default is 0.