Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to read USB keyboard using PIC ?

Status
Not open for further replies.
Joined
Jul 25, 2012
Messages
1,192
Helped
171
Reputation
342
Reaction score
162
Trophy points
1,343
Activity points
0
Hello!

I have interfaced USB connector to PIC18F4550. I will be connecting USB keyboard to PIC. I want to know how to read keyboard using PIC.

Thanks
Jayanth D
 

Re: How to use USB with PIC

Hello!
I have interfaced USB connector to PIC18F4550. I will be connecting USB keyboard to PIC. I want to know how to read keyboard using PIC.
Thanks
Jayanth D
the PIC18F4550 supports USB device functionality (e.g. you can connect it to a PC host)
it does not support USB embedded host functionality which you would need to connect a USB keyboard, see
**broken link removed**

possibly you could use a USB to PS/2 or serial converter ?
 

Re: How to use USB with PIC

But there are projects where keyboards are connected to PIC successfully.
 

Re: How to use USB with PIC

But there are projects where keyboards are connected to PIC successfully.
some PIC24F and PIC32 MCUs have USB host capability, i.e. you can attach USB devices such as keyboards and USB flash drives

PIC18s (some) only have USB device support, i.e. they can attach to a USB host such as a PC (or even a PIC24F or PIC32 acting as a host)

given the correct interface circuit you can attach a PS/2 or serial keyboard to a PIC18
 

Re: How to use USB with PIC

OK. How to interface a PS/2 keyboard to PIC16/18. What is the code to read keyboard and display on lcd?
 

Re: How to use USB with PIC

OK. How to interface a PS/2 keyboard to PIC16/18. What is the code to read keyboard and display on lcd?
the MikroElectronika EsydsPIC2 has a PS/2 connector
**broken link removed**

page 27 of the manual shows how to connect it

the following explains how to decode the keys
**broken link removed**
 

Re: How to use USB with PIC

You can write your own code for PS/2 functions, otherwise MikroC for PIC16/18 has inbuilt library for PS/2; check it's help.
You can assign I/O pins of PIC for PS/2 clock and data lines; and connect a PS/2 keyboard there. Library functions are there to configure pins and read incoming data.

Help of MicroC for PIC shows a sample program and hardware connection.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top