Very cool. I've been working on something similar (to/from PS/2) on a PIC. The mouse is multiplexed in as well... there's a keyboard query and a mouse query (1 bit set, 2 bits set), and the mouse data is sent the same way as the keyboard data.
Nice, this looks promising. Those soundboxes are increasingly hard to come by. I've also been looking into making a mono y-cable db19->db19/vga it would be great to skip the soundbox all together and have the option to use a ps/2 kvm.
I've seen some discussion about the pin-outs for the y-cable on this forum but nothing I've felt was definitive.
gtnicol, do you have the pinouts?
Yes, I had some cables made up that go from mono->via, but you still need the soundbox for the keyboard. My longer term plan was to have a PS/2+VGA adapter for the NeXT box so you could use a normal keyboard and display with them, but the audio, video, power, and mouse+kbd all go down the mono cable, which runs at about 5MHz (from memory). I picked up a propeller and an XMOS to finish off the project, but got really busy afterward.
I will dig up the PS/2 project again... it was pretty close to done using a single PIC.
I've got a propeller, they used them on the DEFCON badges this year. Two ps/2 ports and vga out as well.
FYI those hard to find DB19 male connectors are available here:
http://iec.net/Browse05/MPartDB19.html they told me they have a couple hundred in stock.
I was inspired by the Arduino tutorial and decided to get this running on my Teensy 2.0. For some reason the Arduino code would not run properly for me even though the two boards are mostly compatible and lots of projects will run on both without modification.
The Teensy is only $16 (
http://pjrc.com/teensy/index.html).
Code is here:
https://code.google.com/p/teensy-nextkb/
I'm typing this post using this project. Neato.
I've got it working too...
However, behavior is a little odd...
Shift key LEDs do not stay on if you continue holding either key down.
Also, the LED on the arduino micro (13) never goes off... from the code it seems if there are no keypresses it should be off?
It appears the OS (Win7) does not recognize a constant depression of the shift key either, rather a series of presses (?)
Maybe the keyboard is not returning 0x200600 when idle?
Tim
Quote from: "timu"Also, the LED on the arduino micro (13) never goes off... from the code it seems if there are no keypresses it should be off?
It should go off, though I've seen this happen a couple times on mine and I've had to hit the reset which fixed it.
Quote from: "timu"It appears the OS (Win7) does not recognize a constant depression of the shift key either, rather a series of presses (?)
Probably due to the "fix" for the sticky modifier keys. I'd just made a note in my version to try to make that a little smoother, which I'll probably do tonight or tomorrow.
BTW I mentioned this on another thread, but if anyone wants a version with preliminary (in other words, not working very well yet) mouse support:
https://github.com/mgrdcm/USB-NeXT-Keyboard/tree/mouse
Quote from: "pergamon"
It should go off, though I've seen this happen a couple times on mine and I've had to hit the reset which fixed it.
No luck, even with multiple resets... It is not full intensity, you can tell it is cycling high/low.
Does your shift LEDs stay on if you hold down the shift key?
I turned on the debug and discovered that my keyboard is returning 0x300600 when idle.
So, I redefined NEXT_KMBUS_IDLE to 0x300600
Now, the LED is off unless there is a keypress, and the shift LEDs stay on.
OS now sees a held down shift as a constant keypress.
Quote from: "timu"I turned on the debug and discovered that my keyboard is returning 0x300600 when idle.
So, I redefined NEXT_KMBUS_IDLE to 0x300600
Now, the LED is off unless there is a keypress, and the shift LEDs stay on.
OS now sees a held down shift as a constant keypress.
Fascinating!
I wonder if your KB is especially new or especially old. Would you be willing to share your serial number (or an approximation of it)? I know there are at least 2 different layouts of US non-ADB NeXT keyboards. I need to pull out a sampling of the various models I have and test them...
Quote from: "pergamon"
Fascinating!
I wonder if your KB is especially new or especially old. Would you be willing to share your serial number (or an approximation of it)? I know there are at least 2 different layouts of US non-ADB NeXT keyboards. I need to pull out a sampling of the various models I have and test them...
I am currently using a SN slightly above ABP5102150
I have another keyboard at home, which I will try later.
Quote from: "timu"I am currently using a SN slightly above ABP5102150
If memory serves, that's a very late model one.
I wouldn't be surprised if it turns out that the IDLE signal is different to tell the host which version or key layout the keyboard is.
the AVR internal clock is not super accurate, perhaps the timing is slightly off?
The line is high when idle and the bits come in lsb order, so the difference between 0x200600 and 0x300600 is one bit on the idle high
000000000110000000011 (0x300600)
000000000110000000001 (0x200600)
--_________--_________--
xx01234567890123456789xx
This makes sense also because the code is using a 32bit int to represent the 22 bit idle msg and shifting the signal left into the 32bit response value, so by the time it gets to the last 9 0 bits the avr is taking longer to shift and or the msb since its registers are only 8 bits
My other keyboard, SN APB2123500 is returning 0x200600.
Is anybody (still) using one of these? I see a new project in my future...
Heck yes , the software tools to do it may be here
https://github.com/tmk Best Regards Rob Blessin
USB to NeXT
https://learn.adafruit.com/usb-next-keyboard-with-arduino-micro/overview but it would be cool to have a USB keyboard to NeXT adapter
One question I have is it possible to bypass the NeXT sound card ,
I envision an adaptor nonadb or adb keyboard or USB to DB19 Connector , with the custom video Y cable , I have one end goes to a flatpanel the middle to the cube or mono slab and the other end the sound box , I have lots of NeXT shells so it be easy to mount the DB19 Female connector to it .
I'm wondering if an arduino solution would work here.
Does a NeXT Keyboard use anything on the sound card ... I guess would be the question or can it be hard wired directly to the connector ? Difference between ADB and NON ADB pin 7
Heck yes , the software tools to do it may be here
https://github.com/tmk Best Regards Rob Blessin
USB to NeXT
https://learn.adafruit.com/usb-next-keyboard-with-arduino-micro/overview but it would be cool to have a USB keyboard to NeXT adapter
One question I have is it possible to bypass the NeXT sound card ,
I envision an adaptor nonadb or adb keyboard or USB to DB19 Connector , with the custom video Y cable , I have one end goes to a flatpanel the middle to the cube or mono slab and the other end the sound box , I have lots of NeXT shells so it be easy to mount the DB19 Female connector to it .
I'm wondering if an arduino solution would work here.
Does a NeXT Keyboard use anything on the sound card ... I guess would be the question or can it be hard wired directly to the connector ? Difference between ADB and NON ADB pin 7
Pins 3,4,5,6, 7 ADB from Brian' s diagram... may be Archer's tried it!
http://asterontech.com/Asterontech/next_adb_conversion.html
Cool. I'm going to make one, maybe more than one. It would be cool if it enabled the mouse too, but I doubt it does that.
I still use mine occasionally... love the keyboard.
If you skim thru all the comments on this thread, you will see pergamon had posted a link to a version of the sw with preliminary mouse support.
Tim
Yeah, it looked like that was a PIC solution, not an Arduino one. But maybe the Arduino is a PIC microcontroller? :)
I spent a fair bit of time on this in the past... mostly working with a PIC.
I forget exactly but the bus is 5MHz or something like that, for video, sound, mike, and keyboard/mouse etc. With some of the more modern microprocessors you could bit-bang the bus and still have cycles for converting the video/sound to something modern computers could handle.
Somewhere or other I have the data sheet for the ASIC that manages the bus.