user3058: I need to program a ATMega328P on a breadboard, running on an external crystal at 8 MHz.
All of the guides I can find either use the arduino environment and describe a 16 MHz config, or using the 8 MHz internal oscillator - which is too inaccurate for this project. 
How do I do this?  Configure the chip to run at 8 MHz and upload the program?

user3058: myself as of 3 hours ago.

Get an arduino or similar, install the ArduinoISP sketch 
Connect the two as described here.
Change the board to Arduino Pro or Pro Mini, Processor to 3.3V, 8Mhz, Programmer: Arduino as ISP
Hit burn bootloader button
Load up the sketch that you want on the device
Without changing anything, use "Upload using programmer"
Remove arduino, fix wiring changes required to use as programmer

Committed to Electronics Stackexchange  for posterity.  Or so I can find it when I forget next time...

3058: <p>I need to program a ATMega328P on a breadboard, running on an external crystal at 8 MHz.</p>

<p>All of the guides I can find either use the arduino environment and describe a 16 MHz config, or using the 8 MHz internal oscillator - which is too inaccurate for this project. </p>

<p>How do I do this?  Configure the chip to run at 8 MHz and upload the program?</p>
 3058: <p>myself as of 3 hours ago.</p>

<ol>
<li>Get an arduino or similar, install the ArduinoISP sketch </li>
<li>Connect the two as described <a href="https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard" rel="nofollow noreferrer">here</a>.</li>
<li>Change the board to Arduino Pro or Pro Mini, Processor to 3.3V, 8Mhz, Programmer: Arduino as ISP</li>
<li>Hit burn bootloader button</li>
<li>Load up the sketch that you want on the device</li>
<li>Without changing anything, use "Upload using programmer"</li>
<li>Remove arduino, fix wiring changes required to use as programmer</li>
</ol>

<p>Committed to Electronics Stackexchange  for posterity.  Or so I can find it when I forget next time...</p>
