Tag Archives: AVR

Reminder: Intro microcontroller class tomorrow (Saturday)

Reminder: This Saturday, April 21, I’ll be giving a seminar at TechShop that’s an introduction to microcontrollers, called Choosing a Microcontroller. This is designed to be an introduction to the capabilities and variety of single-chip computers, as well how to actually pick one for a given application. It’s easy to get overwhelmed looking at the variety of range of micros, from four-bit micros that have a 4-bit wide data path — and actually cost four bits— to AVRs and PICs, basic stamps and Arduinos, to 32-bit gorillas with names like ARM, Blackfin, and Coldfire. So, we’ll try and cut through the fog and help you figure out where to get started.

If you’ve heard people getting excited about or doing cool things with microcontrollers and want to learn more, this might be a great introduction to the field.
Sign up for this and other TechShop classes here!

[Related: EvilMadScientist Microcontroller Projects]

Resources for choosing a microcontroller

ATtiny2313 I’ve put together a short list (after the jump) of some potentially useful resources that may be of help in choosing a microcontroller for your project, or just getting started with microcontrollers in general. I plan to add to this list from time to time. If you have other suggested resources to add to the list, please feel free to leave them in the comments here– good suggestions may be incorporated into future revisions of the list.

Continue reading Resources for choosing a microcontroller

Quick and Dirty D to A on the AVR: A timer tutorial

So you’ve got a microcontroller and you want to use it to control something analog. That’s a common task, and a number of good solutions exist, depending on exactly what you need to do.
Most microcontrollers do not include built-in digital-to-analog conversion (DAC) hardware, and external converters cost money. There is, however, a quick, easy, and cheap little trick of a solution that can be played by averaging a digital output.
This is a short tutorial on making useful (but crude) analog output signals with a low-cost microcontroller. The analog signals will be made by averaging a digital pulse width modulation (PWM) output from one of the counter/timer units in the microcontroller, and do not require any dedicated digital to analog conversion hardware. We will first introduce some aspects of the counter/timer and discuss how it can be used to generate the pulse width modulation signal. After that, we’ll implement the scheme on an AVR microcontroller and use it to make a simple and slow little function generator circuit.

Continue reading Quick and Dirty D to A on the AVR: A timer tutorial

Fixing a bad frequency fuse bit on an AVR

ATtiny2313

This is a quick note on AVR programming with the AVRISP MkII programmer, with which it is possible to foul up your clock fuse bits. =)

(This might be plain as day to some out there, but *I* didn’t know about it, so I thought I’d jot it down.)

Minor problem: I was programming some AVRs when I thought I might try to change the clock fuse bits to use one of the low-frequency internal oscillators. Apparently, it is possible to change the clock frequency low enough that the ISP interface can no longer program the flash– at which point it *seems* as though the chip is lost. These are inexpensive chips, (around $2 each), but the cost can add up quickly if you don’t fix the broken ones. Besides, they’re made of plastic, so you can’t even recycle them into a trivet.
Continue reading Fixing a bad frequency fuse bit on an AVR