Learning to use the V-USB (AVR USB firmware) library

The V-USB library is a pretty handy piece of code that lets you add USB connectivity to ATtiny microcontrollers (it was previously named tinyUSB). But if you’ve ever looked into adding the library to your own projects you may have been stymied by the complexity of the code. There are many examples, but there’s a lack of a concise quick-start for the uninitiated. [Joonas Pihlajamaa] has been working to correct that shortfall with his four-part V-USB tutorial series. It’s not for the absolute newbie; you should already be comfortable working with AVR chips but that’s the only real prerequisite we can see.

He starts the series with a look into the hardware considerations. USB provides a 5V power rail but the data lines expect 3.3V logic so this must be accounted for. With the test rig built on a breadboard he moves on to pick apart the code, covering various user-defined variables that you’ll need to set based on your project’s needs. We’re going to keep this on the back burner and hopefully the Troll Sniffing Rat will get a makeover (although we must say comments have been a lot nicer as of late… keep it up!).

We’ve embedded links to all four tutorial parts after the break.

[Read more…]

Build your own 4-channel logic analyzer

If you’re just getting into hobby electronics chances are there are lots of tools you’d like to get you hands on but can’t yet justify the purchases. Why not build some of the simpler ones? Here’s a great example of a 4-channel logic analyzer that can be your next project and will add to your arsenal for future endeavors.

As you can see, [Vassilis’] creation uses a cellphone-sized LCD screen as the output. It is powered by four rechargeable batteries and driven by an ATmega8 microcontroller. He’s designed the tool without power regulation, relying on the ATmega’s rather wide range of operating voltages, and a few diodes to step down that voltage for the LCD screen.

As you can see in the clip after the break, alligator leads can be used to connect the test circuit to the inputs (don’t forget the ground reference!). Thee buttons at the bottom let you navigate the captured data by panning and zooming. Perhaps the best design feature is the single-sided circuit board which should be quite easy to reproduce at home.

[Read more…]