Go Down

Topic: Standard Fuse Settings for 16Mhz ATMega328p (Read 135299 times) previous topic - next topic

westfw

If you've really set HFUSE to 0xE1, then you've disabled SPI programming, and indeed "bricked" your chip to the extent that you'll need a HV Parallel programmer to un-brick it.  (However, you're not supposed to be able to disable SPI *using* SPI, so this shouldn't be the case.)  Most likely, you've just programmed the crystal oscillator to a mode that doesn't work with the actual crystal you have installed, and you can fix it by injecting a clock "manually."

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=106325

JohnnyFyve

Thanks, new chip it is. I've tried to burn the bootloader multiple times with no luck.

JohnnyFyve

I should have a 555 timer laying around that I can try and use as a clock input, what is not clear to me is if I can simply use 1Mhz or if it needs to be some other multiple of what I might have set the chip to look for.

JohnnyFyve

I managed a 7kHz wave with the parts I had laying around, does the frequency need to be higher? I have this signal going into pin 9 on my arduino but I still can't re-program it through PROGISP.

westfw

You have to feed in ISP commands clocked (SCLK signal) at a fraction of the rate that the cpu is running at (1/16?)
I don't know offhand which programmers allow you to set the clock to arbitrary rates, or which programming tool SW permit you to set it...

Adafruit has a version of ArduinoISP that provides a relatively fast clock on one of the extra pins, which can be fed into the target CPU...

JohnnyFyve

Thanks for the replies. For ~$5 I can get a new Arduino pro mini, or for $4 I can get a new 328P chip, I'll just do one of those, its much easier  : )

CrossRoads

Get one with a bootloader on it, can use that one to bootload cheaper blank parts in the future.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

JohnnyFyve

If I just get a standard 328P replacement can't I just burn the bootloader on using the Arduino IDE?

CrossRoads

No, you need a programmer - the programmer connects to the SPI pins for programmer the bootloader in. The IDE can do that, but you need a programmer.
An Arduino can be used as  a programmer:
http://www.gammon.com.au/forum/?id=11635
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

JohnnyFyve

Will this programmer do?  https://www.sparkfun.com/products/9825

If not I have a $5 Arduino pro mini coming early next week.

CrossRoads

Yes, that one will do.
In the IDE, select Tools:Programmer:USBasp
I have one but never set things up to use it, might be some driver setup needed as well.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

JohnnyFyve

I have my Arduino Pro Mini and I thought it would be easy to program it, but I haven't had any luck yet  :(. Using my Sparkfun AVR pocket programmer ( https://www.sparkfun.com/products/9825 ) I'm trying to load the blink program. I have tried all the programmer types, none have worked. Most return;
Code: [Select]
avrdude: stk500_getsync(): not in sync: resp=0x00
The Pro Mini is powered and it looks like it came pre-programmed with blink. I'm trying to make it blink faster (really I'm just trying to verify my board & programmer all work) before I try and fix my other Arduino, or before I turn this Pro Mini into a quadcopter controller (the real reason I bought it).

JohnnyFyve

#42
Aug 01, 2014, 07:23 pm Last Edit: Aug 01, 2014, 07:38 pm by JohnnyFyve Reason: 1
I forgot to post images so here they are. I'm trying to program the Pro Mini using ICSP.

JohnnyFyve

I am able to burn the bootloader to the device, but none of the programs I've tried. I'm confused :S. I'm using Arduino IDE (forgot to mention this).

JohnnyFyve

Got it. I need to use "upload using programmer" instead of the usual verify/upload buttons.

Go Up