|
このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。 |
Maybe there's already something like the に引き続いて 利用できる. I'd love to hear about it, if so. Also, maybe I'm hoping for too much 簡単 in what a USB keyboard sends and needs. Any 公式文書,認めるs "educating" me, or sending me to 指導/手引 in いっそう少なく than 10 pages of 詳細(に述べる) about everything a USB 装置 can do, would be very welcome.
I don't THINK a USB-to-PS/2 converter is やめる what I want... unless you can tell me that such a 装置 can used in a "un-手渡す-shaken", "data-flowing-just-one-way" manner... which WOULD be 利益/興味ing, even if it doesn't answer my hope for 衝撃を和らげるものing of keyboard events.
From 予選 feedback, it would seem that my USB- keyboard- to- microcontroller would be a hassle. However, I have managed to cobble together a working 原型 of the 装置 述べるd in the "stop 圧力(をかける)" which is just below here.
My "answer" is 現在/一般に in a Peter Anderson BasicStamp2, ($25 組み立てる/集結するd and 実験(する)d at 2/08), reading a simple matrix keypad. If there's someone out there 利益/興味d in working together to 実験(する) and 精製する my "answer", and move it to a pre-programmed PIC, I'd be 利益/興味d in 審理,公聴会 from you. If you want to 保護する the code in the PIC, I'd have no problem with that. Only the interface to the Arduino (or 類似の) would need to be published. I would imagine that you would develop your code for the PIC from my BasicStamp code, and have no 反対 to that either... but I'm not going to give anyone an 排除的 license to the ideas.
(追加するd after everything else was written)... If you can't 言及する me to, or design, the 装置 I'm asking for, how about a "keyboard 監査役" which would be mostly what I 述べる, 特に the 衝撃を和らげるもの and interface to the microcontroller, but "fed", instead of by a USB keyboard, by a simple matrix keyboard? 4x4 would be enough. It doesn't have to be clever... no n-重要な rollover, etc.
I was wondering if the に引き続いて could be made....
I want a small box with a socket into which you plug a USB keyboard and four wires coming out of it.
The three wires 構成する a ground line, a line to 料金d 5v into the box, and onward to the USB keyboard, and two data lines to connect the box to a microcontroller, e.g. Arduino, BasicStamp, PIC, etc.
One of the data lines would be data from the box to the microcontroller, the other would be for data to the box from the microcontroller. I'll call them FromBox and ToBox in what follows. They only need to be suitable for direct 関係 to things like Arduinos, PICs and BasicStamps. (I.e.... I think... educate me, if wrong?... simple TTL levels and 能力s. Certainly NOT RS-232 levels.)
I DON'T want anything....
天然のまま but simple, cheap and reliable will do just 罰金. Just one major frill, please, which you'll see in what follows. I'll discuss some ways to use extra inputs to the electronics in the box, but they are optional!
As part of my 追求(する),探索(する) for simple and cheap, I'm やめる happy for the microcontroller to "行方不明になる" 重要なs 圧力(をかける)d on the keyboard. I'm also happy to dispense with 存在 able to 始める,決める the CapsLock, etc, LEDs.
I'm going to use "MC" for "microcontroller" 今後, and Box (with a 資本/首都 "B") for the thing I want someone to design.
Here's the functionality I hope can be 供給するd...
Picture a just booted system (MC+Box+keyboard). No 重要なs 圧力(をかける)d anywhere. At this time, the FromBox line should be high, and the MC should be 運動ing ToBox high. (Or low... design it how you like, but I'll continue the description with things this way "up").
A human 圧力(をかける)s a 重要な on the keyboard. I want SOMETHING (I imagine it to be a 選び出す/独身 byte, but would welcome enlightenment from anyone who knows what USB keyboards do) "収穫d" AND STORED (this is the frill) in the Box. I DON'T need for the byte to be translated to ASCII, or anything clever like that. I don't even need the same byte to arise from, say, the "A" 重要な on two different keyboards.
This "収穫ing" by the Box of data from the keyboard need only happen when the Box's electronics are not busy with what follows. I.e. It is okay to "行方不明になる" characters typed on the keyboard. (Of course, if handshaking between the Box and the keyboard can be 達成するd without much hassle, so much the better. But I think I can live without it.... although something needs to be done to 確実にする that gibberish isn't "収穫d" through "looking" at the data from the keyboard when half a character has already been sent, but "行方不明になるd".)
As I said... I want the Box to STORE keypresses from the keyboard, but only a few keypresses, in a small FIFO 列.
When the Box has a character in the 列, it should bring FromBox high.
That will be the signal for the MC to bring ToBox low. On seeing ToBox low, the Box should start sending a serial stream over FromBox, carrying a byte from the 列. As soon as the MC sees a 肯定的な 辛勝する/優位 on FromBox, it should bring ToBox high again. MC will be 責任がある NOT requesting another byte from the Box until there's been time for the 以前 始めるd send byte to have been 完全にするd. A parity bit and stop bits would be "obvious" things to 含む, I would think... tell me if you 同意しない for some 推論する/理由.
A tiny frill: If there are spare inputs for the electronics (another microcontroller, I would assume) in the Box, perhaps at least some of them could be for setting the baud 率.
So... there you have my dream. Do get in touch if anything's 不明瞭な, or if you think I'm 行方不明の anything in the spec, and more 特に please get in touch if you think you could build one of them!
One area someone must know about which I'd love to have 明らかにするd: How are the 転換, ctrl, etc 重要なs 扱うd? I'm hoping that if you 監視する what's coming from a keyboard at the point it passes through the USB plug, you're seeing one byte per character, e.g. a byte when the A 重要な alone is 圧力(をかける)d, and a different byte when the A 重要な is 圧力(をかける)d when the 転換 or ctrl 重要な is already 負かす/撃墜する. Hmmm... I know this ISN'T やめる the whole story... or maybe even の近くに to 存在 the 権利 story... my PC can "see" when I depress the ctrl 重要な, even if nothing else is depressed. So what, please, someone, IS happening?
My thanks to Paul Badger at http://www.moderndevice.com/ for the suggestion he sent. (He has the Diecimila Arduino, some 明らかにする bones Arduinos, an 8x8LED パネル盤 and an 小型の-LCD 陳列する,発揮する.. at a very nice price!) This, with edits from me, is what he said...
"One 平易な way to do this would be to use an older style WINTEL keyboard, (i.e. I- editor of this page- think a PS/2 kbd). I don't remember what the 基準 is, but it's pretty 平易な to 器具/実施する. The communication is pretty much a straight SPI (synchronous serial 議定書) with a 半導体素子 select line, a clock line and data line. One of my students did this either a Basic Stamp - or just a logic 半導体素子. It took her about 5 minutes. (Maybe it was beginner's luck!)"
That answer is very tempting... and 供給するs a use for all those old keyboards in my junk room! I was just hoping to give my "answer" a little more 未来, by working with USB... but I'll certainly give the PS/2 answer more consideration.
類似の advice arrived from someone else who should know what he is talking about, Alex Zivanovic, who has a neat page with robot and other stuff...http://zivanovic.co.uk/
"Seems to me that a USB keyboard would be very hard to interface to (USB is 汚い at low level). I think using a USB to PS2 converter would be best, or 簡単に use a PS2 keyboard. PS2 is much easier to use - it's clocked serial like SPI. A microcontroller I have used in the past (Picaxe) has a 命令(する) built in to read input from a PS2 keyboard. You could use a microcontroller to 供給する the 衝撃を和らげるもの in the box you talk about."
He also 供給(する)d the に引き続いて helpful links...
www.computer-工学.org/ps2protocol... an excellent, 十分な of all the 明確な/細部s, article about interfacing with PS/2.... and...
http://www.beyondlogic.org/ article about interfacing to an AT keyboard.By the way... if I read the first article 正確に, an "AT" keyboard is 単に a "PS/2" keyboard with a different plug on the end of the cable. I never knew that! I have some old "AT" keyboards that I liked... nice "touch", etc... seems I can start using them again! I have an adapter or two from the days when both types were ありふれた. I thought the adapters were "good" only for 明確な/細部 keyboards. (But don't take my word for it... plug things into YOUR 器具/備品 at YOUR 危険!)
Unimportant PS: Ah for the good old days of programming the BBC Micro. It had a very simple keyboard 衝撃を和らげるもの 器具/実施するd in the OS, with an OS call 利用できる to see how many bytes were in the 衝撃を和らげるもの at the time of the call, one to read the next byte without 除去するing it from the 衝撃を和らげるもの, and another to read a byte and 除去する it. Am I 薄暗い? I've never been able to find the 同等(の) 機械装置 in Windows... and Boy, would it be useful at times!
Page 実験(する)d for 同意/服従 with INDUSTRY (not MS-only) 基準s, using the 解放する/自由な, 公然と accessible validator at validator.w3.org