Pages: [1]   Go Down
Author Topic: Bricked MCU?  (Read 518 times)
0 Members and 1 Guest are viewing this topic.
San Pedro, CA.
Offline Offline
Full Member
***
Karma: 3
Posts: 155
My head HURTS!!!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a couple AVR mcu's I'm not using so I decided to play around with them. They are the ATmega8 and ATmega32. I used my mega1280 board as ISP and AVR Project IDE to compile and upload sketches to both chips. Uploads OK, Sketches working. Then I ran into some problems with both.

1.) No matter what I tried I could not get the ADC's on either chip to work. Digital I/O work as expected, analog always returned 0. I tried using the arduino cores ala analogRead() and straight C code ala register manipulation and nothing worked. So, I gave up on this issue for now.

2.) Next I tried burning a bootloader to the mega8 chip using arduino as ISP. Now I can't upload anything to it. I can't change anything on the chip even with avrdude. Device signature reads 0x000000 and all reads from the chip return 0x00.

Did I brick my mega8? If anyone needs more info, let me know.

Thanks,
DJ
Logged

DigitalJohnson

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 206
Posts: 12861
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


2. Do you have a resonator or crystal attached?
Logged

Scotland
Online Online
Edison Member
*
Karma: 25
Posts: 1311
Have you had your Arduino fix today?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

1st, read above, I think we have all been caught out with that one. Also Programming the chips with the Arduino IDE writes out a specific set of fuses - If you used another method, you may of set the protection fuses to disallow reading contents (done this one myself), but can be recovered with a High Voltage(12v) unit.

But as CB suggested, Crystal/Resonator Missing/Faulty is prime suspect here.
Logged

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

San Pedro, CA.
Offline Offline
Full Member
***
Karma: 3
Posts: 155
My head HURTS!!!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry I took so long to get back. To answer CB; No I had set the fuses for 8Mhz internal. When the arduino burns a bootloader does it set the clock to 16MHz external? I will try to locate a crystal, I think I have one somewhere. But even if thats the problem why can't I access the fuses with avrdude? Keep in mind burning bootloaders and using avrdude is all new to me.  smiley-wink

Thanks for the replies. I'll see if I can locate that crystal and report back later.

Digital J
Logged

DigitalJohnson

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 206
Posts: 12861
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

When the arduino burns a bootloader does it set the clock to 16MHz external?

Yes.

Quote
I will try to locate a crystal, I think I have one somewhere.

Any reasonable clock signal (e.g. 1 MHz) on the XTAL1 pin will work to reprogram the processor.  Somewhere in the forum is a modification to the ArduinoISP sketch that provides a 1 MHz clock just for that purpose.

Quote
But even if thats the problem why can't I access the fuses with avrdude?

I have no idea if it is or is not true but my suspicion is that the processor has a "micro kernel" that executes ISP instructions.  In order for the "micro kernel" to run, it has to have a clock.

In any case, a clock is required for the ISP interface to work.  There is a very very tiny bit of detail in the datasheet on page 230...

Quote
[diagram shows a clock signal arriving at XTAL1]

Notes: 1. If the device is clocked by the Internal Oscillator, it is no[t] need necessary to connect a clock source to the XTAL1 pin

Quote
Keep in mind burning bootloaders and using avrdude is all new to me.

At some point, it was new to each and every one us.   Not even the folks at Atmel were born knowing how to burn a bootloader.  smiley-grin
Logged

Netherlands
Offline Offline
Sr. Member
****
Karma: 1
Posts: 290
(:-)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's possible to burn a 8MHz bootloader but you'l have to choose the right one.
Logged

Pages: [1]   Go Up
Jump to: