AW: [basicstamps] Simulating Keyboard with stamp
Archiver
Posts: 46,084
thanks, Kevin, I'll give it a try!
Urspr
Urspr
Comments
> ...I did not fully understand that bit about the open drain story.
> Does that mean I connect a pull-up resistor to the clock line and
> then I connect a Stamp pin so that a LOW command pulls it low? If
> so, which command pulls it high again if not the HIGH command?
> There is no 'Neither HIGH nor LOW'-commmand... ;-)
The open drain/open source concept is described in the manual for
the SEROUT statement, but it's useful for more than SERIN/SEROUT.
Basically, it means you provide a default high or low logic level
via a pullup or pulldown resistor, then only assert the opposite
logic level. In the case of open drain, you tie the logic high via
a pullup resistor to +5V, then provide for a high logic level by
setting your pin to INPUT (so it makes no attempt to assert either
logic level and the pullup resistor keeps the line high), or to LOW
to override the default high condition and assert a low. Things are
reversed for open source.
The beauty of this arrangement is that it lets more than one source
(such as your keyboard and your Stamp) drive an open drain line low,
with no danger of an asserted high and asserted low conflict and the
associated smoke and $/DM/Euros.
Your clock and data lines are already pulled high by the PS/2 logic
in your keyboard/PC. All you need to do to make (i.e., leave) either
line high is to set the pin to an input via the INPUT statement. To
make either line low, use the LOW statment. Just don't use the HIGH
statement or any other statement--such as SHIFTOUT--that will set
your Stamp's pin to an asserted high.
After some more thought about this approach, I'm wondering if you
might need a switch to select between the Stamp or the keyboard so
that the Stamp's "keystrokes" are not overheard and interpreted by
the keyboard as PC commands. But I still like the idea of the
Stamp-keyboard combination since you want your PC to find a keyboard
at startup, and your Stamp won't be able to fool the PC into
thinking it's a keyboard.
Regards,
Steve
thanks for this detailled advice. It sounds a bit more complicated that I
had expected, I still would like to give it a try because it seems the only
possibility to remotely handle different programs on the same PC. I would
like to open and close Programms automaticly, use them remotely and such
stuff and the only way so far seems tzo be some director Xtra that runs
behind programs and qallows you to position the cursur and click. But I am
not very good at director so I was looking for the stamp-way.
I will give it a try and maybe ask you some more detailled questions if that
is OK for you...
For example I did not fully understand that bit about the open drain story.
Does that mean I connect a pull-up resistor to the clock line and then I
connect a Stamp pin so that a LOW command pulls it low? If so, which command
pulls it high again if not the HIGH command?
There is no 'Neither HIGH nor LOW'-commmand... ;-)
Sorry for my slow mind, thanx very much again.
Have a nice day, Uli
Urspr