Need help on a Tandy TRS-80 USB conversion

rommelbquinto

20 Apr 2020, 05:16

I have recently purchased a Tandy TRS-80 keyboard and it looks awesome and the keys are awesome. It's a has a 5-pin port connector and I tried my regular soarer's converter and it does not respond at all. The only response I get is for the num-lock and caps-lock key light turning on, so i am sure that there is power on it.

The parts inside when i open it looks exactly like a Tandy 1000 keyboard, with the only exception of the port connector having a 5-pin --> wiki/Tandy_1000

Attached is my keyboard.

Any suggestions or who is familiar on converting this to a USB or at least how I can make it work?

Thanks!
Attachments
IMG_4308.jpg
IMG_4308.jpg (618.85 KiB) Viewed 6583 times

User avatar
OldIsNew

20 Apr 2020, 15:19

I have a Tandy 1000 and it's a nice board overall. I really do like FLS switches quite a bit. I ended up tracing out the matrix and doing a controller replacement with a Teensy:

viewtopic.php?f=2&t=17994&hilit=tandy


I don't know anything about the protocol on your board however maybe someone else does. It would be worth at least looking into more before going the controller replacement route, though it may come down to that.

MMcM

20 Apr 2020, 16:26

Here is the Service Manual for the Tandy 2000, which I believe is that specific model: http://bitsavers.org/pdf/tandy/26-5103_ ... l_1984.pdf. See section 7.6.

The protocol looks to be the same as the Model II, discussed on the EEVblog: https://www.eevblog.com/forum/beginners ... -model-ii/. This was in the opposite direction, making a modern keyboard work with an old computer, for which there seem to be projects around. But the information is the same.

User avatar
OldIsNew

09 May 2020, 04:25

rommelbquinto

--> Just wondering if you want to share your Teensy project for your Tandy keyboard. Let me see if I can trace it on my board.

Thanks!


This is the Teensyduino code I wrote for this board. I'm not a programmer so I'm sure there are better ways to do it but it works. It's important to note that this was written with the Arduino IDE with the Teensyduino add on using the Teensyduino USB keyboard library. I also have a version that is modified so that the atypical keypad keys such as 7 / backslash, 8 / tilde , Insert / +, etc. register as printed on the keyboard if your interested - but it's just a modification for these specific keys. I write my own code for my boards because that's part of the hobby for me. It's very basic and my goal is just to reproduce the keys as as they appear on the board ( not interested in layers or making it mimic a modern layout, etc). I figured I'd post this in the thread so anyone interested can see it, and would really appreciate any feedback. My main point is that its that not hard to write your own simple code to make your vintage keyboards work and it's fun!

Tandy_1000_P.7z
(1.63 KiB) Downloaded 203 times

MMcM

11 May 2020, 06:10

I spent a little bit of time looking into what might be possible without a controller replacement.

I too only have access to a Tandy 1000 keyboard, though it looks pretty much the same except for having a DIN-8 instead of a DIN-5. It might even be the same PCB.
tandy-1000-top.jpg
tandy-1000-top.jpg (1.09 MiB) Viewed 6266 times
tandy-1000-bottom.jpg
tandy-1000-bottom.jpg (1.47 MiB) Viewed 6266 times
The Technical Reference Manual isn't on Bitsavers, as was the Tandy 2000 linked to above. But it is on The Oldskool PC.

The DIN pinout described there also matches what's on KbdBabel Vintage Keyboard Documentation: Keyboard Connectors, with the unknown pin 2 being BUSY, which the PC can use to inhibit the keyboard. There's an appropriate resistor, so this doesn't need to actually be connected. Neither does RESET, since the converter doesn't really ever restart. But with everything connected, the adapter is something like this:
tandy-1000-teensy.jpg
tandy-1000-teensy.jpg (402.31 KiB) Viewed 6266 times
I sketched out what this would look like for QMK here, including details of the connections on that proto board. If the keyboard were really to be used with a modern system, some remapping for missing keys would no doubt be needed.

Note that CAPS and NUM LOCK can't really be remapped, since they maintain their LEDs inside the keyboard and toggle on alternate presses, with no code sent on release.

This initial version doesn't seem 100% reliable, unfortunately. Occasionally there is a spurious read of DATA as high instead of low. This can be a mess because it then looks like some key is stuck down. Better designed protocols have an all-keys-up code that substitutes for the last break code.

From the few I scoped earlier, it looked like the data line was stable before the clock line rose, as it needs to be.
tandy-1000-make-A.png
tandy-1000-make-A.png (23.36 KiB) Viewed 6266 times
tandy-1000-make-1.png
tandy-1000-make-1.png (24.51 KiB) Viewed 6266 times
But perhaps this isn't always the case. In which case a delay or a pull-down resistor or something like that might help. It's also possible that it's a problem with the rest of the USB stack doing something complicated sometimes. There is debug logging (Shift-Shift-D) for losing an interrupt altogether, so that doesn't seem to be it. And even though the minimum timing quoted in the spec is pretty tight, in actuality it seems to be about 30μs per bit, since after all it's coming from an 8048. A 16MHz AVR can keep up with that.

