Typewriter Interface
I have an old electronic typewriter that I am trying to modify to type on it's own with input over serial.
There are 16 pins coming from the keyboard. I have an Arduino that I hooked up to all 16 pins for key mapping. I have discovered that if pins 1-8 are held high one of the other 8 pins (9-16) will go high as well. Pins 9-16 have diodes that prevent them from being held high by the original microcontroller (I think that is what they would do since they are facing toward the micro in the circuit).
The problem is this: How do I use a propeller connected to just those 16 pins to fake a key press? As a test I tried faking a spacebar press by holding pin 1 high and pin 3 low (which is the combo for that character), but to no avail. Is there some reason the original microcontroller wouldn't be fooled by this? Is there another way to do it that doesn't involve lots and lots of relays?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/
There are 16 pins coming from the keyboard. I have an Arduino that I hooked up to all 16 pins for key mapping. I have discovered that if pins 1-8 are held high one of the other 8 pins (9-16) will go high as well. Pins 9-16 have diodes that prevent them from being held high by the original microcontroller (I think that is what they would do since they are facing toward the micro in the circuit).
The problem is this: How do I use a propeller connected to just those 16 pins to fake a key press? As a test I tried faking a spacebar press by holding pin 1 high and pin 3 low (which is the combo for that character), but to no avail. Is there some reason the original microcontroller wouldn't be fooled by this? Is there another way to do it that doesn't involve lots and lots of relays?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/
Comments
Analog switches.
A keyboard matrix generally works that way:
sequentially, a signal is set on every row and the processor checks in wich column that signal reapears. So setting some input to L or H won't help. You'd have to read the scans on the row and react by setting the column high.
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
That makes sense, but does it mean that it is impossible for me to do it with just the propeller chip? Seems to me that checking for the host micro to send out a signal on the right pin and then putting the corresponding pin high would be too slow.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/
You might be able to have the Propeller listen to the input lines and then pull the correct output lines to create "virtual" keypresses. Although there'd be some latency, which the keyboard controller might not handle.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Composite NTSC sprite driver: http://forums.parallax.com/showthread.php?p=800114
NTSC & PAL templates: http://forums.parallax.com/showthread.php?p=803904
did you measure voltage-levels and current on all the lines when the keyboard is connectec to the original MCU ?
I guess the original MCU does set for example set one columm high and then looks which row is high
in correlation to the columm set high
you have to analyze if this is the case and which pins are used as outputs and which as inputs
and at what frequency the ouput-pins are switched
to emulate the keyboard the propeller will have to listen to the output-pins and set the correlated
input-pins (of the keyboard) high to emulate the keypress
how many keys does the keyboard have ?
brs
Not necessarily. If you do have a scope, find the output lines of the keyboardcontroller and check its timing. It might be something in the 1 kHz to 10 kHz range (wild guessing). And that would work with the propeller.
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
This may seem like a stupid question, but how would I write a little chunk of assembly code that would check if one pin is high and if it is pull another pin high as long as the first pin is high? This is a little beside the point, but how do you check whether pins are high or low, and how do you set them high or low, in Spin?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/
I would do that in Assembler. SPIN might be too slow. But have a look at the waitXXX commands.
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
BH
I have this so far for an asm routine to check a pin and set another high.
I know dira[noparse][[/noparse]0] and dira is incorrect, but I have no idea how to do that in asm. But besides that what I think this does is set pin 0 to output, pin 1 to input, and then sets pin 0 to whatever pin 1 is. Is that right? How do I do the dira[noparse][[/noparse]0] and dira part?
UPDATE: I just tried this code out:
And it worked
This speed may not stay around with added code, so my other questions still stand.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/
Post Edited (SciNemo) : 6/23/2009 8:58:15 PM GMT
To replace the keyboard with a prop receiving serial data you need to know what row and column that character is on, and when the correct row reads high the prop outputs a high to the corresponding column.
If it is old Teletype style Typewriter with mechanical control it is posible that TGB wast diode matrix decoded.
In that decoding every column signal was decoded by diodes directly to one BAUDOT else in newer ASCII code by diode matric on its ROW.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
Combos is a list of the pin combination for each key, in ascii order. Right now it only contains space, but I've mapped the other keys. The 16 pins from the typewriter micro that interfaced with the keyboard are connected to pins 0-15 of the prop.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/
I used to modify electronic typewriters to work with microcomputers.
Some of the brands were Royal, Olivetti, and Canon.
humanoido
I just tested some new techniques using an atmega168 and managed to get it working with that. The new setup has the typewriter modified with a serial port on the side that allows my propeller to communicate with the mega168 inside which converts all the data sent to it to emulated key presses that the typewriter picks up and types out.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/
Post Edited (SciNemo) : 6/25/2009 1:50:36 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/
humanoido