6

I know I may sound a little idiotic to ask, but as I have seen in the internet that to program a standalone Atmel chip like that from of the Arduino's, you need 2 22pF ceramic capacitors and a 16mhz oscillator. As the oscillator is needed is clock the frequency of the chip, so a timer IC should work just fine, isn't it? or do I have wrong information?

  • 1
    You can provide an external clock on pin PB6, but you'd need to set the correct fuses to select the External Clock option. But if you need to change the fuses, you might as well set the fuses to use the internal 8MHz RC oscillator, and negate the need for a 555 or crystal. – Gerben Apr 9 '17 at 12:51
5

The default configuration of these chips, as they come from the factory, is to use their internal 8 MHz RC oscillator downscaled at 1 MHz. So you do not need any extra oscillator to program them.

Once you program the chip the first time, if you configure it to use an external resonator/oscillator, then you do need to have that attached in order to reprogram the chip.

A 555 may be able to run the chip, but if you want to reprogram it, the programmer may not cope well with the extra-low frequency the chip would be running at.

| improve this answer | |
5

No, you won't be able to build a 16 MHz clock signal using a 555 timer. That's far beyond the 555 capabilities (see N.B.).

If you could squeeze out of the 555 a mere 1 MHz (which I seriously doubt), the clock stability and jitter would be so bad that it won't be usable but for simple sketches not requiring any timing accuracy. At that point, you would be far better off using the internal 1 MHz RC network of the ATmega328P as Majenko says, because you would at least save the 555 and its associated components.

Also, a 555-based clock would consume much more power than any of the alternatives already available to you (internal oscillator, external crystal...). Even the CMOS version.

My recommendation: forget about it, it's not worth it.

NOTE BELOW:

NE555N is a BJT version of the 555. BJTs suffer from what's called "storage time", a charge accumulation in the base that severely limits switching time. The NE555N datasheet states a storage time of about 10 microseconds (p.10), which limits the switching frequency to about 100 kHz.

TLC555 is a CMOS version of the 555. Because it uses FETs, its maximum switching frequency is much higher. The TLC555 datasheet (p.6) states that a typical value for the maximum switching frequency is 2.1 MHz (and at least > 1.2 MHz).

| improve this answer | |
4

Yes, you could use a 555. You can also go even simpler and use an RC network. Even simpler still is to use the 1MHz RC network built in​ to the chip.

The main drawback of these methods, and the 555 particularly, is that of stability. Using a crystal and capacitors you can get very accurate timing at high frequencies. Using a 555 you can get ballpark timing at low frequencies. Fine if all you want to do is blink an LED, but as soon as you need to do anything that requires good timing it all falls apart. That includes things like using the UART for which accurate timing is at the heart of its operation.

The internal oscillator is better in this respect since it can be calibrated using the OSCCAL register. However changes in ambient temperature can cause unacceptable drifting of the clock frequency.

| improve this answer | |
3

It depends on how you're programming it.

If you're using a bootloader to accept programming commands via a serial connection then you will need to use the clock method specified by the fuses currently programmed, since the chip at that point will actually be running code programmed on it.

If you're using ISP to program the chip out-of-band then you can apply a clock source directly to the XTAL1 pin as shown in the "Serial Downloading" subsection of the "Memory Programming" section of the datasheet. In this case you will need to adhere to the timing information given at the end of the subsection.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.