A programmer works with an ATmega328P board that has already been running but cannot read the signature on a newly assembled board of the same revision. The new board has a 16 MHz crystal installed, but its fuses still determine the active clock. Reusing the fast programming clock from the finished board may prevent the new unit from receiving even the first readable command.
Choose the programming rate for the clock the target is using now
In the factory default configuration, the ATmega328P selects the internal calibrated 8 MHz oscillator with divide by eight enabled, so the initial system clock is approximately 1 MHz. Microchip requires the ISP serial clock to be below one quarter of the target clock in this case. That puts the boundary at 250 kHz. Start with SCK at 125 kHz and read the signature, low fuse byte and device identifier. For a preprogrammed device, use the actual fuse readback to recover the clock configuration. The external crystal label alone cannot establish the active clock.
After reading the signature, save the raw fuses for each sample board and decode the clock source and divide-by-eight fields separately. Check whether the station script changes the clock source before programming the application. If it selects the external crystal early, a missing or poorly soldered crystal can prevent further programming. Verify the external crystal configuration at the target voltage on sample boards before adding it to the approved process. The communication test itself only needs a signature read.
If lowering SCK does not help, measure actual device supply, common ground, reset and the three ISP signals, and save the measured SCK rate from a logic analyzer. These checks distinguish an unapplied programmer setting from an absent target clock or a connection fault. A production station can have one speed for the first connection to a new part and another for rework, with the same signature check for both.ATmega328P clock sources and default fuses · Microchip ISP programming clock requirements
