Panasonic VP-0187A
==================
-It is unknown keyboard from Panasonic
+2017/08/06
-6P6C connector
+It is unknown keyboard from Panasonic with Hirose Cherry M8 and 6P6C connector.
-Hirose Cheery M8 switches
+Pictures:
+http://imgur.com/a/GAZE7
+
+Hirose Cheery M8 switches:
https://deskthority.net/wiki/Cherry_M8
||| |decoder|
||| ---------
||| |||||| col[0..7]
- ABC vvvvvvv pull down
+ ABC TC4512 vvvvvvv pull down
---------- <----|+++++++|--100K--+
|data | <----|+++++++|--100K--+
STATE<--|selector| <----|+++++++|--100K--+
| 7 to 1 | <----|+++++++|--100K--+
---------- <----|+++++++|--100K--+
- row[0..7] |
- 8x8 matrix -
- GND
+ row[0..7] | 8x8 matrix |
+ | -
+ TC4078 | GND
+ ------ |
+ SENSE<----| OR |========+ OR'd row[0..7]
+ ------
+- TC4520BP - Dual Binary Up Counter
+- TC4028B - BCD-to-Decimal Decoder
+- TC4512BP - 8-Channel Data Selector
+- TC4081BP - Quad 2-Input AND Gate
+- TC4071BP - Quad 2-Input OR Gate
+- TC4078BP - 8-Input NOR/OR Gate
Matrix
1. VCC
2. Clock - sends clock to binary counter TC4520
3. Key State - indicates hi if key selected by counter is active
-4. Sense - indicates hi if any key is active while Reset is hi.
+4. Sense - indicates lo if any key is active while Reset is hi.
5. Reset - resets counter and drives all column
6. GND
123456
,--------.
- | |
+ | |||||| |
| |
`--____--'
plug
+
+Ping configuration
+------------------
+AVR ATmega32u4 is used as protocol converter.
+
+ PD0: Clock. Counter couts up at falling edge.
+ PD1: Key State. Hi if selected key is activated.
+ PD2: Sense. Lo if any key is activated while Reset is Hi.
+ PD3: Reset. Resets counters at riging edge.
debug_keyboard = true;
debug_matrix = true;
- // PD0:Clock PD1:State PD2:Sense_All PD3:Reset(Scan_All)
- DDRD = (1<<3) | (1<<0);
- PORTD = (1<<2) | (1<<1);
+ // PD0: Clock. Counter couts up at falling edge.
+ // PD1: Key State. Hi if selected key is activated.
+ // PD2: Sense. Lo if any key is activated while Reset is Hi.
+ // PD3: Reset. Resets counters at riging edge.
+ DDRD |= (1<<3) | (1<<0); // output
+ DDRD &= ~((1<<2) | (1<<1)); // input
+ PORTD &= ~((1<<3) | (1<<0)); // low
+ PORTD |= (1<<2) | (1<<1); // pull-up
dprintf("init\n");
}
uint8_t matrix_scan(void)
{
-
- // Scan_all resets counter
+ // TODO: debouce & unplug detect
+ // Reset counters
RST_HI();
wait_us(10);
- // TODO: cannot get reliable value from SENSE()
- //uint8_t s = SENSE() | STATE();
- //if (!SENSE()) return 0; // no activated key
RST_LO();
wait_us(10);
- //if (!s) return 0;
// 8x8 matrix: row:sense, col:drive, key_on:hi
for (uint8_t col = 0; col < 8; col++) {
matrix[row] &= ~(1<<col);
}
- // clock lo - next row
+ // proceed counter - next row
CLK_LO();
wait_us(10);
}
)
#define AC_L1 ACTION_LAYER_MOMENTARY(1)
+#define AC_SPC1 ACTION_LAYER_TAP_KEY(1, KC_SPC)
+#define AC_AENT ACTION_MODS_TAP_KEY(MOD_LALT, KC_ENT)
#ifdef KEYMAP_SECTION_ENABLE
const action_t actionmaps[][UNIMAP_ROWS][UNIMAP_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
[0] = UMAP(
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, DEL, F1,
TAB, Q, W, E, R, T, Y, U, I, O, P, GRV, LBRC,RBRC, F2,
- LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, UP, F3,
+ LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, AENT, UP, F3,
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, LEFT,RGHT, F4,
- SPC, DOWN, HOME
+ SPC1, DOWN, HOME
),
+ [1] = UMAP(
+ GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, BSLS, PSCR,PAUS, F5,
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PGDN,UP, PGUP,TRNS,BSLS,TRNS,TRNS, F6,
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,HOME,LEFT,DOWN,RGHT,END, TRNS, LGUI, PGUP, F7,
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, HOME,END, F8,
+ TRNS, PGDN, END
+ ),
+/*
+ [2] = UMAP(
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS,
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS, TRNS,
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS,
+ TRNS, TRNS, TRNS
+ ),
+*/
};