Jump to content
IGNORED

USB Keyboard Adapter w/Arduino style components


jedimatt42

Recommended Posts

Please can you make blueprint for strip board? On strip board you put connection with wire or/and solder. Something like tapuino on http://sweetlilmre.blogspot.hr/2015/03/building-tapuino-r2.html.

This way we can make board at home.

 

Honestly, to lay that out on stripboard, I don't think it would fit very well in the console. You can give it a go though! The schematic is here: https://github.com/jedimatt42/TI-99-usb-keys/blob/master/TIUSBKeys.sch

 

You can also pay $22 to OSH Park, and they claim to ship international for free... https://oshpark.com/shared_projects/tlkbFvs3

 

-M@

Link to comment
Share on other sites

  • 1 month later...

What a great idea is this.

I had a Teensy 2.0 laying arround for months waiting for some project and then I stumbled across this project on github and here on atari age

when searching the internet for USB to XT keyboard converters.

 

So for the past weeks I was busy every evening in creating an USB TI-keyboard to be used on the PC with TI emulators.

I used the Teensy 2.0 for this task.

I had some problems with the combination of shift, control and function keys and any other key. But then I realized that the real TI99 must

be using open collector outputs for driving the keyboard matrix. I solved this by setting all outputs on the Teensy 2.0 as input and only

set one pin at a time as output. This solved my problem. I haven't checked yet if it is possible to set an output as open drain, because

that is what I really want.

 

Next I bought a Teensy 3.1 with a Sparkfun Arduino shield adapter and a Sparkfun USB host and created a USB to XT keyboard converter.

I'm using a wireless Microsoft keyboard and this works great with my Geneve.

 

I took a quick look at your code for this project just to get me started but created my own conversion programs for both the Teensy 2.0

(TI matrixc keybord) and Teensy 3.1 (Geneve keyboard) because it is just to much fun working with these things.

 

 

For the Geneve keyboard converter I added some extra functionality by using the left and right GUI (windows) keys:

 

Left GUI + Right GUI + m sets the keyboard in Mdos mode

and

Left GUI + Right GUI + b sets the keyboard in (Extanded) Basic mode

 

Now when typing some command and if you can't remember what it was exactly you can use one of the GUI keys together

with the first character of the command to get some hints. Using one of the GUI keys together with up/down arrow keys

enables you to browse through all commands starting with that same character while using the left/right arrow keys enables

you to browse through all alternatives of the same command (if any).

 

Also when the keyboard is in Mdos or Basic mode the TAB key can be used for command completion, Thus for example

when in Basic mode and typing in "CH" and hitting the TAB key the characters "AR(" are added making "CHAR(". Pressing

TAB again "AR(" is removed and replaced by "ARPAT(" making "CHARPAT(", etc.

 

Al this will also be available soon at my website www.ti99-geek.nl

 

Thanks again for this great idea.

 

 

Fred ;-)

  • Like 5
Link to comment
Share on other sites

What a great idea is this.

I had a Teensy 2.0 laying arround for months waiting for some project and then I stumbled across this project on github and here on atari age

when searching the internet for USB to XT keyboard converters.

It is surprising, how little there is in the USB to XT space. I am glad you were able to find my project!

 

So for the past weeks I was busy every evening in creating an USB TI-keyboard to be used on the PC with TI emulators.

I used the Teensy 2.0 for this task.

I had some problems with the combination of shift, control and function keys and any other key. But then I realized that the real TI99 must

be using open collector outputs for driving the keyboard matrix. I solved this by setting all outputs on the Teensy 2.0 as input and only

set one pin at a time as output. This solved my problem. I haven't checked yet if it is possible to set an output as open drain, because

that is what I really want.

I was able to find a manual change to the core_pins.c file for Teensy 3.0 to enable output-open-drain mode on the GPIO pins. It looks like I over-simplified my github README.md... this link should have been in there:

https://forum.pjrc.com/threads/7531-Internal-pull-up-and-pull-down-resistors-on-teensy-3?p=63944&viewfull=1#post63944

 

That post has the diffs needed for Teensy 3. If you check the datasheet on the processor used in the Teensy 2.0, and it supports open-drain, then you could likely implement something similiar for the Teensy 2.0.

 

There's no reason to be limited to what the Arduino libraries provide :)

 

Next I bought a Teensy 3.1 with a Sparkfun Arduino shield adapter and a Sparkfun USB host and created a USB to XT keyboard converter.

I'm using a wireless Microsoft keyboard and this works great with my Geneve.

 

I took a quick look at your code for this project just to get me started but created my own conversion programs for both the Teensy 2.0

