Which AVR interface should I buy?
November 27, 2006 11:03 AM Subscribe
Which AVR-based starter/programmer/emulator board is likely to best fit my needs?
I like to make little electronic gadgets that light up and look pretty. My ambitions keep expanding as I go, and the projects I'm dreaming up now are past the edge of my abilities with analog circuits. I keep thinking "this would be so easy if I could just write a little code instead of wasting all these hours tinkering with op-amps". Thus I find myself increasingly interested in microcontrollers.
Atmel's AVR line looks like the best bet: the RISC architecture is reasonably sane, there are C compilers, and the ATtiny chips are both small and cheap. Problem is, they are too popular: there are so many different development tools available that I can't figure out how to get started.
I have two Macs. They have plenty of USB ports, and if necessary I could get one of those Keyspan serial adapters, but there's not the shadow of a parallel port anywhere nearby, and I'd really rather stick with USB than tinker around with serial. One of the Macs has a Core Duo chip, so I could run Windows on it if necessary, but I'd rather work in Mac OS if at all possible.
I write code for a living, and have plenty of experience with machine language, device drivers, and low-level stuff in general, so I'm not worried about the software end of things - but the hardware leaves me completely at sea. I don't understand the difference between an "emulator", a "programmer", and a "starter board". Nor do I understand what "in-circuit debugging" means or how it is likely to help me. I assume there must be some piece of software which uploads the compiled code to the chip through the interface board, but that's it.
Where, as a microcontroller newbie and Windows-avoider, should I start?
I like to make little electronic gadgets that light up and look pretty. My ambitions keep expanding as I go, and the projects I'm dreaming up now are past the edge of my abilities with analog circuits. I keep thinking "this would be so easy if I could just write a little code instead of wasting all these hours tinkering with op-amps". Thus I find myself increasingly interested in microcontrollers.
Atmel's AVR line looks like the best bet: the RISC architecture is reasonably sane, there are C compilers, and the ATtiny chips are both small and cheap. Problem is, they are too popular: there are so many different development tools available that I can't figure out how to get started.
I have two Macs. They have plenty of USB ports, and if necessary I could get one of those Keyspan serial adapters, but there's not the shadow of a parallel port anywhere nearby, and I'd really rather stick with USB than tinker around with serial. One of the Macs has a Core Duo chip, so I could run Windows on it if necessary, but I'd rather work in Mac OS if at all possible.
I write code for a living, and have plenty of experience with machine language, device drivers, and low-level stuff in general, so I'm not worried about the software end of things - but the hardware leaves me completely at sea. I don't understand the difference between an "emulator", a "programmer", and a "starter board". Nor do I understand what "in-circuit debugging" means or how it is likely to help me. I assume there must be some piece of software which uploads the compiled code to the chip through the interface board, but that's it.
Where, as a microcontroller newbie and Windows-avoider, should I start?
Based on your question, I'd suggest a starter board. They usually have an integral means of programming the chip AND some breadboard areas, plus basic support hardware (like power supply regulators, reset circuits, some switches, connectors, LEDs, etc.)
FYI a PROGRAMMER board is usually just that... enables you to program chips, only, which you then put in your target system.
EMULATOR is a term associated with both hardware and software. In software terms, it usually means a program writen in the native code of one processor that runs a model of a dissimilar processor (or OS). For instance, you can get public domain emulators that allow you to run old CP/M code on your PC.
When used in a hardware context, EMULATOR usually refers to an assembly that may contain a lot of electronics, but which connects to a target processor socket in your prototype. It allows you to run the system as if it had an actual processor in it, but it has supplemental resources and code that let you do breakpoints, manipulate external hardware, set registers, interrupt processing, try new code, etc.
Starter boards usually allow some of this.... but as the name suggests, they are for familiarization and quick experimentation mostly, and that sounds like what you want.
posted by FauxScot at 11:25 AM on November 27, 2006
FYI a PROGRAMMER board is usually just that... enables you to program chips, only, which you then put in your target system.
EMULATOR is a term associated with both hardware and software. In software terms, it usually means a program writen in the native code of one processor that runs a model of a dissimilar processor (or OS). For instance, you can get public domain emulators that allow you to run old CP/M code on your PC.
When used in a hardware context, EMULATOR usually refers to an assembly that may contain a lot of electronics, but which connects to a target processor socket in your prototype. It allows you to run the system as if it had an actual processor in it, but it has supplemental resources and code that let you do breakpoints, manipulate external hardware, set registers, interrupt processing, try new code, etc.
Starter boards usually allow some of this.... but as the name suggests, they are for familiarization and quick experimentation mostly, and that sounds like what you want.
posted by FauxScot at 11:25 AM on November 27, 2006
I should also mention... my experience with this type of hardware, etc. is almost 100% PC based... DOS and Windoze. You may/may not have luck on a Mac, which I've never used for embedded systems development. I have PCs for that!
Also, choosing a variant (i.e, which AVR processor to use) is much more of a puzzle than what kind of support board to use. It can take a lot of analysis... fodder for a separate question perhaps?
posted by FauxScot at 11:29 AM on November 27, 2006
Also, choosing a variant (i.e, which AVR processor to use) is much more of a puzzle than what kind of support board to use. It can take a lot of analysis... fodder for a separate question perhaps?
posted by FauxScot at 11:29 AM on November 27, 2006
I'd suggest the Arduino as well. If they had been available at the time, i would have gotten one instead of the AVR Butterfly.
posted by mrbill at 12:06 PM on November 27, 2006
posted by mrbill at 12:06 PM on November 27, 2006
Yeah, the arduino "language" is basically somewhat simplified C... using less simple C shouldn't be so tough.
posted by tjenks at 2:10 PM on November 27, 2006
posted by tjenks at 2:10 PM on November 27, 2006
I'm a minimally saavy programmer, and I've found the STK500 dev board to be more than suitable for my tinkering needs. It has both sockets for programming DIP-form-factor AVRs directly on the board, and an ISP (in-system programming) 6-pin header that you can connect via a ribbon cable that comes with the STK500 to a similar connector designed into your own projects. I've built an ISP connector into every board I've etched, and it really doesn't add that much complexity to your layouts.
I've never used a Keyspan adaptor to my STK500, since I use an older PC for my micro development, but I've used them to talk to my gizmos once created, and that works fine..
posted by Alterscape at 2:55 PM on November 27, 2006
I've never used a Keyspan adaptor to my STK500, since I use an older PC for my micro development, but I've used them to talk to my gizmos once created, and that works fine..
posted by Alterscape at 2:55 PM on November 27, 2006
Oops, I didn't answer the last part of your question:
A "starter board" / "dev board" like the STK500 has an RS232 ISP and some on-board peripherals (stock it has 8 LEDs, 8 push-buttons, and an RS232 level shifter so you can talk to your micro's USART via serial from your computer). Be advised you'll need to provide your own 12v 500mA power supply. I use a RadioShack multi-voltage power supply.
An ICE (in-cirrcuit emulator) plugs into your computer and your circuit and acts like an AVR even though it isn't. I don't know much about the state of Apple drivers for any of the existing ICEs.
JTAG is probably more than you want to worry about as a newbie. I've been doing this stuff for two years as a hobby and I've not yet had to learn what exactly it does or how to use it. I believe it's a protocol that lets you monitor the internal state of the AVR as its running, but I don't know details.
posted by Alterscape at 3:00 PM on November 27, 2006
A "starter board" / "dev board" like the STK500 has an RS232 ISP and some on-board peripherals (stock it has 8 LEDs, 8 push-buttons, and an RS232 level shifter so you can talk to your micro's USART via serial from your computer). Be advised you'll need to provide your own 12v 500mA power supply. I use a RadioShack multi-voltage power supply.
An ICE (in-cirrcuit emulator) plugs into your computer and your circuit and acts like an AVR even though it isn't. I don't know much about the state of Apple drivers for any of the existing ICEs.
JTAG is probably more than you want to worry about as a newbie. I've been doing this stuff for two years as a hobby and I've not yet had to learn what exactly it does or how to use it. I believe it's a protocol that lets you monitor the internal state of the AVR as its running, but I don't know details.
posted by Alterscape at 3:00 PM on November 27, 2006
thirding the arduino
posted by puppy kuddles at 7:39 PM on November 27, 2006
posted by puppy kuddles at 7:39 PM on November 27, 2006
JTAG turns any chip that supports it into something that works like an emulator. Essentially, every interesting register inside your processor is built to function as a shift register, and these are all connected in series on the JTAG lines; so you freeze the machine when you want to look at it, and then you can dump endless amounts of internal state serially via JTAG. It's really cool, and works really well.
posted by flabdablet at 9:20 PM on November 27, 2006
posted by flabdablet at 9:20 PM on November 27, 2006
This thread is closed to new comments.
posted by tjenks at 11:09 AM on November 27, 2006