-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NeXT non-ADB keyboard timing #704
Comments
Thanks for the headsup. |
FWIW, I wrote more about this here, including logic analyzer and oscilloscope images of the timing: https://journal.spencerwnelson.com/entries/nextkb.html |
NeXT keyboard uses 52.75us per pulse. #704 https://github.com/tmk/tmk_keyboard/wiki/NeXT
Thank you for your detailed writeup. I also confirmed the bit width(52.75us) with my NeXT Keyboard using Logic Analyzer. The converter can read signal at way better timing now. Before Fix(signal read timing at 9b99f8f) After Fix(signal read timing at dcebfb4) In this capture the converter reads 'IN' at either edge of 'Read'. MEMO: https://github.com/tmk/tmk_keyboard/wiki/NeXT#next-keyboard-protocol |
Reimplemented NeXT converter interpreting the protocol as UART 9-bit data, not a long bit sequence. https://github.com/tmk/tmk_keyboard/wiki/NeXT#next-keyboard-protocol https://github.com/tmk/tmk_keyboard/tree/master/converter/next_usb_ng |
I recently acquired a NeXT non-ADB keyboard, and have been exploring it pretty thoroughly with an oscilloscope and logic analyzer. Like you (https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/protocol/next_kbd.c#L153-L162), I noticed that the timing of the keyboard's signal is not quite 50 microseconds, or even 51 microseconds.
It turns out that the timing is actually 52.75 microseconds per pulse, corresponding to a frequency of 18,957 hertz. That's because the keyboard uses a Ceralock CSB455 oscillator:
This oscillator has a frequency of 455 kHz, and drives the keyboard's signal, updating the pulse every 24 clock cycles. 455 kHz / 24 is 18.957 kHz - resulting in the 52.75 microsecond pulses.
I have no reason to believe your code is behaving too badly, but at the least you might want to fix comments and the header settings, for example here:
tmk_keyboard/tmk_core/protocol/next_kbd.h
Line 54 in a93677c
and here:
tmk_keyboard/tmk_core/protocol/next_kbd.c
Lines 62 to 67 in 8c0e245
The text was updated successfully, but these errors were encountered: