background preloader

Network & protocols

Facebook Twitter

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.

Four Walled Cubicle - LUFA (Formerly MyUSB)

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. For information about the project progression, check out my blog.

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. LUFA also contains USB bootloaders for the following USB classes: Downloads. Temperature probe using AVR-USB. ATTiny USI I2C communication interface (instructables) I2C, it's a standard that's been around for around 20 years and has found uses in nearly every corner of the electronics universe.

ATTiny USI I2C communication interface (instructables)

It's an incredibly useful technology for us microcontroller hobbyists but can seem daunting for new users. This tutorial will solve that problem, first by reviewing what I2C is and how it works, then by going in-depth on how to implement I2C in Atmel's ATTiny USI (Universal Serial Interface) hardware. I2C is commonly used in GPIO expanders, EEPROM/Flash memory chips, temperature sensors, real-time clocks, LED drivers, and tons of other components. If you spend much time looking for new, cool parts you'll probably wind up with several I2C parts.

Fortunately it is a protocol that is available on most microcontrollers, though it is a bit more complex than others. I2C Tools of Interest: Before you dig too deep into I2C communications, you'll want to have some things on hand that will make your learning experience easier. 1. 2. 3. Le Dominoux 555 timer contest. AVR USB Tutorial. This is the second part of my USB tutorial for ATtiny2313 and V-USB library.

AVR USB Tutorial

In the first part we learned how to get 3.3V from USB to power our circuits. In this part, we will expand our setup with following parts: Larger breadboard and additional jumper wiresATtiny231312 MHz crystal oscillatorTwo 27 pF ceramic capacitors to stabilize the crystalTwo 68 Ω resistors between USB data lines and the microcontroller pins1 MΩ pullup resistor for D+ and 1.5 kΩ pullup for D-6-pin header for programming the ATtiny and 4.7 kΩ pullup for reset pin Update: Some people have noted that the setup I’m using here runs ATtiny2313 at 12 MHz with only 3.3V VCC, which is outside the specified range (frequencies over 10 Mhz require 4.5V or more).

Breadboard setup This time I will not walk you through every connection. Reconstruct the power circuit from part 1 in one corner of the breadboard. Here’s how the end result should look like: Here is another closeup of the power part and USB jumpers. #include <avr/io.h>