Menu

Universal Serial Bus (USB) Great Cow BASIC - Capability News

Anobium
2018-06-12
2018-06-13
  • Anobium

    Anobium - 2018-06-12

    Background

    As part of Hugh's university work he produced a Universal Serial Bus (USB) solution.

    We have taken this baseline work and adapted to enable inclusion in the next release of Great Cow BASIC.

    So, simply put, we are completing the development of the native Great Cow BASIC USB solution - where you can natively from Great Cow control the USB connectivity.

    Shown below in the JPG is the scope of the project. Color coded. We have a huge program of work planned. Some of this has been released to some of you already and we want to get a few more of you involved to expand the usage.

    Streams

    We have three major streams of work across the two architectures for PIC and AVR respectively. They are:

    Stream Description Comments
    1 Microcontroller to Host Computer Application Interface Connectivity LibK/WINUSB
    2 USB communications device class USB CDC class
    3 USB human interface device class USB HID class

    Our intent is to provide a rich set of examples - both for the microcontrollers and the host computer. As we are basing the project on the good work of Hugh this means we have a head start and we can share now. We have also gained some great insights from Gert van der Walt his great work as meant that we have been able to quickly move forward.

    State of project.

    The following table shows the state of the project Sorry for the JPG but this is the tracker and I cannot reformat.

    But, anything in Green is ready for Alpha release.

    Summary

    If you have a 16(l)f145x or 18(l)f microcontrollers you can help. AVR will follow shortly.

    You have try the code, play with examples, tell us what is missing and what does not work.

    I am also looking for people to develop solutions to get the work completed faster. We need Great Cow BASIC code for some sub-project items for the items we have not started yet.

    Closing Note

    I will create another thread for requests, issues etc.

    DO NOT HIJAAK THIS THREAD - this is for news only

     

    Last edit: Anobium 2018-06-12
  • Anobium

    Anobium - 2018-06-12

    Project item #8. Goal was a 18F USB Windows GUI Application and Microcontroller GCB code. Native Great Cow BASIC USB solution (Great Cow BASIC controlling USB Stack in the part) for LibK/WINSUB .Net with Visual BASIC demonstration code using https://www.zer7.com/software/hidsharp
    GCB based using LibK/WINSUB .Net.

    A screenshot of the completed host application. You have to imagine the microcontroller and the USB connectivity. This host project is now available.

    A screenshot of when the host application detects a USB disconnect, or the Great Cow BASIC keepalive fails ...essentially lost the USB connection. The intent of the demostration application is to show the stateless nature of the solution and how to automatically recover from a USB error/disconnection.

    Thank you Hugh for getting this going!!

     

    Last edit: Anobium 2018-06-12
    • Anobium

      Anobium - 2018-06-12

      When you develop you own USB solution that implements the LibK/WINUSB or HID solution (that is non-standard) and you wish to publish - you need to read this.

      Developing you own USB Solutions

      Every solution that implements the Great Cow BASIC USB stack (LibK/WINUSB or HID) must have unique combination of a vendorID, a productID and a revisionID, and getting your own vendor ID is very expensive. See http://www.usb.org/developers/vendor/

      Fortunately, we have obtained vendorID and a productID and as long as you register your open source product with us. You DO have to register. Details will be published when someone needs a vendorID and a productID. You also need a unique revisionID as part of the Great Cow BASIC management process you will select a revisionID for your solution. We have been supported by pid.codes in the provision of our unique vendorID and a productID.

      There are many reference discussing things like USB vendorID and productIDs

      This project can authorize the use of some specific product IDs along with the common ID for end-user USB devices such as the CDC solutuon. There is no need to register for a CDC solution.

      There a restriction that is attached to using the Great Cow BASIC vendorID, a productID and a revisionID (REV). ** It MUST BE an Open Source solution.**

      For non-Open Source solutions you can still use the Great Cow BASIC USB stack and software but you will have to purchase a vendor ID from the the USB group. See http://www.usb.org/developers/vendor/

      Registration

      The following URL is where you will register and maintain your REV request. https://github.com/Anobium/GreatCowBASICpidcodes1209_2006

      Prior to the completion of our own automated process, see http://pid.codes/howto/ . The process will be same except that you will request a REV only.

      Background and Q&As

      Is this supported by the USB-IF?

      No, pid.codes is in no way supported, endorsed by, or associated with USB-IF. See http://www.usb.org/home

      Won't you get in trouble?
      pid.codes and the people behind it have never signed an agreement with USB-IF not to reassign or redistribute PID codes. The VID we were gifted was procured from USB-IF by a company that has since ceased trading, and they did so before USB-IF's terms prohibited sublicense or transferring of VIDs or PIDs.

      It is the belief of pid.codes that USB-IF has no legitimate right to prohibit this activity, and that their actions are limited to 'revoking' the original VID, a fairly meaningless pronouncement since they can never reassign it to anyone else. Nevertheless, pid.codes hope they will not do so, and will instead choose to work with pid.codes to make creating and distributing USB devices more accessible for hobbyists, makers, and small businesses.

      Do pid.codes or Great Cow BASIC team make money off this?
      No, absolutely not. The only cost is our time. We accept no income from users or advertisers for this.

      Why would I need a unique VID, PID and REV?
      Operating systems use VID, PID and REV codes to uniquely identify a device, which helps determine what drivers to load and how to interact with it.

      My project isn't out yet, can I still get a PID?
      Yes, absolutely. You need to have created a repository for your source code somewhere, with your work so far. If it's plain that you're not yet at the point of needing a unique REV, we might suggest you use a testing REV. If you've got several unreleased projects, we might ask for justification before handing out another REV.

      My project is no longer Open Source licensed, what happens to my REV?
      We'd really rather you didn't do this, but we won't try and 'take away' your REV. Once it's assigned to you, it's yours until the heat death of the universe. However, don't expect any more REV from us in future!

      What if I request a REV at the same time as someone else?
      REVs are allocated in the order pull requests are submitted. If the first pull request is rejected for whatever reason, the REV will go to a subsequent requester.

       

      Last edit: Anobium 2018-06-12
    • Anobium

      Anobium - 2018-06-13

      A demonstration of the application talking to 18lf25k50. This shows the read/writing and the handling of USB events (the application essentially recovers that state).

      The first USB event is an unplug, therefore the LED goes off as the board is power from the USB. Subsequent events read the state of the LED and restore the application state.

       

      Last edit: Anobium 2018-06-13
  • Anobium

    Anobium - 2018-06-12

    DO NOT HIJAAK THIS THREAD - this is for informatiuon publication only

     

Log in to post a comment.