I'm converting an Acorn Electron keyboard matrix to USB with the Teensy as the converter. I've wired up the board to the Teensy (in a temporary way) and altered the firmware like your guide suggests, compiled and put it on the Teensy.
This is the diagram
http://i.imgur.com/e2ZOi15.png for the keyboard circuit from the original service manual. The board has 22 pins that just connected to the computer via a ribbon cable, i replaced that with pin headers
http://imgur.com/mnAloMp, did that same thing on the Teensy as well
http://i.imgur.com/6Uq6Tpw.jpg, i've literally just connected the two with push on breadboard wires for now until i know the firmware works.
Anyway nothing happens, the board shows up in windows device manager and when i press the caps lock key on my main board the LED on the Electron board lights as well, so something is working and that shows the teensy is "talking" to the keyboard. I decided to check continuity with my multimeter and noticed with i bypassed a column's diode that column would type and work, so if i bypassed D1 i could use the 1QAZ keys.
I did a little searching and it seems one other persons has converted this board but using mbed and a different board,
here is the custom firmware for it if that helps. The comments in the code suggest the voltage drops on active keys and i think the gh60 tmk firmware works on active high?
My matrix.c file
Code: Select all
/* Column pin configuration
* col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13
* pin: F7 B6 B5 B4 D7 C7 C6 D3 D2 D1 D0 B7 B3 B2 (Rev.A)
*/
static void init_cols(void)
{
// Input with pull-up(DDR:0, PORT:1)
DDRF &= ~(1<<7);
PORTF |= (1<<7);
DDRD &= ~(1<<7 | 1<<3 | 1<<2 | 1<<1 | 1<<0);
PORTD |= (1<<7 | 1<<3 | 1<<2 | 1<<1 | 1<<0);
DDRC &= ~(1<<7 | 1<<6);
PORTC |= (1<<7 | 1<<6);
DDRB &= ~(1<<7 | 1<<6 | 1<< 5 | 1<<4 | 1<<3 | 1<<2);
PORTB |= (1<<7 | 1<<6 | 1<< 5 | 1<<4 | 1<<3 | 1<<2);
}
static matrix_row_t read_cols(void)
{
return (PINF&(1<<7) ? 0 : (1<<0)) |
(PINB&(1<<6) ? 0 : (1<<1)) |
(PINB&(1<<5) ? 0 : (1<<2)) |
(PINB&(1<<4) ? 0 : (1<<3)) |
(PIND&(1<<7) ? 0 : (1<<4)) |
(PINC&(1<<7) ? 0 : (1<<5)) |
(PINC&(1<<6) ? 0 : (1<<6)) |
(PIND&(1<<3) ? 0 : (1<<7)) |
(PIND&(1<<2) ? 0 : (1<<8)) |
(PIND&(1<<1) ? 0 : (1<<9)) |
(PIND&(1<<0) ? 0 : (1<<10)) |
(PINB&(1<<7) ? 0 : (1<<11)) |
(PINB&(1<<3) ? 0 : (1<<12)) |
(PINB&(1<<2) ? 0 : (1<<13));
}
/* Row pin configuration
* row: 0 1 2 3 4
* pin: F0 F1 F4 F5 F6
*/
static void unselect_rows(void)
{
// Hi-Z(DDR:0, PORT:0) to unselect
DDRF &= ~0b01110011;
PORTF &= ~0b01110011;
}
static void select_row(uint8_t row)
{
// Output low(DDR:1, PORT:0) to select
switch (row) {
case 0:
DDRF |= (1<<0);
PORTF &= ~(1<<0);
break;
case 1:
DDRF |= (1<<1);
PORTF &= ~(1<<1);
break;
case 2:
DDRF |= (1<<4);
PORTF &= ~(1<<4);
break;
case 3:
DDRF |= (1<<5);
PORTF &= ~(1<<5);
break;
case 4:
DDRF |= (1<<6);
PORTF &= ~(1<<6);
break;
}
}
keymap_poker.c file
Code: Select all
#include "keymap_common.h"
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: qwerty */
KEYMAP(
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, NUHS, NUBS, \
CAPS, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, COPY, \
LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, \
LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, DEL, SPC, \
FN0),
/* 1: FN 1 - Toggle Layer */
KEYMAP(
TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, TRNS, LEFT, RGHT, \
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, DOWN, 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),
};
const uint16_t PROGMEM fn_actions[] = {
/* Custom Acorn Electron Layout - FN[0] */
[0] = ACTION_LAYER_TOGGLE(1) // BREAK key will toggle FN layer 0 and 1
//[1] = ACTION_LAYER_MOMENTARY(2), // This means that the FN[1] key will trigger the layer (2) with a ACTION_LAYER_MOMENTARY action.
//[2] = ACTION_LAYER_TAP_KEY(1, KC_ESC)
//[1] = ACTION_DEFAULT_LAYER_SET(0), // set qwerty layout
};
and my keymap_common.h custom map
Code: Select all
/* Acorn Electron keymap definition macro
* K4D is the BREAK key, it is just a switch so not really part of the matrix
* but it will be nice to have to mapped to something
*/
#define KEYMAP( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
K4D \
) { \
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \
{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_NO }, \
{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K4D } \
}
I hope that's enough information so someone can understand and try to help me, thanks in advance for any help.