Go Down

Topic: Need help programming AVR's (Read 943 times) previous topic - next topic

ScooterinAB

I'm trying to move some projects form my Adruino Uno onto some separate AVR's, and I am having absolutely no luck. I've completely taken the Arduino (as an ISP) out of the equation and bought an AVRISPmk2.

I have absolutely no idea what I'm doing, and have been following dozens of websites and threads for instructions. The bottom line is that nothing works. I can't burn the Arduino bootloader, I can't upload my sketch, and I'm running out of time and patience. Every solution I try just gives me a different error that I cannot fix.

I'm wondering if someone can talk me through the process, because I'm just wasting time now. Preferably, I'd like to talk with someone over Skype (if they have time) so I can find out what I'm doing wrong and get this project done.

Please let me know if you can help.

udoklein

Step 1: calm down and relax
Step 2: describe which OS you are using
Step 3: learn how to connect to an Arduino Board with avrdude (-t option)
Step 4: learn how to flash an Arduino Board
Step 5: learn how to connect to a naked chip
Step 6: learn how to flash a naked chip

Once you answer #2 we can figure out #3. Then we can progress. Skipping the intermediate steps is not recommended unless you already have sufficient experience.
Check out my experiments http://blog.blinkenlight.net

SirNickity

Post a pic of, or at least describe, your circuit.  Most of the faults I see, while casually observing others' first attempts, are wiring and setup issues.  Maybe you've swapped MISO/MOSI, or you didn't use a crystal, or you haven't used a pull-up on the reset pin?

ScooterinAB


Step 1: calm down and relax
Step 2: describe which OS you are using
Step 3: learn how to connect to an Arduino Board with avrdude (-t option)
Step 4: learn how to flash an Arduino Board
Step 5: learn how to connect to a naked chip
Step 6: learn how to flash a naked chip

Once you answer #2 we can figure out #3. Then we can progress. Skipping the intermediate steps is not recommended unless you already have sufficient experience.


2: I'm running Windows 7, with Arduino IDE. I tried AVR Studio, but was completely overwhelmed.
3: Are you referring to switching the drivers to Arduino's library? If so, I've already done that. If not, please explain what you mean, as I am completely lost at this point.
4+: As I requested, I'm looking for someone who can walk me through this, as I no longer understand how to proceed.

@SirNickity: There really isn't a circuit diagram I'm following. Everything I've read was pretty straight forward (connect MISO, etc from programmer to MISO on chip, connect VCC and GND). Beyond that, aside from a 10k resistor pulling the Resets high, I understood from the material here that the chip has a clock already and that I might not need a crystal.

udoklein

OK, does Arduino IDE + Arduino work in your setup (without ISP)? That is: can you flash sketches with IDE + bootloader?
Check out my experiments http://blog.blinkenlight.net

ScooterinAB


OK, does Arduino IDE + Arduino work in your setup (without ISP)? That is: can you flash sketches with IDE + bootloader?


I'm not sure what you mean. My Arduino Uno is working fine. But as soon as I try to upload a sketch or burn the bootloader to a new chip, the whole thing is a bust. I;ve tried various sets of instructions, including using the Arduino as an ISP. Nothing works.

spycatcher2k

Use a crystal!!!! & associated capacitors -  If your atmega has the fuse set to use it, then it will not be programmable without it.
Mrs Drew
-=-
http://www.uk-pcb.co.uk - UK PCB Fab Company
I will design & code for you, but I will also charge you (PM me)
If you don't like my answers, realize : I'm not being cheeky, I'm Just trying to prompt you to use your own brain/google etc.

udoklein

So if I understand you right you only fail to flash new chips. Well, new chips run on internal oscillator at 8 MHz with ckdiv 8 by default --> the timing does not fit at all. However at least they can be flashed. If you use the IDE to flash them then the IDE will flash the standard fuse setup for running with external crystal. If you do not have this then the result will be that the target will have no clock. No clock implies no possibility to do anything with the chip. Either you set it up with a crystal or you will be stuck.

So does your setup include an external crystal or resonator? Or did you change the IDE fuse setup to 8 Mhz, ckdiv 1?
Check out my experiments http://blog.blinkenlight.net

Go Up