background preloader

V-USB - A Firmware-Only USB Driver for Atmel AVR Microcontrollers

V-USB - A Firmware-Only USB Driver for Atmel AVR Microcontrollers
V-USB is a software-only implementation of a low-speed USB device for Atmel’s AVR® microcontrollers, making it possible to build USB hardware with almost any AVR® microcontroller, not requiring any additional chip. V-USB can be licensed freely under the GNU General Public License or alternatively under a commercial license. A comprehensive set of example projects demonstrates the wide range of possible applications. Features For a comparison to other USB solutions for microcontrollers please click here. Hardware This diagram shows a typical circuit for a bus powered device (click the image to enlarge). D1 and D2 are a low cost replacement for a low drop 3.3 V regulator chip, such as the LE33. For a prototyping board, please see metaboard. Documentation Resources Download the V-USB package containing a short description and several simple code examples.

Burning AVR boot loader with USB TTL Serial Cable I am working with some kids at local high school that ordered a Sanguino kit to put together just after Makerbot went online. The kit was missing some components and others were the wrong size. How ever the big problem was that processor chip did not get the boot strap loader for the Arduino IDE development environment flashed into it. Generally you use a programmer to burn your target program onto an AVR chip, for the Arduino IDE environment we burn a boot loader that lets us upload new programs into the flash memory via the Arduino IDE. There are multiple ways to burn the loader that we need. External ISP or JTAG programmerUse the Arduino-IDE via a parallel port and adapterUse another Sanguino or Arduino as a programmerUse the USB Serial cable TTL-232R in bit banger mode A good article on AVR family programming options is at: What is bit banger mode? avrdude done.

Four Walled Cubicle - LUFA (Formerly MyUSB) LUFA (Lightweight USB Framework for AVRs, formerly known as MyUSB) is my first foray into the world of USB. It is an open-source complete USB stack for the USB-enabled Atmel AVR8 and (some of the) AVR32 microcontroller series, released under the permissive MIT License (see documentation or project source for full license details). The complete line of Atmel USB AVRs and USB AVR boards are supported by the library, as are any custom user boards, via custom board hardware drivers supplied by the user. The Official LUFA Project Logo, by Studio Monsoon Photography The library is currently in a stable release, suitable for download and incorporation into user projects for both host and device modes. LUFA is written specifically for the free AVR-GCC compiler, and uses several GCC-only extensions to make the library API more streamlined and robust. Included with the library source are many demonstration applications showing off the use of the library. Downloads Show/Hide Old Releases

electronics I recently started toying around with microcontrollers and built a few simple things, mostly taking other people's projects as a starting point and morphing them into something that does the same thing, but worseWdifferent. this project is based on obdev's RemoteSensor example and their firmware-only USB implementation; the main change is the replacement of the analog sensors with a Sensirion SHT11 digital temperature and humidity sensor. sensor unit the sensor unit consists of an ATTiny45 microcontroller, a SHT11 sensor, and a hoperf RFM12 868 MHz transceiver module. it is powered by 2 AA cells and is expected to give >1 year of battery life. receiver the receiver uses the same RFM12 module and an ATMega8 µC; received data is transmitted via USB to the PC. host software the host software can write out the received data in CSV format and in a one-line-per-value format for integration into the Cricket graphing system. download here's the tgz file with schematics (PNG and eagle) and software.

libusb V-USB - A Firmware-Only USB Driver for Atmel AVR Microcontrollers V-USB Reference Implementations RemoteSensor is a more advanced example for using Objective Development’s firmware-only USB driver for Atmel’s AVR microcontrollers (V-USB). RemoteSensor is a wireless thermo- and hygrometer with an USB port on the receiver. You can draw fancy diagrams of temperature and humidity for up to 16 wireless sensors. RemoteSensor is a more advanced example because it utilizes an interrupt endpoint to indicate to the host when new data arrived, demonstrating how V-USB handles a second endpoint. Details The entire system consists of the wireless sensors based on the low cost ATTINY26 microcontroller, the receiver running V-USB on an ATMEGA8, Unix host software based on usblib which logs the measured data to a file in CSV format and a PHP script which integrates diagrams of the data into a web page: If you really need to run the host side on Windows, you can compile it with minGW and libusb-win32. Download Release Notes

usbpicprog Tutorial: Arduino and the AREF pin - Birds on the Wire Welcome back fellow arduidans! Today we are going to spend some time with the AREF pin - what it is, how it works and why you may want to use it. First of all, here it is on our boards: Uno/TwentyTen AREF [Please read whole article before working with your hardware] In chapter one of this series we used the analogRead() function to measure a voltage that fell between zero and five volts DC. But why is the result a value between 0~1023? We measure resolution in the terms of the number of bits of resolution. It is easier to imagine this with the following image: So with our example ADC with 2-bit resolution, it can only represent the voltage with four possible resulting values. With our Arduino's ADC range of 0~1023 - we have 1024 possible values - or 2 to the power of 10. However - not all Arduino boards are created equally. What if we want to measure voltages between 0 and 2, or 0 and 4.6? And therein lies the reason for the AREF pin! So how do we tell our Arduinos to use AREF?

Related: