• AVR Freaks

Helpful ReplyHot!USB Hub support?

Page: 12 > Showing page 1 of 2
Author
AndersG
Super Member
  • Total Posts : 241
  • Reward points : 0
  • Joined: 2008/08/05 04:51:24
  • Location: 0
  • Status: offline
2020/04/27 05:58:17 (permalink)
0

USB Hub support?

For the PIC24? The MLA says it is currently not supported. I would like to attach a mouse and keyboard to a PIC24FJ64GB002. Can it be done?
#1
NKurzman
A Guy on the Net
  • Total Posts : 19034
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/04/27 06:13:22 (permalink)
0
Do you need to use MCC?
#2
AndersG
Super Member
  • Total Posts : 241
  • Reward points : 0
  • Joined: 2008/08/05 04:51:24
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/04/27 06:29:25 (permalink)
5 (3)
Was that a question? ;) I'd rather not use the MCC, no. I think it makes things overly complicated.
 
Meanwhile did I find this that someone posted: http://www.suwa-koubou.jp/micom/USBHub/usb_hub_en.html 
#3
NKurzman
A Guy on the Net
  • Total Posts : 19034
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/04/27 07:49:41 (permalink)
0
MLA is a product in decline.  It is only updated to support chips that are not yet in MCC and Harmony.
If it is in MCC it will Not be added to MLA.  If anything they will remove it.
You could look at older versions of MLA to see if it was there.
So yes it is a Question.
Yes MCC is over-complicated.
And Yes they are trying to force you to use it.
#4
AndersG
Super Member
  • Total Posts : 241
  • Reward points : 0
  • Joined: 2008/08/05 04:51:24
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/04/27 08:12:12 (permalink)
0
OK. :) So is there USB Hub support in MCC?
#5
NKurzman
A Guy on the Net
  • Total Posts : 19034
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/04/27 08:25:49 (permalink) ☄ Helpfulby AndersG 2020/04/27 09:29:38
0
I do not know. I do not have it installed on this PC.  I only pointed out that it maybe there.  For the PIC24 MLA and MCC are the only two places they would put it.
The thread you pointed out or other sources may help you add to what you have.  It is just code and Specs.
Maybe someone else can help you more. I just pointed out where Microchip has been putting the New Stuff.
And you may need to try and create a Project to see if MCC has it.
#6
RISC
Super Member
  • Total Posts : 5794
  • Reward points : 0
  • Status: online
Re: USB Hub support? 2020/04/27 09:10:07 (permalink) ☄ Helpfulby AndersG 2020/04/27 09:29:30
4 (1)
Hi,
 
As far as I remember, HUB was never supported in PIC24 (neither in MLA or MCC) but it is definitely supported in PIC32.
In Harmony v2.06, there are 2 demos : HUB_CDC_HID, HUB_MSD (2)
There are some 28 pins PIC32 which might offer similar features as the PIC24 you have currently selected
MAPS can help you to select them
 
Regards 
post edited by RISC - 2020/04/27 09:12:20
#7
AndersG
Super Member
  • Total Posts : 241
  • Reward points : 0
  • Joined: 2008/08/05 04:51:24
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/04/27 09:28:41 (permalink)
0
Looked at the code created by MCC and found:
 
#ifndef USB_HUB_SUPPORT_INCLUDED
// See if a hub is attached. Hubs are not supported.
post edited by AndersG - 2020/04/27 09:30:09
#8
AndersG
Super Member
  • Total Posts : 241
  • Reward points : 0
  • Joined: 2008/08/05 04:51:24
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/04/27 09:29:34 (permalink)
0
Thanks RISC, I will have a peek.
 
#9
AndersG
Super Member
  • Total Posts : 241
  • Reward points : 0
  • Joined: 2008/08/05 04:51:24
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/04/27 22:21:22 (permalink)
0
Right now it seems that PIC32 and Harmony is the least appealing option. Mainly because I have no PIC32s and it will take me a week to get one. I also have no familiarity with Harmony. I will investigate the Japanese option. I am also contemplating simply using two PIC24s to get two ports :)
 
I did download the old MLA that the japanese code was based on and managed to integrate his changes and complile and it did find the hub and did enumerate the keyboard, but I never got any input reports via the hub. I guess my knowledge of USB is not sufficient. On that same Japanese site are there two sample projects. I will have a peek at them and see if I can make them run. They are for MPLAB though.
#10
NKurzman
A Guy on the Net
  • Total Posts : 19034
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/04/27 23:06:05 (permalink)
0
The harmony 3 usb code is supposed to be better that the 2.XX code. You could Try and pull the hub code from there.
But I would imagine the 2.XX code may be closer to MLA. But I would imagine the 2.XX code may be closer to MLA
Good luck.
#11
AndersG
Super Member
  • Total Posts : 241
  • Reward points : 0
  • Joined: 2008/08/05 04:51:24
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/04/28 03:23:58 (permalink)
5 (1)
OK. I give up :) I did try two things and wasted 2 days.. 
1. Integrate the patched files into microchip_solutions_v2013-02-15.zip, thusly:
usb_host.c -> C:\microchip_solutions_v2013-02-15\Microchip\USB
usb_host.h -> C:\microchip_solutions_v2013-02-15\Microchip\USB
usb_host_local.h -> C:\microchip_solutions_v2013-02-15\Microchip\USB
 
