Go Down

Topic: standalone MEGA 2560 (Read 12172 times) previous topic - next topic

HH75

The speed of the resonator is 16MHz.

The reset pin is currently tied up to 5V thru a 10K resistor.


JoeN


The speed of the resonator is 16MHz.

The reset pin is currently tied up to 5V thru a 10K resistor.




The reset pin sounds fine.  I've never used a resonator, only a crystal.  I don't think it should matter.  Unless you have set the fuse, the 2560 is using it's internal oscillator anyway, and since you cannot connect I assume you have not set that fuse yet.
I will never ask you to do anything that I wouldn't do myself.

HH75


You mean the 2560 is not using the resonator that is connected to it now?

I have set no fuse yet at the moment, do I have to set any fuses and how can I do that?

JoeN



You mean the 2560 is not using the resonator that is connected to it now?

I have set no fuse yet at the moment, do I have to set any fuses and how can I do that?


According to the datasheet:

10.3.1 Default Clock Source

The device is shipped with internal RC oscillator at 8.0MHz and with the fuse CKDIV8 programmed,
resulting in 1.0MHz system clock. The startup time is set to maximum and time-out
period enabled. (CKSEL = "0010", SUT = "10", CKDIV8 = "0"). The default setting ensures that
all users can make their desired clock source setting using any available programming interface.

This means that this chip, and I think all 8 bit AVRs are this way, is set to use the internal oscillator by default.  This is the safest possible setting because unlike an external resonator, crystal, or clock, that internal oscillator is actually guaranteed to be there.  AVRs are bricked if the clock source is selecting one that doesn't really exist.
I will never ask you to do anything that I wouldn't do myself.

Docedison

#34
Mar 31, 2013, 05:48 am Last Edit: Mar 31, 2013, 05:50 am by Docedison Reason: 1
From reply # 23...
Quote
Thanks for your reply.

I have re-check and probe the wiring again and they are similar to JoeN process. In addition I have 3 x 0.1uF cap connected from AVcc to Gnd. I also have a resonator and a 1K resistor connected across the XTAL1 and XTAL 2. The datasheet of the resonator is attached.


Likely the problem, If true...100K to 1M ohm is typical and Arduino uses 1 M

Bob
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

HH75

Typo error, it is a 1M resistor connected across the resonator.

That means regardless of whether my resonator is working or not, it should work using the internal oscillator? So it is not the resonator problem.


hiduino

#36
Mar 31, 2013, 06:18 am Last Edit: Mar 31, 2013, 06:30 am by hiduino Reason: 1
Ahh, okay.  If it's still at factory default of 1MHz internal clock then you may need to slow down the Pololu programmer's ISP Frequency.  You need to check your Windows Pololu USB AVR Programmer Configuration Utility and see what ISP Frequency it is set to.  If it is 750kHz or above then it's too fast to program 1MHz AVRs.  You will need to set it down to 200kHz or below.




HH75

I have tried setting it down to the lowest of 1.5Khz but I am still getting the same error log.

Just to recheck my step for burning bootloader...

I hooked up pololu programmer to the ISCP pin, power up the mega 2561, run the Arduino IDE, check the correct serial port is used, check the correct programmer is used and click Burn Bootloader.




hiduino

The ISP Frequency of 1.5kHz may be too low actually.  My testing showed 200kHz works best for 1MHz AVRs.


Go Up