From our forums comes this interesting question:
”Is it possible to download the contents of an ATmega168/328, essentially backing it up so that it can somehow be restored later?
For example: Let’s say I have lost the source code to a very useful program currently residing on a 328, but I need to flash it with a different sketch temporarily, then restore that original sketch. This would be useful in the case that the chip was soldered directly onto a board – a big mess to try to replace.
Is this possible in some way, perhaps by altering an ISP programmer?”
The answer is that yes indeed, it is possible– with a couple of exceptions that are worth mentioning. And on occasion, it’s even very useful. Continue reading
What is it? Hint: your life depends on tools like these.
Some time ago we wrote about five relatively obscuretools for doing electronics. But, five tools barely scratches the surface of the stuff out there, and here are a few more of our favorites. In this roundup we’ve collected some handy–and even important –tools along that you might not have seen before, along with some best-of-breed versions of everyday electronics tools.
A common problem that you may come across when building “a box” to do something– whether a one-off gizmo or bona fide scientific instrument –is the rats nest of wires. A similar problem occurs when you need to run a bunch of basic wires out from your box to other devices. Unless there’s a standard cable lying around that does exactly what you need, you can end up with messy tangles of wires outside of your box as well.
There are many well-known solutions of course, as varied as elegantly laced wiring harnesses, cable tiesand teflon spaghetti sleeving, heat shrink tubing and cold shrink tape, and (possibly for the brave and/or insane) duct tape and paperclips.
One of the other basic methods– well known to many people who build electronics –is to twist wire bundles with a hand drill and a friend. This is a quick and awesome trick that makes durable cables, short or long, exactly to your specifications, and shockingly fast.
You’ve got your components, and your datasheet, and you’re read to start hacking. But which way does the chip go? Pin 23 is where? If you’re lucky, the orientation is clearly marked, or perhaps diagrammed in the datasheet. But if it isn’t, or if you’re simply new at this, it’s helpful to know what to look for. Continue reading
Some time ago, we wrote up a tutorial about using an ADXL330 accelerometer with an AVR microcontroller. A couple of years have passed, and so we’ve returned to update and clean up some loose ends on this project.
One of the distinguishing characteristics of beginner-friendly microcontroller platforms– Arduino, PICAXE, and a few dozen others– is that they neatly wrap up and hide the nuts-and-bolts details of interfacing with the hardware.
Like everything else, it’s a blessing and a curse. The benefits are clear: A new user who has just acquired an Arduino can plug it in, blink an LED, and have a working demonstration of two-way serial communication in just a few minutes.
The drawbacks are a little harder to see. When you just use one line of initialization that calls a “library,” it’s easy to overlook exactly what’s involved: how many lines of code have invisibly been added to your program? What memory structures have been allocated? What interrupts are now going to disrupt program flow and timing? There’s also a portability issue. We often hear from people who got started with Arduino but now want to explore other AVR microcontroller systems, and don’t know how or where to start the migration process.
In what follows we discuss a minimal setup for serial communication with AVR microcontrollers, and give two example implementations, on an ATmega168 and on an ATtiny2313. While this fundamental “AVR 101″ stuff, we’re approaching the problem (this time) from the migration standpoint. Suppose that you had an Arduino based project, where you relied on serial communication– using the library functions–between that hardware and your computer. From there, how would you migrate to a stand-alone AVR microcontroller with similar functionality, or even to a different microcontroller?
The proliferation of spoof, nerd, science, and electronics merit badges has demonstrated that geeks like to show off their skills and accomplishments. One skill is particularly appropriate for the format: soft circuitry. By building your own soft circuit onto an actual badge you can demonstrate your mastery.
The size of the badge is just right for a simple circuit with a battery, a switch and an LED. The crowning touch is that the stitched circuitry can form the circuit diagram as well.
Simple Solar Circuits:
How to get started adding solar power to your small electronics projects. Use the sun to power small solar and battery powered night lights, garden lights, and decorations for halloween.
You’ve got your wire strippers and your soldering iron…now what? You probably know that there is a standard set of essential tools that you need on your electronics workbench. You can find helpful lists of these tools at Lady Ada’s site and Dan’s Data.
However, real tool junkies always want just the right tool for the job. Here are five electronics tools you may not know you were missing. These esoteric tools go a bit beyond the basics that everyone should have.
This is a quick how-to guide on making ultra-simple development boards for programming AVR microcontrollers. Most recent-vintage AVRs can be programmed through an ISP (in-system programmer) connection; all that is really needed is a place for the chip to sit and a way to connect to the programmer.
That’s where these minimalist AVR “target boards” come in. These little boards cost only about $2 and take only a few minutes to make.
It turns out that I build a lot of these because asking “how do you make a circuit to program the AVR?” is really the same as asking how you can program an AVR that is in a circuit. And, we might as well start with a simple circuit.