Runs on PIC24FJ64GB002, identifies HUB. Keyboard connected works, but not through hub. Get no input reports
 
2. Ported http://www.suwa-koubou.jp/micom/USBHub/usb_hub_hid_demo_en.html to MPLABX
Again, works, sortof, but getting invalid device on kbd connected through hub and no input reports if directly connected.
 
I have attached the latter.
 
So basically I am stuck and will investigate other options, mainly hardware. Thing is that I need to support at keyboard and a mouse for a legacy thing that does not speak USB, but a proprietary protocol. That means that I need to have two USB jacks, or an USB host that supports a hub, plus a hub. So, in essence, I can just have two IC24FJ64GB002 with two USB jacks and interconnected via SPI do the same thing. Not as elegant, but something that should work,
 
#12
RISC
Super Member
  • Total Posts : 5794
  • Reward points : 0
  • Status: online
Re: USB Hub support? 2020/04/28 03:42:06 (permalink)
4 (2)
Hi,
Just as a side info : PIC32MK has 2 FS USB host built-in
Regards
#13
AndersG
Super Member
  • Total Posts : 241
  • Reward points : 0
  • Joined: 2008/08/05 04:51:24
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/04/28 04:52:29 (permalink)
0
Ah.. That is interesting! I guess I could always get one to test, next time I order parts. Performancewise is 32-bits and the cpu speeds definitely an overkill for the intended use, though and I need a 100-pin part for dual USB
#14
NKurzman
A Guy on the Net
  • Total Posts : 19034
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/04/28 06:22:48 (permalink)
4 (1)
Is noted the pic32 / harmony has a hub driver.
But I never tested it.
#15
AndersG
Super Member
  • Total Posts : 241
  • Reward points : 0
  • Joined: 2008/08/05 04:51:24
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/04/28 06:52:16 (permalink)
4 (1)
But then again does all this make Vinuculums V2DIP2-32 (V2DIP2-32) look very attractive :)
 
#16
T Yorky
Super (Thick) Member
  • Total Posts : 574
  • Reward points : 0
  • Joined: 2012/08/28 02:07:35
  • Location: UK
  • Status: offline
Re: USB Hub support? 2020/05/01 09:33:34 (permalink)
4 (2)
@ AndersG, it is a long time since I used the FJ64GB002 (and 004), but I do remember that Hubs are not supported. This is not a software thing. It is Host Hardware related. Check the errata, I remember there being a timing issue for hub comms, which is a different spec to device comms. Also have you looked at the 24FJ128GB202 this was taken to be a replacement/upgrade for the GB002. More mem, features, 12bit ADC.
T Yorky
#17
AndersG
Super Member
  • Total Posts : 241
  • Reward points : 0
  • Joined: 2008/08/05 04:51:24
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/10/02 11:21:54 (permalink)
0
Also have you looked at the 24FJ128GB202 this was taken to be a replacement/upgrade for the GB002. More mem, features, 12bit ADC.
T Yorky
 
will definitely do so, especially if I can port the existing code easily. Meanwhile have I been testing the VNC1L and it works, but is pretty horrid. I need to poll the keyboard and mouse... No way to have it interrupt me on change. I have asked the Vinculum folks about that though.
 
Do you mean that the 24FL128 could support hubs?
#18
T Yorky
Super (Thick) Member
  • Total Posts : 574
  • Reward points : 0
  • Joined: 2012/08/28 02:07:35
  • Location: UK
  • Status: offline
Re: USB Hub support? 2020/10/03 05:13:44 (permalink)
1 (1)
There appears a bit of a satellite delay on this thread!
No I understand there is a fundamental issue with the USB peripheral. However, there are many many Pics so you would have to check this yourself.
The pic24 is quite an old design, especially the GB002, and has poor performance in modern terms. If you have looked into the GB202 one major advantage was the significant improvement(drop) in power consumption. Actually used this Pic in 4-20mA loop powered devices.
I found that at only 16MHz, and a very busy USB, there was little processing available to do 'a job'. I actually used the USB polling service because the interrupt almost took over the chip!!!
 
T Yorky.
 
#19
AndersG
Super Member
  • Total Posts : 241
  • Reward points : 0
  • Joined: 2008/08/05 04:51:24
  • Location: 0
  • Status: offline
Re: USB Hub support? 2020/10/06 09:43:16 (permalink)
0
Yes. The project has been dormant over the summer. Power consumption is not an issue in this design. I think I have sorted out the issues with the VNC1L, which is also an old part, FWIW. This is just a hobby project anyway. A converter from PS/2 or USB to HP HIL to be used with HP 9000/3xx series vintage computers.
#20
Page: 12 > Showing page 1 of 2
Jump to:
© 2020 APG vNext Commercial Version 4.5