(TI matrixc keybord) and Teensy 3.1 (Geneve keyboard) because it is just to much fun working with these things.

I hope the XT signalling code helped you out. I had a surprisingly difficult time finding code that worked, and had to write that from spec.

 

For the Geneve keyboard converter I added some extra functionality by using the left and right GUI (windows) keys:

 

Left GUI + Right GUI + m sets the keyboard in Mdos mode

and

Left GUI + Right GUI + b sets the keyboard in (Extended) Basic mode

 

Now when typing some command and if you can't remember what it was exactly you can use one of the GUI keys together

with the first character of the command to get some hints. Using one of the GUI keys together with up/down arrow keys

enables you to browse through all commands starting with that same character while using the left/right arrow keys enables

you to browse through all alternatives of the same command (if any).

 

Also when the keyboard is in Mdos or Basic mode the TAB key can be used for command completion, Thus for example

when in Basic mode and typing in "CH" and hitting the TAB key the characters "AR(" are added making "CHAR(". Pressing

TAB again "AR(" is removed and replaced by "ARPAT(" making "CHARPAT(", etc.

This is genious! So, are you just backspacing over text on the Geneve screen to provide the 'browse' functionality? Or did you hook a display up to the device?

 

Al this will also be available soon at my website www.ti99-geek.nl

 

Thanks again for this great idea.

 

 

Fred ;-)

Ok, so I have to ask... Have you hooked the TI->USB keyboard to your USB->XT->Geneve adapter? :)

 

-M@

Link to comment
Share on other sites

Thanks for the extra info. I will check the link for the opendrain outputs. (Suppose a ot of things can also be found when analyzing all the teensy

.h files). (hey ... also found that same story yesterday evening!).

 

It is sometimes difficult to find the most simpel things. I had problems getting the USB host to function properly and found all kind of solutions

of hardwiring the USB host reset signal. But finaly I found somewhere in the Teensy FAQ's some small code snipet and voila ... it worked.

 

//For Teensy3 with Sparkfun hub
#define MAX_RESET 7 //MAX3421E pin 12
#define MAX_GPX 8 //MAX3421E pin 17

void setup()
{
pinMode(MAX_GPX, INPUT);
pinMode(MAX_RESET, OUTPUT);

 

digitalWrite(MAX_RESET, LOW);
_delay_ms(20);
digitalWrite(MAX_RESET, HIGH);
_delay_ms(20);
}

 

According the XT coding: I spent some time figuring out how num-lock worked in cojunction with the arrow, insert, delete, home, and, page-up and page-down keys left of the numeric keypad.

It seems that some facke-shift up had to be send if num-lock is on. Found that here: https://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.htmlat paragraph 1.6.

I only implemented the first three lines. Seems to work okay (or good enough) with the Geneve.

 

The build in command completion is done with inserting texts, left arrows and delete chars.

 

Hooking up the TI->USB keyboard to the Geneve USB-XT keyboard is something I haven't tried yet (LOL).

If this functions properly maybe I create some fourth type of converter: TI->XT keyboard just because it can.

 

Fred ;-)

Edited by F.G. Kaal
Link to comment
Share on other sites

I just remembered why it is such a cunning plan to only switch the used keyboard output signal as output and keep al the others as input:

This way you don't have to add 7 external pullup resistors when using the open-drain mode of the outputs. The only thing you need now is a TI99 Keyboard, a Teensy 2.0, some wire and a USB cable.

 

Fred ;-)

Link to comment
Share on other sites

  • 11 months later...

I've updated firmware for the TI 99 USB Keys adapter.

 

This update fixes an issue reported by Sinphaltimus !! Thanks for kicking me into gear ! I've been living with this for a while.

 

The issue is that when a keyboard is not connected ( often due to having a KVM switched over to your googling machine ) I was configuring the interrupt inputs too early, which get triggered during the reboot and let a garbage keystroke some of the time.

 

Update instructions and download link for the firmware are here: http://ti994a.cwfk.net/TiUsbKeys.html

 

-M@

  • Like 3
Link to comment
Share on other sites

I've updated firmware for the TI 99 USB Keys adapter.

 

This update fixes an issue reported by Sinphaltimus !! Thanks for kicking me into gear ! I've been living with this for a while.

 

The issue is that when a keyboard is not connected ( often due to having a KVM switched over to your googling machine ) I was configuring the interrupt inputs too early, which get triggered during the reboot and let a garbage keystroke some of the time.

 

Update instructions and download link for the firmware are here: http://ti994a.cwfk.net/TiUsbKeys.html

 

-M@

My download links were broken yesterday... those are fixed now.

 

-M@

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...