geekhack Community > Input Devices

Are these two trackpoint pinouts interchangable?


So I'm at the final stages of modifying my Cooler Master keyboard. I have made it fully programmable + connected a OLED screen + rotary encoder. Now I just need to add a trackpoint for it to finally be done. I managed to salvage a 2 part trackpoint from a Lenovo thinkpad that had a broken keyboard (see attachment). The problem is that there isn't any documentation for the pinouts. I found this 2 part trackpoint on deskthority: but I'm not sure if the 2-piece trackpoint pinouts are the same as mine (the components look different and my red dot has 5 connections while the one on deskthority only has 4).

So my questions are:
1. Is it possible to use the pinouts on the 2-piece trackpoint shown on deskthority for my trackpoint?
2. If not, what's the worst thing that could happen if I connected the wrong pins to my teensy? Could it fry the microcontroller or damage the trackpoint?
3. How do people find out which pins does what?

Help would be greatly appreciated!

It does look similar with the bottom two being NC (not connected) but your pictures, like the back one on Deskthority, are suffering from dark PCB syndrome - not quite as bad as black but unclear enough to add doubt when following the traces.  If you could get a pic of both sides looking like the front on Deskthority in the same size and angle (put the camera somewhere stable, take pic, flip PCB and take another pic) that would be great, I could then put all the traces in one pic so they're easier to follow.  Also there is some fuzziness around your big ribbon soldering, maybe flux?  If it brushes off that would be good. 

As long as you connect VCC (power) to the correct place and you don't short anything to it while testing you wont kill anything, it just wont work.  That is probably going to be the trace going through the most capacitors etc but a pinout would be extra safe - can you read the text on the chip?  If you can hopefully there's a datasheet which would confirm the 4 pins you need to connect to the Teensy, then you just follow their traces to the ribbon connector.

Not sure about the mouse buttons and reset - I guess when the trackpoint works you just short the pins to ground and see what happens with which.  Or you could just ignore them and use mouse keycodes in your keymap?  Not sure what exactly you're planning, though would be good to add your trackpoint to the Deskthority page to help anyone looking later :)

I hope these photos are better (sorry for potato quality). I tried searching for the chip datasheet but nothing seems to appear. Also, I apologise for the super glue over the traces. Didn't notice it until now. The buttons for the trackpoint won't be needed. I will, as you said, define them in another layer in the keymap.

I came up with this - assuming the last pink trace goes to the gap not one of the bottom two pads (maybe you can see it in person?) it looks very likely that it is the same as the pinout you linked as the top 5 go straight from the connector to the chip while VCC and GND go to the chip and elsewhere.

If it were mine I'd give it a go but I wouldn't blame you if you wait for someone else to comment.

Thanks! I tried the same pinouts as the one on deskthority, unfortunately it did not work. I see that there are several pins to the chip, could there be any other combination of pinouts?

It could also be something wrong with my firmware, although I took it straight of QMK:

--- Code: ---#ifdef PS2_USE_USART
#define PS2_CLOCK_PIN   PIND
#define PS2_CLOCK_DDR   DDRD
#define PS2_CLOCK_BIT   5
#define PS2_DATA_PIN    PIND
#define PS2_DATA_DDR    DDRD
#define PS2_DATA_BIT    2

/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
/* set DDR of CLOCK as input to be slave */
#define PS2_USART_INIT() do {   \
    PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT);   \
    PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT);     \
    UCSR1C = ((1 << UMSEL10) |  \
              (3 << UPM10)   |  \
              (0 << USBS1)   |  \
              (3 << UCSZ10)  |  \
              (0 << UCPOL1));   \
    UCSR1A = 0;                 \
    UBRR1H = 0;                 \
    UBRR1L = 0;                 \
} while (0)
#define PS2_USART_RX_INT_ON() do {  \
    UCSR1B = ((1 << RXCIE1) |       \
              (1 << RXEN1));        \
} while (0)
#define PS2_USART_RX_POLL_ON() do { \
    UCSR1B = (1 << RXEN1);          \
} while (0)
#define PS2_USART_OFF() do {    \
    UCSR1C = 0;                 \
    UCSR1B &= ~((1 << RXEN1) |  \
                (1 << TXEN1));  \
} while (0)
#define PS2_USART_RX_READY      (UCSR1A & (1<<RXC1))
#define PS2_USART_RX_DATA       UDR1
#define PS2_USART_ERROR         (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
#define PS2_USART_RX_VECT       USART1_RX_vect
--- End code ---

I just remembered one thing:
The QMK site says "To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data." I use a AT90USB1286 (teensy++ 2.0) so could it be that the pins I use are wrong? I use the D2 and D5 pins on the teensy++ 2.0, which are RXD1 and XCK1. It seems that on the pro micro the D2 and D5 do the same thing like on teensy (RXD1 nad XCK1) but could it be that I need to change something in the code?


[0] Message Index

Go to full version