TOP Contributors

  1. MIKROE (2760 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139226 times)
  2. FAT32 Library (71732 times)
  3. Network Ethernet Library (57114 times)
  4. USB Device Library (47426 times)
  5. Network WiFi Library (43051 times)
  6. FT800 Library (42401 times)
  7. GSM click (29832 times)
  8. mikroSDK (28050 times)
  9. PID Library (26881 times)
  10. microSD click (26197 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Library

USB_OA

Rating:

26

Author: dany

Last Updated: 2019-04-13

Package Version: 1.1.0.0

Category: USB

Downloaded: 6549 times

Followed by: 1 user

License: MIT license  

USB libraries (HID, CDC, MSD), original architecture: only 1 kind of USB device, no composite device.
-- for P18's or P24's with USB -- . Additionally: the CDC_Twin library (P18 only), which creates 2 virtual COM (CDC) devices.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "USB_OA" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "USB_OA" changes.

Do you want to report abuse regarding "USB_OA".

  • Information
  • Comments (5)

Library Blog

This library is intended to make non composite USB devices:

HID: Human Interface devices, e.g. Keyboard, mouse, etc..

CDC: Communication device: e.g. serial port

MSD: mass storage device, e.g. SDMMC card.

 

  • HID
    USB "HID" library. Creates a non composite USB HID device. Permits to read data from and write data to USB devices using the "HID" protocol (no driver at PC side required).
     
  • CDC
    USB "CDC" library. Creates a non composite USB CDC device. Permits to read data from and write data to USB devices using the CDC protocol (makes the USB device look like a serial port).
    2010-03-01: Capable of working with usbser.sys under windows (means Hyperterminal can be used), and also works under Linux (Thanks Rainer!).

    PP2 = PingPong version of the library.

    Important CDC remarks:
  • - You need the UsbSer.sys driver (to be present in C:\Windows\System32\drivers) and the UsbSer.inf (to be present in C:\Windows\inf) file. Both can be found here https://libstock.mikroe.com/projects/download/71/9650/1525280064_usb_oa_other_other.zip in case they are missing.
  • - Do not forget to add (if not already there) the VID and the PID of your device to the usbser.inf file (C:\Windows\inf).
  • - Every time you install (plug in) a CDC device with a new VID/PID combination, windows will give it a comportnumber that was not used before, so the used number always increases. If you want you can change it to a more acceptable number using the windows 'device manager'. Portnumbers already taken can be found in the registry: See https://libstock.mikroe.com/projects/download/71/9649/1525279626_usb_oa_other_other.zip.
  •  
  • MSD
    USB "MSD" library. Creates a non composite USB MSD device. Makes the PIC (equipped with an SD/MMC card) look like an external drive to the PC (no driver at PC side required). 

    Important MSD remarks:
  • The library assumes the SDMMC card is always present and writable. Also hot swap is not allowed.
  • The maximum cardsize supported is 4 GB.

USB keyboard library: Supports also the "Sleep", "Wake-up" and "Power" keys.


Libraries:

- USB_HID_Library

- USB_CDC_Library

- USB_CDC_PP2_Library

- USB_CDC_Library_P18FxxJ53

- USB_CDC_PP2_Library_P18FxxJ53

- USB_CDC_Twin_Library

- USB_MSD_Library

- USB_HID_Keyb_Library


Have fun!

-------------------------------------------------------------------------------------------------------------------------------------------------

Version 1.1: Changed so that PID and VID defined in the "Usb_xxx_ProjectItems" projectfile effectively show in the executable when the libraries are used without sourcefile.

-------------------------------------------------------------------------------------------------------------------------------------------------
18-03-2012: Removed an error in "USB_MSD_Library", calculation of the card capacity did not work correctly for cards of exactly 4 GB. The max card size supported stays 4 GB however.

------------------------------------------------------------------------------------------------------------------------------------------------
20-03-2012: The USB HID, CDC and MSD libraries for PIC24 have been added. No PingPong or Keyboard library however.

2012-06-08: The help section in the package and zip file has been updated.

------------------------------------------------------------------------------------------------------------------------------------------------
2012-11-12: The microBasic package(s) ha(s)(ve) been added.

Only the .mcl files are available as "library" files: they are copied from the mikroPascal version (the mP and mB .mcl files are compatible - luckely - ).

If you want to see some sources: look into the mP versions.

The example files are still in mP, not in mB. (I do not have an mB licence, so I can not compile them).

Some of the helpfiles are also still referring to mP, but all library "interfaces" are available in the mB language.

------------------------------------------------------------------------------------------------------------------------------------------------
The "USB_CDC_OA" library has been updated, it is compiled with the SSA opn ON now (gave problems when using the lib with mB).

------------------------------------------------------------------------------------------------------------------------------------------------
2013-01-26:  Replaced "Delay_ms" and "Delay_us" by routines available in the Delays lib.
"Delay_ms" and "Delay_us" are inline routines and cannot be used in libraries if they are to be used without source (e.g. non Pascal compilers).

----------------------------------------------------------------------------------------------------------------------------------------

2014-03-13: The mikroBasic files and zip files have been updated. All mB sources are present now (not tested if compilable though).

---------------------------------------------------------------------------------------------------------------------------------------------

2014-03-26: Corrected an error in the Delphi unit "Wincom.pas" (used in the windows application TestCDC). Thanks to Virgil Chindris for pointing out type errors in the routines "getChar" and "OpenCom".

---------------------------------------------------------------------------------------------------------------------------------------------

2014-05-02: CDC library: Removed automatic sending of a zero length packet after sending a 64 bytes packet (slowed down sending  from PIC to PC).

---------------------------------------------------------------------------------------------------------------------------------------

2014-05-03: PIC version only. Added the following CDC libraries:

  • USB_CDC_Twin_Library: creates 2 virtual COM devices on the PC
  • USB_CDC_Library_P18FxxJ53: the same as USB_CDC_Library but specifically for the P18FxxJ53 family
  • USB_CDC_PP2_Library_P18FxxJ53: same as above but with ping pong buffering.

2015-01-26: Replaced the mB files: all mB files are compilable now (which e.g. means that all "with" statements are dealt with). I could however not link and test the libraries (no mB licence).

------------------------------------------------------------------------------------------------------------------------------------

2016-08-14: Changed the HID libraries: the USB_HID_Write routine now actually writes the asked bytecount. This is important for devices sending less than 64 bytes.

2019-04-12:  Removed a blocking statement in 'InitUsb'. The SW was blocked in case no USB connection was made.

ALSO FROM THIS AUTHOR

Menus for PIC32

5

Menu machine capable of handling text based menus. It only handles the logical behaviour of the menu(s), not their physical appearance e.g. on an LCD: the using project should still define the display or drawing procedures.

[Learn More]

TFTP HTTP pic based file server for FAT32 sd/mmc cards

5

This is a small TFTP fileserver, using an mmc/sd card for file storage. "Small" means the software does not have an error/retry/timeout mechanism. Also file download via HTTP is implemented (URL = 192.168.123.90). This project uses the Ethernet libraries v3.5 by Yo2Lio.

[Learn More]

Small Telephone Exchange

5

Small private telephone exchange, initially meant to make 2 modems (one connected to a "client", the other to a "server") communicate with each other to test a server/client system before e.g. putting the server on the web.

[Learn More]