V-USB is the name of a software library that allows you to get USB protocol support on AVR microcontrollers ( Atmel Classic, Tiny and Mega families) that do not have USB hardware support. The authorship of the library is owned by Objective Development , which distributes and promotes V-USB under the GNU GPL and commercial licenses (library source codes are freely available, see links).
The old name of the library was AVR-USB, but after the library gained popularity, the name had to be changed so as not to conflict with existing Atmel names. The USB protocol is implemented in software, and the speed of the AVR core is enough only to implement the USB 1.1 standard at low speed (low-speed). For this reason, the V-USB library is only suitable for low speed I / O devices (such as USB HID ). Since the performance requirements for processing USB signals (D + and D-) are very strict, the low-level code is written in assembly language and only a certain number of core clock frequencies are supported. At first, the clock frequency was only 12 MHz, but then it became possible to use quartz resonators at 12, 15, 16, 16.5 and 20 MHz. Microcontrollers that have PLL (PLL, phase locked loop) for clock generation can use an internal RC oscillator (that is, work without quartz), provided that the RC oscillator is calibrated using the SOF (Start Of Frame) signal from the USB protocol. The high-level procedures and functions of the library are written in C. The requirements for the AVR microcontroller are low — at least 2 kbytes of program memory ( flash ) and 128 bytes of RAM (RAM) are required. Of the hardware resources, only an interrupt is used to change the signal at the output (usually INT0 connected to the D + signal of the USB bus). These system requirements are met by most microcontrollers in the AVR family.
Due to the fact that good examples of firmware for USB devices are supplied with the library (user class USB, class USB HID, USB mouse, microcontroller port management, reading and writing its EEPROM), many useful developments have appeared that use the V-USB library - USB -programmers, input and output devices, breadboards, interface converters (for example, USB- RS232 ) and much more (see links). Along with the library, examples of computer programs (host software) that work with devices on the V-USB library are also supplied. Examples of host software use another free library - libusb .
Thus, the V-USB library allows non-professionals in USB programming to quickly create USB devices and write computer programs for them. In addition, there is no cost for the software used in development - it is available under the GNU license. The library comment code and examples of firmware and host software are translated into Russian (see links).
Links
- Page of the site of the company Objective Development, dedicated to the V-USB library .
- Projects based on V-USB .
- Translated into Russian V-USB library .
- USB device development - how to get started with the V-USB library . A step-by-step guide on how to quickly start creating your own USB devices.
- USB Development Boards .
- USBtiny Another software implementation of the USB protocol.
- SIAM32 USB . USB host host software implemented on the ATmega32 microcontroller.
- [1] . Software implementation of the USB protocol in the BASCOM AVR environment (BASIC).