merge with 'dev': bugfix

f13
Ben Blazak 2012-06-03 21:17:08 -07:00
commit 176dfcb684
3 changed files with 23 additions and 3 deletions

View File

@ -29,7 +29,9 @@
*
* - location numbers are in the format `row##column`, where
* both 'row' and 'column' are single digit hex numbers
* corresponding to the matrix position
* corresponding to the matrix position (which also
* corresponds to the row and column pin labels used in the
* teensy and mcp23018 files)
* - coordinates not listed are unused
*
* --- other info ---------------------------------------------

View File

@ -39,8 +39,10 @@
* "teensy-2-0.md", and the '.svg' circuit diagram.
*/
// --- helpers
#define teensypin_write(register, operation, pin) \
_teensypin_write(register, operation, pin)
#define teensypin_write(register, operation, pin) do { \
_teensypin_write(register, operation, pin); \
_delay_us(1); /* allow pins time to stabalize */ \
} while(0)
#define _teensypin_write(register, operation, pin_letter, pin_number) \
((register##pin_letter) operation (1<<(pin_number)))

View File

@ -78,6 +78,22 @@
* Switching the row pins between hi-Z and drive low (treating them as
if they were open drain) seems just as good as, and a little safer
than, driving them high when the row's not active.
* We need to delay for at least 1 μs between changing the column pins and
reading the row pins. I would assume this is to allow the pins time to
stabalize.
* Thanks to [hasu] (http://geekhack.org/member.php?3412-hasu)
for the suggestion [here]
(http://geekhack.org/showthread.php?22780-Interest-Check-Custom-split-ergo-keyboard&p=606415&viewfull=1#post606415),
and [PrinsValium] (http://geekhack.org/member.php?6408-PrinsValium)
for noting that his firmware had erratic behavior without the delays
[here]
(http://geekhack.org/showthread.php?22780-Interest-Check-Custom-split-ergo-keyboard&p=606426&viewfull=1#post606426).
DOX tried it and confirmed that it worked for his protoype PCB (as of
3 June 2012) [here]
(http://geekhack.org/showthread.php?22780-Interest-Check-Custom-split-ergo-keyboard&p=606865&viewfull=1#post606865).
Before adding a delay we were having [strange problems with ghosting]
(http://geekhack.org/showthread.php?22780-Interest-Check-Custom-split-ergo-keyboard&p=605857&viewfull=1#post605857).
### PWM on ports OC1(A|B|C) (see datasheet section 14.10)