Sonsivri
 
*
Welcome, Guest. Please login or register. April 06, 2020, 10:10:04 10:10


Login with username, password and session length


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

Posts: 28

Thank You
-Given: 10
-Receive: 3


« on: November 15, 2019, 05:35:02 17: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
Active Member
***
Offline Offline

Posts: 241

Thank You
-Given: 444
-Receive: 90

What is this for?


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

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

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

Posts: 208

Thank You
-Given: 2743
-Receive: 50


« Reply #2 on: November 17, 2019, 02:14:42 02: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
Active Member
***
Offline Offline

Posts: 241

Thank You
-Given: 444
-Receive: 90

What is this for?


« Reply #3 on: November 17, 2019, 05:36:58 05: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
*****
Online Online

Posts: 2236

Thank You
-Given: 705
-Receive: 574


Top Topic Starter


« Reply #4 on: November 17, 2019, 08:11:03 08: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: 28

Thank You
-Given: 10
-Receive: 3


« Reply #5 on: December 20, 2019, 03:09:48 03: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
Active Member
***
Offline Offline

Posts: 241

Thank You
-Given: 444
-Receive: 90

What is this for?


« Reply #6 on: December 20, 2019, 08:45:14 08: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: 18

Thank You
-Given: 32
-Receive: 8


« Reply #7 on: December 20, 2019, 07:20:24 19: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: 15

Thank You
-Given: 24
-Receive: 5


« Reply #8 on: December 21, 2019, 06:51:23 06: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: 28

Thank You
-Given: 10
-Receive: 3


« Reply #9 on: January 21, 2020, 09:25:55 09: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