Mega168 will not start

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

My Mega168 will not start.

I intended to use the internal ceramic oscillator as clock source for minimum external componenst. Now I fear that the ceramic oscillator isn't enabled by default. But as far as I have understood, it should be.

I can read out the fuse bits and they are as follows: 0xF9DF62

/Bengt

My favorites:
1. My oscilloscope, Yokogawa DLM2024.
2. My soldering iron, Weller WD2M, WMRP+WMRT.
3. JTAGICE3 debugger.

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

The fuses you read back are consistent with the default factory settings for the ATmega168, according to the datasheet.

And, by default, the internal RC oscillator (there is no built-in Ceramic resonator) is selected, with a speed of 8 MHz -- that is what is meant by the value contained in the low nibble of the Low Fuse byte.

The clock is divided down to 1 MHz by the clock prescaler before it enters the CPU -- that is what is meant by the value contained in the MSb of the Low Fuse byte.

PS:
How did you read back those fuses? Were you using serial (SPI) programming, or High-Voltage?

If you were using an SPI programmer to read the fuses, then it would have been impossible to read anything at all unless the AVR had a valid clock source selected at the time. So, that means that the vary fact that you were able to read the fuses indicates that the AVR is physically capable of 'starting up'.

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

Hi.

Yes I am using SPI so the thing do start up. But there is something strange here going on. The program DO run efter I program through the SPI. BUT it does not run if I remove the SPI cable and turn on the power. I have also been able to switch between 8MHz RC clock (thanks for correcting me about the ceramic issue) and the 1MHz clock.

I will hook up the oscilloscope and check the power on rise time. Maybe I must enable the BOD if the rise time is slow.

My favorites:
1. My oscilloscope, Yokogawa DLM2024.
2. My soldering iron, Weller WD2M, WMRP+WMRT.
3. JTAGICE3 debugger.

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

Result: I have some power supply problem. There is a software controlled power switch and I have 2V even if it is turned off. Most probable, the CPU is still running. I think it is a low voltage version so nothing happends at power on (no power on reset).

My favorites:
1. My oscilloscope, Yokogawa DLM2024.
2. My soldering iron, Weller WD2M, WMRP+WMRT.
3. JTAGICE3 debugger.