[Coco] USB keyboard interface for CoCo

Allen Huffman alsplace at pobox.com
Thu Dec 6 20:49:13 EST 2012


On Dec 6, 2012, at 7:23 AM, Phill Harvey-Smith <afra at ramoth.org.uk> wrote:
> I believe some of the USB AVRs can do USB on the go (AT90USB647 & AT90USB1287) which should be sufficient for connecting a keyboard to, there's also a pretty good AVR USB library (in C) LUFA : http://www.fourwalledcubicle.com/LUFA.php
> 
> Only disadvantage is that these AVRs are only available in surface mount packages.


I found a project (using a Teensy board) that adds on a USB Host adapter which was only $14.90:

http://www.irongeek.com/i.php?page=security/homemade-hardware-keylogger-phukd

It uses two I/O pins, plus power and ground. The USB host device seems to turn the USB messages in to text strings which could be parsed. This guy modified the firmware of the USB board so he could send his own, more efficient packets.

Of interest, this USB device is set up to read keyboards, mice or storage devices. When you load it up as a mass storage adapter, you talk to it using strings like "dir" and "copy". I thought this might be a potential easy way to use USB flash drives or even hard drives on a CoCo, but the command set looks like it can only manipulate a file system (copy, rename, delete) or "type" a file. I don't know what would happen if you typed a binary file, but perhaps it could let a CoCo do read-only on a FAT filesystem USB device :-) Cheap enough! That, and a converter to RS232 signal levels, could plug up to a serial port.

That adapter, and a Teensy ($16, or $19 with header pins) could make a pretty cheap interface for a CoCo/PC keyboard adapter. And the Teensy 2.0 is very low power (I do not know about the USB Host adapter).

Or, there is an Arduino USB Host shield for $24:

http://imall.iteadstudio.com/development-platform/arduino/shields/im120417019.html

This company (in China, I think) has some CHEAP prices on all kinds of things. I bought one of their Screw Shields last October (from a USA dealer) and was satisfied with the quality.

So, $16 Teensy plus $14.90 USB device ($31), or $22 Arduino plus $24 USB Host Shield ($46).

Today, I used a Teensy and wired up an Atari 2600 joystick to it, then fed that in to my iPad via USB and was able to use it to play the iCade games (Atari, Activision, Midway Arcade, etc.). I think there is much potential for these cheap things to interface with the CoCo, and I hear there are plenty of even cheaper PIC chips that can do this stuff.
-
Allen Huffman - PO Box 22031 - Clive IA 50325 - 515-999-0227 (vmail/TXT only)
Sent from my MacBook.

A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?




More information about the Coco mailing list