SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
User avatar
By roach
#9644
Hi all, I'm just getting started in hobbyist electronics, and trying to figure out how to use PICs and Atmegas, etc. I had a couple of newbie questions that maybe someone can help with...?

- I'm trying to put together ELMs desktop line follower (here). The schematic calls for an Atmega8, but only has a CR2032, 3.0V battery to power it. The Atmega8 data sheet says this chip runs at 4.5-5.5 operating voltage. I guess my question is: does this project make any sense? I've finished fabrication, but I'm having problems programming the chip (avrdude gives "no response"), and was wondering if this was the problem.

- I'm this close to pulling the atmega8 off the board, and replacing it with an atmega8L, which has lower operating voltage and speed. As I said previously, I'm just getting into this hobby, and I don't have a lot of money to spend on reflow ovens and the like. How can I, using a soldering iron, some braid, and whatever pins, needles and eyebrow tweezers I have lying around, remove this surface mount, 32-pin TQFP package without damaging the board? I also have a heat gun (for removing paint), but can't figure out how to use it for this, without melting all the solder on the board. I've looked everywhere for instructions on the internet, but can't find a solution that doesn't involve buying loads of additional tools/equipment. If anyone has any real-world experience, I'd love to hear it.
By jayjay
#9937
You should consider using a charge pump like REG-710 from ti.com to generate a 5V from CR2032. Alternatively if power consumption is your main concern, try looking into the low power MSP430 MCUs from TI.

HTH
Jay
By Vraz
#9939
I've finished fabrication, but I'm having problems programming the chip (avrdude gives "no response"), and was wondering if this was the problem.
What kind of programmer are you using? Many of them take power from the board itself and while the 3v might be just enough to run the Mega8 (though you are right, the design should have used the 8L), it would not be enough to also run the programmer.

Assuming you can get it programmed then running at a lower clock might let you get away with the 3v. First thing though, give more details on your programming setup.
User avatar
By roach
#9941
Thanks for the tips, guys. I tried using Jesper's Original programmer, with YAAP (here and here). Definitely a non-standard solution, but it's worked in the past. This time, I seem to have fried my parallel port, though I have no idea how I could have done that.

The programmer is just a bunch of resistors, on a parallel port dongle, and is unpowered.

I need to set the AVR to use the internal, 8MHz clock, which should provide some small power savings (enough to run off 3V).

The board tries to power itself with the CR2032, and, as far as I can tell, succeeds, but there is no VCC connection to the programmer from the board, so unless a hi (3v) signal snuck by on the MOSI,RESET,SCK,or MISO lines, I don't know how it could have been fried.

I've ordered a serial dongle from SparkFun. I'll wait until it arrives and try again.

Thanks for confirming my suspicions about the possibility of a low-power problem!

None of this answers my second question, though. How do I get this little bastard off the board? I could try using a heat gun (for removing paint), but don't want to melt any of the more heat-sensitive devices on the board (it's happened before).
By Vraz
#9944
I don't think you can program a 3V powered part from a 5V parallel port using that kind of programmer and changing to the 8L will not fix it. The problem is that the parallel port is driving the signals above the AVRs VCC signal (max is VCC+0.5v). Likewise, the logic high output from the AVR is listed as 2.2v when VCC is 3v-- probably not high enough to be detected as a logic high by your 5v parallel port (though it depends on the components).

I suspect you may also have problems with the serial port dongle as it also tries to pump 5V into the AVR. If you look at the supported AVR list, you will note it does not include the L parts.

Do you have a regulated 5V power supply you could clip to the board for programming (removing the coin cell first)? That would seem like the best solution for programming.
User avatar
By roach
#9946
I'm not yet using the L part. Still trying to program the AtMega8.
By Vraz
#9947
Maybe I was not clear. I don't think you can program ANY AVR part with your parallel port programmer (or potentially the serial dongle) when its powered at 3V (L or non-L). However, while powered at 5V (just for programming), most any programmer should work with L and non-L parts.