new USB library v1.4.3

General discussion relating to the library modules supplied with the compiler

Moderators: David Barker, Jerry Messina

Post Reply
Jerry Messina
Swordfish Developer
Posts: 1245
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

new USB library v1.4.3

Post by Jerry Messina » Sat Feb 07, 2015 2:43 pm

I've updated the wiki USB library with a new v1.4.3 release

v1.4.3 Highlights:
- support for K50 and J94 families
- add SF protected region support, allowing full use of device ram (no more EXTENDED_RAM)
- easier customization. Most custom changes can be done in separate files now w/out editing libraries (ie clock setup, HID reports)
- more target examples and samples (2553, 14K50, 47J53, 87J94, and 45K50)
- updated HID bootloader and PC application (x64 version now included)
- incorporates previous bug fixes

I've tried to ensure all of the examples and targets compile and work ok, but if anything pops up post it here... there are just too many different scenarios to test them all.

User avatar
David Barker
Swordfish Developer
Posts: 1194
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Re: new USB library v1.4.3

Post by David Barker » Sat Feb 07, 2015 3:09 pm

Thanks for the USB library update Jerry!

Jerry Messina
Swordfish Developer
Posts: 1245
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: new USB library v1.4.3

Post by Jerry Messina » Sat Feb 07, 2015 8:19 pm

For users of the existing v142 lib, I tried to keep any changes you might need to make to a minimum.

The exception is anyone currently using HID Reports and/or EXTENDED_RAM. You should be able to get rid of the 'absolute' definitions and just declare things normally.
For HID reports, you will have to move the report structures into a new file, but that's (hopefully) about it. See the examples in the UserHIDReports directory.

There are several examples in each of the main_HID.bas and main_CDC.bas files which you can select from.

If you're using the HIDbootloader, there are a few example files in the 'SF HIDbootloader143' directory (testprogram.bas, test_HID.bas, and program_template.bas) that show how to structure your main app for use w/the bootloader.

If you're porting from the old version and you run across anything that doesn't work let me know.

User avatar
octal
Registered User
Registered User
Posts: 584
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Re: new USB library v1.4.3

Post by octal » Sat Feb 07, 2015 9:36 pm

Exellent work Jerry. Thank you for sharing this great work and for all the time you spent adding support for all devices.
I'll test all that during next week.
Thx :D

Jon Chandler
Registered User
Registered User
Posts: 167
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Re: new USB library v1.4.3

Post by Jon Chandler » Tue Feb 17, 2015 4:22 am

Thank you sir! Appreciate all you've done to help make Swordfish great.
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

richardb
Posts: 272
Joined: Tue Oct 03, 2006 8:54 pm

Re: new USB library v1.4.3

Post by richardb » Tue Feb 17, 2015 1:18 pm

Thanks for this Jerry,
not wanting to fork your thread but does anyone have problems with 64bit windows and usb virtual comport?

We didn't really notice when this first happened because all the systems we ship have 32bit windows due to legacy issues. But when we run our software or real terminal it doesn't work properly. It shows up in device manager and works with teraterm, but in real term it just gives the error "the parameter is incorrect"

HID seems to work without problems.

Does anyone else have this issue?

is there any way to fix this?
Hmmm..

Jerry Messina
Swordfish Developer
Posts: 1245
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: new USB library v1.4.3

Post by Jerry Messina » Tue Feb 17, 2015 2:48 pm

I just installed Realterm 2.0.0.70 and it seems to work ok for me here w/win7 x64.

It sounds like it might be a driver issue, but you say Device Manager is happy with it?

User avatar
David Barker
Swordfish Developer
Posts: 1194
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Re: new USB library v1.4.3

Post by David Barker » Tue Feb 17, 2015 4:16 pm

I use version 1.4.2 of the USB library on win7 x64 without any problems (it also work fine with win8). As Jerry said, it may be a driver issue or perhaps the CDC *.inf file you use?

Jerry Messina
Swordfish Developer
Posts: 1245
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: new USB library v1.4.3

Post by Jerry Messina » Tue Feb 17, 2015 4:43 pm

Here's a copy of the cdc driver I'm using. It's signed, so it should even install on win8/8.1 w/out having to jump through any hoops.
It uses the standard Mecanique VID and PID used by the demos.

https://www.dropbox.com/s/0ntchwye89u6o ... r.zip?dl=0

Perhaps see if that works better?

richardb
Posts: 272
Joined: Tue Oct 03, 2006 8:54 pm

Re: new USB library v1.4.3

Post by richardb » Wed Feb 18, 2015 7:18 am

thanks for the reply's,

I'll have to try burning a pic with a standard config and use Jerry's driver as ours is setup with our name,, I think, as its been ages since I originally did the usb work.

good to know it works though.


Thanks again.

Richard
Hmmm..

Ralph
Posts: 15
Joined: Tue Apr 01, 2008 3:15 am
Location: Melbourne, Australia

Re: new USB library v1.4.3

Post by Ralph » Wed Mar 18, 2015 11:47 am

Just a quick note to let others know that I (finally) got the opportunity to upgrade two of my product designs to incorporate Jerry's new USB 1.4.3 library. It works great Jerry!! Both my projects previously used 1.4.2 (which was also functioning perfectly), and the transition across to the new 1.4.3 lib was quite straightforward.

My application for these two projects uses HID with the bootloader as well as the CDC class for a VDP connection to the PIC18F4550 from Win8.1 64bit. As I say, it works brilliantly and thank you so very much Jerry for all your effort in providing the SF community with such valuable solution. Your blood is worth bottling!

Warmest regards,
Ralph

Post Reply