Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 28, 2024, 11:55:53 23:55


Login with username, password and session length


Pages: [1]
Print
Author Topic: PIC32 + USB-host (HID)  (Read 5015 times)
0 Members and 1 Guest are viewing this topic.
gurksallad
Newbie
*
Offline Offline

Posts: 27

Thank You
-Given: 12
-Receive: 6


« on: November 15, 2019, 11:35:02 23:35 »

There are a lot of examples for PIC32 as USB device, but there seems to be a shortage of examples for USB host (in particular HID, I want to toy around with a USB-keyboard).

Some people recommend Harmony, some detest it. I will not use Harmony for this test, instead I will use MCC.

Does anyone know of an available example code to connect USB keyboard to a PIC32? A big plus if it's possible to connect it directly to a PIC32 USB Curiosity board (DM320107), so I can plug and play sort of. Otherwise I'll just have to rewrite it a bit.

What I want to do, basically, is attaching a USB-keyboard, and show what's being typed on an OLED-screen so I can test my OLED-library fonts in full.
Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #1 on: November 16, 2019, 11:27:28 11:27 »

Oops scrub that
« Last Edit: November 16, 2019, 11:32:33 11:32 by towlerg » Logged

Win 7 Ult x64 SP1 on HP2570p
bobcat1
Senior Member
****
Offline Offline

Posts: 295

Thank You
-Given: 4135
-Receive: 89


« Reply #2 on: November 17, 2019, 08:14:42 08:14 »

USB host demand lot's of processing power - hard to do on the PIC32
it is time now to move to STM32 and ARM processor
"one you walk that way you will never go back"

All the best

Bobi

Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #3 on: November 17, 2019, 11:36:58 11:36 »

If all you want to do is ".... attaching a USB-keyboard, and show what's being typed on an OLED-screen so I can test my OLED-library fonts in full." why not just bit bang a PS2 keyboard? BTW you can get USB to PS2 convertors.
Logged

Win 7 Ult x64 SP1 on HP2570p
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2420

Thank You
-Given: 862
-Receive: 678


Top Topic Starter


« Reply #4 on: November 17, 2019, 02:11:03 14:11 »

USB host demand lot's of processing power - hard to do on the PIC32
it is time now to move to STM32 and ARM processor
"one you walk that way you will never go back"

All the best

Bobi



https://www.youtube.com/watch?v=wASG7kgN2K4
https://www.youtube.com/watch?v=0zoeLBUxpLI
https://www.youtube.com/watch?v=xufZyQf4O7Y
Logged
gurksallad
Newbie
*
Offline Offline

Posts: 27

Thank You
-Given: 12
-Receive: 6


« Reply #5 on: December 20, 2019, 09:09:48 09:09 »

If all you want to do is ".... attaching a USB-keyboard, and show what's being typed on an OLED-screen so I can test my OLED-library fonts in full." why not just bit bang a PS2 keyboard? BTW you can get USB to PS2 convertors.

Because the OLED is just a side track of the project. The main focus is on the USB-host.
Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #6 on: December 20, 2019, 02:45:14 14:45 »

Quote
Because the OLED is just a side track of the project. The main focus is on the USB-host.

Fair enough. Are you nearer to a solution?
Logged

Win 7 Ult x64 SP1 on HP2570p
tumbleweed
Newbie
*
Offline Offline

Posts: 34

Thank You
-Given: 57
-Receive: 41


« Reply #7 on: December 21, 2019, 01:20:24 01:20 »

I don't think that MCC supports building a USB host.

There are examples for the PIC32MM0256GPM064 as a USB host in the old MLA libraries. Think there's a project for HID keyboard
Logged
UKFlyer
Newbie
*
Offline Offline

Posts: 25

Thank You
-Given: 40
-Receive: 17


« Reply #8 on: December 21, 2019, 12:51:23 12:51 »

"Some people recommend Harmony, some detest it"

I've got PIC32MZ2048 host to USB keyboard working nicely under Harmony. Just use Harmony to create the project and then dump all the Harmony baggage.

I'm happy to post the various relevant files if it would help. Things like key auto-repeat were a pig to get working properly, but the overall project is huge so wouldn't be helpful.
Logged
gurksallad
Newbie
*
Offline Offline

Posts: 27

Thank You
-Given: 12
-Receive: 6


« Reply #9 on: January 21, 2020, 03:25:55 15:25 »

Isn't Harmony like 5GB large? Sounds painful just to extract the USB-host  Cool
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC