External Crystal Fuse Setting Fail

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The title itself is self-explanatory. Here are some details:

My AVR chip: ATmega8535

My Programmer: USBasp

 

Here is the initial condition of fuse:

HFuse: D9

LFuse: E1

High Fuse
S8535C WDTON SPIEN CKOPT EESAVE BOOTSZ1 BOOTSZ2 BOOTTRST
1 1 0 1 1 0 0 1
Low Fuse
BODLEVEL BODEN SUT1 SUT0 CKSEL3 CKSEL2 CKSEL1 CKSEL0
1 1 1 0 0 0 0 1

 

This is the initial fuse condition:

http://tinypic.com/view.php?pic=1xaag&s=9#.XQT8T1UzbIU

 

I want to change the clock setting to external crystal (I use 8Mhz crystal)

Here is the initial condition of fuse:

HFuse: C9

LFuse: FF

High Fuse
S8535C WDTON SPIEN CKOPT EESAVE BOOTSZ1 BOOTSZ2 BOOTTRST
1 1 0 0 1 0 0 1
Low Fuse
BODLEVEL BODEN SUT1 SUT0 CKSEL3 CKSEL2 CKSEL1 CKSEL0
1 1 1 1 1 1 1 1

 

This is what I write in cmd command:

avrdude -c usbasp –p atmega8535 –P usb -U hfuse:w:0xC9:m -U lfuse:w:0xFF:m

 

This is what's written in cmd after I wrote the above syntax:

http://tinypic.com/view.php?pic=e85wya&s=9#.XQT9CVUzbIU

 

This is what's written after I check the fuse condition again:

http://tinypic.com/view.php?pic=alk8d0&s=9#.XQT82FUzbIU

 

I got my own dev board, and here's a little sight of the schematic

http://tinypic.com/view.php?pic=105p69s&s=9#.XQUFZVUzbIU

I believe I positioned capacitor and crystal properly.

 

I'm just wondering as to why this happens, I got the tools to fix bricked chip, at first I thought the command syntax was wrong so I tried different way to write the command such as:

avrdude -c usbasp -p m8535 -U lfuse:w:0xFF:m -U hfuse:w:0xC9:m
avrdude -c usbasp -p atmega8535 -U lfuse:w:0xff:m -U hfuse:w:0xc9:m

well basically just small-lettering alphabet and stuff.

I already read post on this too  https://www.avrfreaks.net/forum/tutsoft-recovering-locked-out-avr?name=PNphpBB2&file=viewtopic&t=106325

But nothing seems to be helpful. I haven't tried to replace the crystal though, could that be the problem?

Last Edited: Sat. Jun 15, 2019 - 02:58 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The obvious thing is to post a photo of your actual ATmega8535 with crystal and capacitors.

 

Your avrdude commands were correct.   The response was correct.   So it looks like :

1.  bad soldering

2.  wrong capacitors e.g. 22nF

3.  duff crystal

4.  your schematic says ATmega16.   This does not inspire confidence in your attention to detail.

 

If you are not using soldered joints on a pcb,  you should run the AVR on its internal RC.

From memory:  90S8535 must have a crystal.  mega8535 has internal 1MHz RC.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First check your crystal electrical connection.
Then try it again to load your desire Fuse bit, Make sure your programmer enable Low SCK frequency.
You can usage follow gui version of AVRDUDE to make your process fast.

http://blog.zakkemble.net/avrdudess-a-gui-for-avrdude/

শূন্য  - The ZeRo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

The obvious thing is to post a photo of your actual ATmega8535 with crystal and capacitors.

 

Your avrdude commands were correct.   The response was correct.   So it looks like :

1.  bad soldering

2.  wrong capacitors e.g. 22nF

3.  duff crystal

4.  your schematic says ATmega16.   This does not inspire confidence in your attention to detail.

 

If you are not using soldered joints on a pcb,  you should run the AVR on its internal RC.

From memory:  90S8535 must have a crystal.  mega8535 has internal 1MHz RC.

 

David.

 

David, thanks for the reply man, could you please elaborate more on this

"If you are not using soldered joints on a pcb,  you should run the AVR on its internal RC.

From memory:  90S8535 must have a crystal.  mega8535 has internal 1MHz RC."

 

What is "soldered joints"? I manually soldered the components into the pad using soldering iron.

Also, what do you mean by "From memory:  90S8535 must have a crystal."

 

Thank you for confirming my code syntax was right.

 

Here's the photo of my board and the uC

http://i63.tinypic.com/6jo7qq.jpg

 

eRony wrote:
First check your crystal electrical connection. Then try it again to load your desire Fuse bit, Make sure your programmer enable Low SCK frequency. You can usage follow gui version of AVRDUDE to make your process fast. http://blog.zakkemble.net/avrdud...

 

Hi eRony, thanks for your response, how to enable Low SCK frequency on my programmer?

 

I'll buy the new crystal this week, I will let you guys know of my result

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You don't clearly show a source of power anywhere...do you have one? 

The pic of your board looks fine, but it doesn't appear to have any power supply, only a socket for the chip, crystal and maybe an R C

 

Did you try actually running a program (such as blink an led) before & after changing the clock?

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Tue. Jun 18, 2019 - 02:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:
You don't clearly show a source of power anywhere

You missed the 9v battery snap?

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

raivata wrote:
I got my own dev board, and here's a little sight of the schematic

Normally AREF is not tied to VCC, but to a 100nf cap to gnd.  Internally you can program the AREF to AVCC if needed or to another internal reference for the ADC.

With it tied to VCC externally as shown, if another reference is chosen then internal damage can happen!

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You missed the 9v battery snap?

Uh, where is the battery???...and I hope he is not going to run at 9V!!!  

 

Neither the schematic nor hookup picture clearly show a power source for the failed test, hence You don't clearly show a source of power anywhere.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the photo.   The 22pF look like 22pF.  The 8MHz crystal looks fine.

I don't see any 100nF capacitors close to VCC,GND pins.   

I am guessing that you have a 7805 regulator out of view.   And hope that you have appropriate capacitors.

 

I presume you are powering the board via the USBASP ribbon.

The 5x2 ISP header must match the USBASP ribbon pinout.    (because avrdude "connects")  

 

We can only guess that you are "good" at soldering.  

 

If you use proper Chinese USBASP with proper Chinese firmware I would expect your board to work 100% (when you solder some 100nF close to the VCC, AVCC, AREF pins)

 

David.