if i was to us the internal clock dose that mean the cpu wont run at 20Mhz on lets say the atmega 328 or the attiny 45
or are the two not relative to each other in any way
Internal clocks are 8 MHz. Check the datasheet of the part you are interested in to confirm.
yah i know the internal clocks are 8Mhz but if im using the internal clock of 8Mhz dose this mean that the maximum speed of the cpu is reduced to 8Mhz or can the cpu still run at 20Mhz
You need to use an external crystal and/or clock to operate at 20 MHz.
If you use the internal clock you operate at 8 MHz max.
The clock source is selected by setting/clearing fuses (basically bytes of EEPROM) in the chip using an AVR ISP programmer.
imjeffd:
attiny 45
The ATtiny 25/45/85 is a little weird -- it lets you run at 8MHz or 16MHz with the internal PLL. All the other Atmel AVRs I'm aware of are limited to 8MHz internally clocked.
Hadn't read the ATtiny45 data sheet before, that is interesting.
Looks like system clock still has 20 MHz upper limit, with a couple of functions that will run faster.
CrossRoads:
Hadn't read the ATtiny45 data sheet before, that is interesting.
http://www.atmel.com/Images/Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATtiny45-ATtiny85_Datasheet.pdf
Looks like system clock still has 20 MHz upper limit, with a couple of functions that will run faster.
But using anything but the built in clocks takes up precious pins with so few to spare.