”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
This week, Brad wrote in with an interesting question: Can you program the ATtiny25 on one of our ‘tiny2313 target boards? And the answer is yes: you can, with just a trivial modification.
Okay, back up– a little context here. The ATtiny25 and the ATtiny2313 are examples of AVR microcontrollers, the little brains that power many of our projects.
To program these chips, we use a usbtinyisp programmer, hooked up to a minimalist target board.
The target board basically provides a programming header that’s hooked up to the right pins of the chip, plus some way to power the chip– often through the programmer itself.
After hand-wiring up one too many minimalist ’2313 boards like that, we also made a printed circuit board version of the ’2313 target board. Normally, it looks something like this, with an ATtiny2313 in a ZIF socket:
But, back to the question. The ATtiny25, ATtiny45, and ATtiny85 are a family of 8-pin AVR microcontrollers that are not pin compatible with the ’2313. However, at only 8 pins instead of 20 pins, they’ll definitely fit in the socket… somewhere.
Looking at the datasheets and pinouts for the the ’45, ’2313 (and the ’168 that we also have a target board for), we can identify the lines used for programming: MISO, MOSI, SCK, and RESET:
The chips also need power and ground connections to be programmed, of course. Now if you notice, the connections for the ’2313 and ’45 are very similar– in fact, almost identical if you line the chip up so that pin 1 goes where pin 1 of the ’2313 normally would. The one remaining difference is that there’s no ground connection to pin 4 of the ’2313.
So, adding a wire from ground– pin 10 of the ’2313 –to pin 4 of the smaller chip (an ATtiny25 in our photo), and lining up pin 1 to pin 1, we’re ready to go. And yes, it works like a charm.
If you do use this method, there are a few (possibly obvious) things worth noting:
- You need to be careful to line up pin 1 of the chip to pin 1 of the socket.
- Be careful if or when you put a ’2313 chip back in the socket. It will draw a lot of current if you set pin 4′s to a high output level– it’s shorted to ground. (Better: If you want to go back and forth, use a switch, not a wire.)
- Keep in mind that the pin labels on the target board are for the ’2313, not the ’85.
Going one step further, you could also potentially program the ’25/’45/’85 from the ’168 target board: it only takes a couple more wires. To do so, line up pin 1 of the ’25 to pin 9 of the ’168. Add two wires this time, from board-reset to chip-reset, and from board-ground to chip-ground. You’ll also need to connect AVCC (analog power supply) to VCC. A little more work, yes, but still a good hack.
Say hell-o to Diavolino. Yes, it’s yet-another Arduino compatible board, but it’s cheap and kind of neat. Simplified design, rounded corners, and shiny. Open source kit. You can get one at our store here.
We designed this primarily in response to local need in our San Francisco hacker community for low-cost boards for teaching.
In many ways, this project is reminiscent of and complimentary to our ATmegaXX8 target boards, which are low-cost, simple design circuit boards for programming AVR microcontrollers through an ISP connection. And while you can add one, those boards don’t have a place to put a USB-TTL cable. And so here we are. Continue reading
Happy birthday to us! Evil Mad Scientist Laboratories has now been around for four years. We’ve collected some interesting projects from this past year to celebrate.
Microcontroller and Electronics Projects:
Simple LED Projects:
And, don’t forget, you can win a Peggy 2 or one of 13 other prizes in our clock
concept contest, going on this week.
We’ve been big fans of AVR microcontrollers for a few years now. If you look around our site a bit, you might find quite a few AVR projects. And our little friends the ATtiny2313 and the ATmega328P have become our go-to chips for many different purposes.
And, while none of that is changing, something that just seems better has come along. Or rather, a better AVR has come along.
Okay, maybe that’s a bit of an exaggeration. But, the deadline for our Arduino Contest at Instructables is approaching right fast: Entries are accepted until this Sunday, Nov 15, 2009, at 11:59 PM PST.
Official contest rules are here. The basic entry requirement is that you make a project that involves the Arduino IDE in some way, and you can already check out many of the great projects entered. Woo!
We’ve seen a lot of great Arduino Halloween projects out there this year. A few of them have been submitted to our Arduino contest over at Instructables, and we’d love to see more. The entry deadline is Nov. 15, so you’ve still got time to send them in.Speaking of contests, the Make Halloween contest deadline is here. Quick, get those microcontroller projects entered before midnight on Nov. 3!
Over at Instructables, we’re sponsoring an Arduino contest with prizes including Meggy Jr RGB kits. The rules are simple: use Arduino in your project! And by Arduino, we mean any project involving the Arduino IDE in some way. (And yes, you can use your Meggy Jr RGB or your Peggy 2 for this contest.) We look forward to seeing your projects and would love to see them in the flickr auxiliary, too.