USB keyboard

This forum is a continuation of the printed column "Q&A", where I answer questions about all aspects of electronics, including computer hardware, software, circuits, electronic theory, troubleshooting, and anything else of interest to the hobbyist. Feel free to participate with your questions, comments or suggestions on answers printed in the magazine. Send all NEW questions to: [email protected]
Post Reply
scrubbie
Posts: 2
Joined: Mon Jul 23, 2018 5:04 am
Contact:

USB keyboard

Post by scrubbie » Mon Jul 23, 2018 12:03 pm

I read the article "Connect a PS-2 Keyboard to an MCU". I am trying to build something using a PICAXE or STAMP and a keyboard. I connected a keyboard to a USB connector and powered it up. I then connected a scope to the data lines. The article states that there should be data and clock signals present when a key is pressed. I see no such activity. I know the keyboard is good. Doesn't some communication have to occur between the CPU and a USB device occur before data can be passed?

dyarker
Posts: 1643
Joined: Fri Aug 22, 2003 1:01 am
Location: (somewhere), Afghanistan; from Rochester, NY
Contact:

Re: USB keyboard

Post by dyarker » Mon Jul 23, 2018 6:00 pm

USB is no where near that simple.
https://en.wikipedia.org/wiki/USB_(Communications)

There must be a host (a PC or micro-controller) and a device (keyboard, mouse, thumb drive, etc, etc). At plug-in, or power on, there is data exchange to setup power required, USB version, addresses(to communicate with multiple devices on one hub), etc. If set-up was successful, then you'll see data when hitting a key.

Cheers,
Dale Y

scrubbie
Posts: 2
Joined: Mon Jul 23, 2018 5:04 am
Contact:

Re: USB keyboard

Post by scrubbie » Tue Jul 24, 2018 6:21 am

Thank you, I feared this was the case. What I don't understand is why the article never mentioned this.

User avatar
CeaSaR
Posts: 1633
Joined: Sat Nov 08, 2003 1:01 am
Location: Phoenixville, PA USA
Contact:

Re: USB keyboard

Post by CeaSaR » Wed Jul 25, 2018 8:42 pm

Does your MCU or USB board have any of the prerequisite libraries installed? AFAIK, one or the other would need the software/firmware installed, otherwise they wouldn't know to communicate with each other.

CeaSaR

(PS, I'm not a programmer, but I have been dealing with computers since the bad old days of DOS)
Hey, what do I know?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests