Re: USB keystroke transfer device...
- From: IanM <look.in.my.sig@xxxxxxxxxxxxxxx>
- Date: Fri, 13 Feb 2009 01:37:41 +0000
Baron wrote:
Geir wrote:Also google 'Serialkeys accessability' (NO quotes).
Hi,
Does any of you know about a USB device /adapter which can connect two
computers (PC-A and PC-B) together.
The device indetifies itself as a generic keyboard to PC-B and as a
virtual COM port to PC-A.
With the aid of custom software on PC-A pushing character data
separated by <TAB> to its virtual serial port, this data is entered
into PC-B's current application as if it was entered from the
keyboard...
Thanks for hints and tips on where you can find / buy a gadget like
this ;-)
regards
geir
Google "Keyboard Wedge" It might help.
You can control PC-B with an ordinary null-modem serial cable from PC-A and a pretty simple piece of custom software using GIDEI commands. If you can settle for a CLI application, you could even do it from good old GWBASIC!
In fact its so ****ing simple that I've just turned SerialKeys on (built into Windows Accessibility up to XP), configured it for COM2 4800 baud to match the breadboarded Microchip PIC project I've been playing with and powered up the project with the existing serial demo I was looking at. I'm going open notepad, release the PIC reset line and paste the result below.
{paste from notepad]
**********************
* PICUART DEMO *
* Originally by *
* Fr. Thomas McGahee *
* Apr 2000 *
* *
* PIC16F88 Version *
* by Ian.M *
* Feb 2009 *
**********************
{end paste]
OK, I've turned it back off.
That's straight from the UNMODIFIED character stream it normally sends to a terminal program. Its double spaced because the PIC is sending <cr><lf> at the end of each line and I couldn't put it directly into this post because the newsreader uses Ctrl-m at the hotkey for 'compose new message'. You'll need to deal with the protocol a bit better than that as there is a handshake, escape characters, and it drops back to 300 baud on framing errors.
For the terminally geekish, here is a snippit of the program responsible for that startup message:
....
message movlw 0....
movwf msgptr ;A retlw table is defined using dt at
;getdata. This is the offset into it.
msgloop call getdata ;The string is null terminated
addlw 0 ;test for it
skpnz
return ;YES - we are done. DONT send the null! call transmitw
movlw 250 ; Wait for 2.5 + 1 ms
call wait ; as the tx data was being corrupted!
call wait1mS ; Possibly by a known hyperterminal bug. :-(
incf msgptr,F
goto msgloop ;and go back for the next character
wait ; Period/10 in uS in W.
retlw 0....
wait1mS movlw 222 ; Approx 1 ms @ 3.579545 MHz clock
return ; total cycles: 6 + 888 + 1....
transmitw....
;transmitw is most common entry point.
;(output what is in W)
btfss PIR1,TXIF
goto transmitw ;wait for transmitter interrupt flag
gietx bcf INTCON,GIE ;disable interrupts
btfsc INTCON,GIE
goto gietx
movwf TXREG ;load data to be sent...
bsf INTCON,GIE ;re-enable interrupts
return ;tx_data unchanged. ;transmitted data is in W
org (($+0x0FF)/0x100)*0x100 ; Align the table at a page boundary....
getdata movlw HIGH TblMessage ; dont forget to set PCLATH!
movwf PCLATH
movfw msgptr ; The table *MUST* be shorter than
; 252 chars, to fit within the page
; or it *never* returns! addwf PCL,F
TblMessage dt " \r\n" ; PC Hyperterminal bug workaround
dt " \r\n" dt "**********************\r\n" ;(24 chars * 10 lines =240) dt "* PICUART DEMO *\r\n"
dt "* Originally by *\r\n"
dt "* Fr. Thomas McGahee *\r\n"
dt "* Apr 2000 *\r\n" dt "* *\r\n"
dt "* PIC16F88 Version *\r\n"
dt "* by Ian.M *\r\n"
dt "* Feb 2009 *\r\n"
dt "**********************\r\n"
dt "\r\n" ;(2 chars)
dt 0 ;Use null terminated strings. 6+240+2+1=249 chars so OK
Enjoy :-)
--
Ian Malcolm. London, ENGLAND. (NEWSGROUP REPLY PREFERRED)
ianm[at]the[dash]malcolms[dot]freeserve[dot]co[dot]uk
[at]=@, [dash]=- & [dot]=. *Warning* HTML & >32K emails --> NUL:
.
- Follow-Ups:
- Re: USB keystroke transfer device...
- From: Baron
- Re: USB keystroke transfer device...
- References:
- USB keystroke transfer device...
- From: Geir
- Re: USB keystroke transfer device...
- From: Baron
- USB keystroke transfer device...
- Prev by Date: Re: Potting horror...
- Next by Date: Re: Potting horror...
- Previous by thread: Re: USB keystroke transfer device...
- Next by thread: Re: USB keystroke transfer device...
- Index(es):
Relevant Pages
|