New USB Device Library Released!

General discussion on Libstock website & codes posted on this website.
Author
Message
Const50
Posts: 124
Joined: 28 Oct 2010 15:08
Location: West Siberia, Tomsk

Re: New USB Device Library Released!

#46 Post by Const50 » 02 May 2013 06:59

Who has run the sample program HIDDevice_Custom?

I can't overcome the line

Code: Select all

While (USBDev_GetdeviceState() <> _USB_DEV_STATE_CONFIGURED)
wend
The program hangs-up on this line.

The device is been detected and determined properly by Windows' Devices and Printers and by USBlizer...

pwdixon
Posts: 1431
Joined: 13 Apr 2005 11:14
Location: UK

Re: New USB Device Library Released!

#47 Post by pwdixon » 02 May 2013 07:59

Const50 wrote:Who has run the sample program HIDDevice_Custom?

I can't overcome the line

Code: Select all

While (USBDev_GetdeviceState() <> _USB_DEV_STATE_CONFIGURED)
wend
The program hangs-up on this line.

The device is been detected and determined properly by Windows' Devices and Printers and by USBlizer...
Have you posted to the correct forum? Sorry I see you have, somehow I've ended up getting posts to the basic forum which I never use, I never had that happen before.

Const50
Posts: 124
Joined: 28 Oct 2010 15:08
Location: West Siberia, Tomsk

Re: New USB Device Library Released!

#48 Post by Const50 » 02 May 2013 08:19

My problems concern "New USB Device Library Released!" topic, because I apply to this theme. What another one do you propose?

Ghassen.Halleb
Posts: 4
Joined: 25 Jul 2013 17:58

Re: New USB Device Library Released!

#49 Post by Ghassen.Halleb » 05 Jan 2014 11:08

Is there any example about VCP for STMF407VG the one in the libstock dosn't work

Toley
Posts: 922
Joined: 03 Sep 2008 16:17

Re: New USB Device Library Released!

#50 Post by Toley » 05 Jan 2014 14:21

Serge T.
Learning is an endeless process but it must start somewhere!

kb501x
Posts: 8
Joined: 05 Jan 2015 03:50

Re: New USB Device Library Released!

#51 Post by kb501x » 05 Jan 2015 04:39

Hello Members;

I am not sure what I am doing wrong. I am trying to use "USB device library" with 18f4550 but could not pass enumeration? Tried both hardware and using isis gave same result.
I successfully used legacy HID class without issues both hardware and with Proteus.
This is with MiroC Pro and Vista 64bit.
Note: I just used the Hex provided with the library, file "HIDDevice_Custom.hex" with the circuit below.
2 screen captures: 1 with legacy HID library, everything passes, 2nd with USB device library, fails enumeration.
Thanks for the help,
Attachments
isis USB HID pass.jpg
isis USB HID pass.jpg (98.87 KiB) Viewed 99383 times
isis USB Failed.jpg
isis USB Failed.jpg (70.06 KiB) Viewed 99383 times

Peeter
Posts: 1
Joined: 15 Oct 2015 10:27

Re: New USB Device Library Released!

#52 Post by Peeter » 15 Oct 2015 10:42

Hi everibody!

Tx DATA SIZE

I'm a newbie about MikroC CDC.
I try to send more than 64 bytes of packet size.
But the USB transmit hangs up.
I try to modify the wMaxPacketSize in descriptor file, without success.
Which is the right way to use bigger packets i.e. 128 bytes?

Thanks:
Peter

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: New USB Device Library Released!

#53 Post by biljana.nedeljkovic » 18 Oct 2015 19:57

Hello,

Unfortunately, the USB device library was written to be used with the maximum packet size of 64 bytes, as defined in the USB specification.
Library is not tested with a packet whose size is larger than 64 bytes.
It's possible the larger packets can be send without any loss, but it simply can't be guaranteed within the specification, and that is the reason we haven't tested it in special cases beyond the specification.

Best regards,
Biljana

ThailandTshirts
Posts: 1
Joined: 24 Mar 2016 12:02
Location: Thailand
Contact:

Re: New USB Device Library Released!

#54 Post by ThailandTshirts » 24 Mar 2016 12:06

Looks Supercool :)

ilferrari
Posts: 195
Joined: 18 Nov 2013 09:09

Re: New USB Device Library Released!

#55 Post by ilferrari » 05 Aug 2016 08:00

Hi ME, does this library support PIC32MZ? If not, any idea when? Thanks

User avatar
lana.arsic
mikroElektronika team
Posts: 1715
Joined: 15 Jan 2016 12:50

Re: New USB Device Library Released!

#56 Post by lana.arsic » 05 Aug 2016 12:51

Hi,

Unfortunately, at this moment USB Device library doesn't support PIC32MZ,
but I have passed to our development team to add support.

When I have more information when will be added support, I will post it here.

Best regards,
Lana

renew
Posts: 28
Joined: 24 Nov 2016 13:56

Re: New USB Device Library Released!

#57 Post by renew » 24 Nov 2016 14:10

Hello
I tryed to use this library with the PIC24FJ128GB202 (204).

CDC class works good but have only one problem - each 3-4 minutes i hear from Windows sound like USB device disconected and terminal programm needs to restart. Device in list of devices always.

What can to do with this ? Have any differents bettween PIC24FJ128FB202 USB modules and other PIC ?

renew
Posts: 28
Joined: 24 Nov 2016 13:56

Re: New USB Device Library Released!

#58 Post by renew » 25 Nov 2016 11:42

Sorry, was enabled a WDT :roll:

So, with the PIC24FJ128GB202 (204) works perfect.

PIC init

Code: Select all

// Setting output frequency to 32MHz
  OSCCON = 0x0000;   // FRC ON
  CLKDIV = 0x0000;       // prescaler OFF
  STEN_bit = 1;    // USB correction ON
  STSRC_bit = 1;


// Enable USB device interrupt
  USB1IE_bit = 1;
  USB1IP0_bit = 1;
  USB1IP1_bit = 1;
  USB1IP2_bit = 1;

Only one desire - buffer size up to 256
In current version the maximum packet length only 63 bytes (not 64).

Thank you.

User avatar
lana.arsic
mikroElektronika team
Posts: 1715
Joined: 15 Jan 2016 12:50

Re: New USB Device Library Released!

#59 Post by lana.arsic » 26 Nov 2016 11:04

Hi renew,

Welcome to the MikroE forum.

Please check if you have turned off watchdog timer in Project Settings.

Best regards,
Lana

vergilium
Posts: 1
Joined: 05 Oct 2017 21:58

Re: New USB Device Library Released!

#60 Post by vergilium » 12 Oct 2017 12:33

Hi. I`m use USB lib for pic18f2550 mcu. It works well, but on some PC in particular with USB 3.0 the device is not detected and responds "USB device not recognize". I'm not sure I understand why that would be a problem. :cry:

Post Reply

Return to “Libstock Discussion”