[Coco] Arduino as a Mouse/Keyboard interface?
Andrew
keeper63 at cox.net
Mon Jul 2 12:32:16 EDT 2012
I know I'm a little late on this discussion, but...
I know I'm a little late on this discussion, but...
> Message: 4
> Date: Sun, 1 Jul 2012 16:27:13 -0500
> From: Allen Huffman <alsplace at pobox.com>
> Subject: Re: [Coco] Arduino as a Mouse/Keyboard interface?
> To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
> Message-ID: <C2B30095-3408-40C1-9A30-7D17CED608EC at pobox.com>
> Content-Type: text/plain; charset=us-ascii
>
> This is actually why I was asking about CoCO keyboard matrix a few weeks before CoCoFEST. I had planned to do this very thing and bring one to the Fest. But, I still have not gotten to it.
I've often thought about it myself, but without having my system set up,
it's stayed "back-burner".
> Yes, it sounds possible with the $30 (less, discount) Arduino boards. There is code available to read USB keyboard, and it has I/O lines to hook to the keyboard port. I was thinking it may have been one or two lines short, though. I did not think of a mouse, but it might have analog outs that could do the same thing for a mouse.
Yep - USB keyboard (and I think mouse) interfacing have been done with a
328-based Arduino; whether at the same time or not, I don't know. Worst
case, you could drop a 644 (Sanguino) in for extra lines/memory to do
it. Note, though, that there isn't any "analog outputs" on an ATMega;
you use PWM on a digital output run thru a low-pass filter to smooth the
output to simulate a 0-5 volt signal. What might be better, though,
would be to use an external digital potentiometer (SPI or otherwise).
> It would be very cheap. RadioShack even sells them.
So does Fry's electronics, but I personally like online sources for my
Arduinos.
> Message: 6
> Date: Sun, 01 Jul 2012 23:06:52 +0100
> From: Phill Harvey-Smith <afra at aurigae.demon.co.uk>
> Subject: Re: [Coco] Arduino as a Mouse/Keyboard interface?
> To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
> Message-ID: <4FF0C9FC.6010909 at aurigae.demon.co.uk>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> I've done PS/2 -> Retro computer (including CoCo / Dragon) in the past,
> using an AVR, should be possible to use Arduino, as this is after all
> AVR based.
ATMega328 on both it (Uno) and the Leonardo. 644 on the Sanguino, and
1280/2560 on the Arduino Mega (SMT only). Of course, there are other
configurations, too - but the above seem to be the most popular, IMHO.
> Rather than hooking the AVR's I/O lines directly to the 6821, a better
> IMHO way of doing it is to have a crosspoint switch in between such as
> the MT8816, the AVR translates the PS/2 (or USB) scancode into a
> row/column, and turns on or off the switch (within the crosspoint) that
> corisponds to the CoCo key you want to press. The output from the
> crosspoint matrix is connected to the CoCo keyboard port.
IYO, why would this be better than direct control by the ATMega
(assuming the pins were available, and direct port addressing was used)?
I could see using a buffer or such in between the parts, and such a
switch would take care of that aspect.
> As far as the CoCo is concerned it has a normal keyboard connected, and
> it doesn't matter what the scanning code on the CoCo does, it just
> "sees" a key depressed and reads it as it would a standard keyboard.
Ultimately, however it is done, such an adapter would be a nice new
hardware addition for the CoCo; it could probably be easily mounted
inside and powered off the CoCo's PSU, and it might be possible to route
the USB port (using a cutoff extender cable) outside the case without
having to modify the case (if that is a concern). Even if you had to
modify the case for a USB port, it could be done very discretely.
-- Andrew L. Ayers, Glendale, Arizona
More information about the Coco
mailing list