AtMega328 basics

I'm having trouble finding a few bits of information here:
I'm working on a project where I want to use the Duemilanove to program a 328 which will be then taken out of the Arduino and used on a pcb.
1: Does the chip have its own onboard oscillator?? or am I gonna need a 20MHz crystal on my PCB?
2: Diode cct protection: is this onboard on the chip, or am I going to need 50 diodes in my circuit?

1: Does the chip have its own onboard oscillator?? or am I gonna need a 20MHz crystal on my PCB?

The chip has its own onboard oscillator, however:

  1. Its maximum value is 8 MHz
  2. The fuses have to be reconfigured to use it. By default the fuses are set to expect an external oscillator (16 MHz on an Arduino). You cannot change the fuses through regular program downloading...you have to use the ISP header.

2: Diode cct protection: is this onboard on the chip, or am I going to need 50 diodes in my circuit?

I assume you mean the ESD protection diodes? They are on the chip.

--
The Aussie Shield: breakout all 28 pins to quick-connect terminals

1: Does the chip have its own onboard oscillator?? or am I gonna need a 20MHz crystal on my PCB?

Yes. The oscillator can run at 1 MHz or 8 MHz. It is ±10% from the factory and can be tuned to ±1% (sometimes better).

2: Diode cct protection: is this onboard on the chip,

cct? Counter Culture Terminology? Cucumber Cutting Tube?

or am I going to need 50 diodes in my circuit?

What circuit?

wow, thanks! that was super quick!
awesome, diode cct (circuit) protection provided!!!
hmmm... so I think I will need a crystal, thank you very much

Just a warning...that "diode protection" is really meant only for ESD -- short-duration events. It is not going to protect the chip from long-lasting steady overvoltages. If you apply 7V (or higher) to any I/O pin and hold it there, the chip will fry.

--
The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected

Kind of piggy backing on the end of this thread...

If I have an arduino w/ a 20MHz oscillator and I don't care about the delay(), micros(), millis(), etc. Is this only thing necessary to change/create a board file to accommodate the change in clock speed from 16 to 20MHz? I use the 6 pin ICSP programmer for everything so I don't have to deal with bootloaders.

thanks.

Is this only thing necessary to change/create...

This? What are you referring to? Please provide more details.

There is the boards.txt file in the arduino-00XX/hardware/arduino that contain something that looks like this:

atmega328.name=Arduino Duemilanove or Nano w/ ATmega328

atmega328.upload.protocol=stk500
atmega328.upload.maximum_size=30720
atmega328.upload.speed=57600

atmega328.bootloader.low_fuses=0xFF
atmega328.bootloader.high_fuses=0xDA
atmega328.bootloader.extended_fuses=0x05
atmega328.bootloader.path=atmega
atmega328.bootloader.file=ATmegaBOOT_168_atmega328.hex
atmega328.bootloader.unlock_bits=0x3F
atmega328.bootloader.lock_bits=0x0F

atmega328.build.mcu=atmega328p
atmega328.build.f_cpu=16000000L
atmega328.build.core=arduino

I am proposing just changing the 16000000L to 20000000L and using my ICSP programmer to skip the bootloader part. I'm not sure if anything else has to be done.

You may have to change this...

atmega328.upload.protocol=stk500

...to match the protocol of your programmer. Other than those two changes, you should be good to go.

Ok. great. Thanks for the help.