Jump to content

Photo

USB Keyboard Adapter w/Arduino style components


106 replies to this topic

#101 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • Topic Starter
  • 1,243 posts
  • Location:Beaverton, OR

Posted Thu Apr 28, 2016 5:25 PM

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.b...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/j...r/TIUSBKeys.sch

 

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

 

-M@



#102 F.G. Kaal OFFLINE  

F.G. Kaal

    Space Invader

  • 29 posts

Posted Sun May 29, 2016 5:06 AM

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 ;-)



#103 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • Topic Starter
  • 1,243 posts
  • Location:Beaverton, OR

Posted Sun May 29, 2016 9:27 AM

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.c...ull=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@

#104 F.G. Kaal OFFLINE  

F.G. Kaal

    Space Invader

  • 29 posts

Posted Mon May 30, 2016 9:18 AM

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....cancodes-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, Mon May 30, 2016 11:50 AM.


#105 F.G. Kaal OFFLINE  

F.G. Kaal

    Space Invader

  • 29 posts

Posted Mon May 30, 2016 11:33 AM

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 ;-)



#106 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • Topic Starter
  • 1,243 posts
  • Location:Beaverton, OR

Posted Sat May 13, 2017 3:27 PM

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@

#107 jedimatt42 OFFLINE  

jedimatt42

    Stargunner

  • Topic Starter
  • 1,243 posts
  • Location:Beaverton, OR

Posted Sun May 14, 2017 8:58 AM

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@




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users