User avatar
elecplus

11 May 2020, 16:19


MMcM

11 May 2020, 21:40

Yes, as an earlier post from that same blog, http://nerdlypleasures.blogspot.com/201 ... -1000.html, points out, the Tandy scan codes are clearly taken from the 83-key XT ones. This is apparent looking at the spec. Of course, with 90 keys, something has to be done about F11 and F12. And for INSERT, DELETE, and HOME, which are split off from KP 0, DOT, and 7. And the arrows, which are split off from KP 2, 4, 6 ,8.

But the serial hardware protocol is not the same, though it is in some ways similar in having separate CLOCK and DATA lines and sending LSB first. The second post confirms that later models like SL that had switched to taking a standard 101-key XT keyboard still worked with an old keyboard for compatibility. I suppose this is similar to how one tells a real XT with CLOCK idle high and DATA idle low from clones that have both idle high and send one start bit instead of two. The Tandy CLOCK is idle low and triggered when rising.

Which I guess raises the possibility of a modern converter accepting both protocol keyboards. I admit I didn't try connecting to Soarer's to see what happens. I've never seen mention of supporting that, and I don't see how it could just happen, but it does indeed do lots of auto-detection.

User avatar
OldIsNew

17 May 2020, 23:08

MMcM wrote:
11 May 2020, 21:40
Yes, as an earlier post from that same blog, http://nerdlypleasures.blogspot.com/201 ... -1000.html, points out, the Tandy scan codes are clearly taken from the 83-key XT ones....
Very cool! Hope can work out a native conversion. Otherwise, the dark side of desoldering and more awaits ....

MMcM

30 May 2020, 04:14

MMcM wrote:
11 May 2020, 06:10
This initial version doesn't seem 100% reliable, unfortunately.
It's much more reliable after turning off the SOF interrupt on hasu's advice. I won't promise 100%, but it should definitely be usable now.

MMcM

20 Jun 2020, 17:23

A quick check confirms that, indeed, as suggested above, the clocked bit serial signal protocol for the Model II is the same.

The codes are different, being mostly ASCII, except that sometimes the shifts affect high bits. From the Technical Reference Manual:
model-ii-tech-pg-136.png
model-ii-tech-pg-136.png (174.49 KiB) Viewed 5880 times
The same serial input routine will work, but since there are no break codes, the converter logic would need to fake those and the whole converter will be a lot less flexible.

The switches are Keytronic, so doing the whole board means depleting the supply of foam and foil replacement here. (Yeah, the foil has corroded away, too.) So that and the necessary code refactoring will have to wait for restocking.

User avatar
anthonymak

09 Aug 2020, 10:48

Just finished a usb conversion to a TRS-80 model 4P with teensy++2.0
Attachments
IMG_4658.jpg
IMG_4658.jpg (3.33 MiB) Viewed 5261 times
IMG_4657.jpg
IMG_4657.jpg (2.37 MiB) Viewed 5261 times
IMG_4656.jpg
IMG_4656.jpg (2.83 MiB) Viewed 5261 times
IMG_4659.jpg
IMG_4659.jpg (3.3 MiB) Viewed 5261 times

User avatar
hellothere

09 Aug 2020, 23:58

anthonymak wrote:
09 Aug 2020, 10:48
Just finished a usb conversion to a TRS-80 model 4P with teensy++2.0
First, thanks very much for updating this thread!

Second, I have a Tandy 1000 keyboard and I'd like to make it work with a Teensy. Can you please provide a bit more detail into how you wired up the Teensy and how you wired up the board? I see bunches of resistors and additional wire, but if I just wired it based off the pictures, the keyboard or I would blow up. Or both.

User avatar
anthonymak

10 Aug 2020, 04:55

hellothere wrote:
09 Aug 2020, 23:58
anthonymak wrote:
09 Aug 2020, 10:48
Just finished a usb conversion to a TRS-80 model 4P with teensy++2.0
First, thanks very much for updating this thread!

Second, I have a Tandy 1000 keyboard and I'd like to make it work with a Teensy. Can you please provide a bit more detail into how you wired up the Teensy and how you wired up the board? I see bunches of resistors and additional wire, but if I just wired it based off the pictures, the keyboard or I would blow up. Or both.
Hi, what I did is to first isolate all the soldering pad by disconnect all the traces on the pcb. My case is simple as there is no other component except switches and keycaps. You need to draw up a matrix which you want to use, add diodes to each switch and connect all the pads according to your matrix. I have no idea which Tandy 1000 you have but a teensy++2.0 should have good enough pins for almost any keyboards.

MMcM

10 Aug 2020, 05:22

hellothere wrote:
09 Aug 2020, 23:58
I have a Tandy 1000 keyboard and I'd like to make it work with a Teensy.
Note that the converter mentioned upthread does now mostly work externally without any change to the keyboard at all. And, except for the lock keys which need to be handled specially, it is fairly generally remappable.

So, if you're afraid to damage it, you could always start there.

User avatar
hellothere

11 Aug 2020, 22:01

Immense thanks to both of you, anthonymak and MMcM.

Post Reply

Return to “Workshop”