I've been trying to program an atmega 328p on a PCB that I designed using the ICE over ISP. It uses a 8mHz external clock, see below:
I've selected an 8mHZ external clock in the fuse bits, and change the ISP frequency accordingly (2MHz). At first I had left most of the other bits (except the clock div enable) the same as their default values.
When I try to program it, I get the following error:
I've googled that error, and the similar ones I've been getting, and I haven't come up with much. According to my research, possible sources include:
1) The reset pin; mine is pulled high and the oscilloscope confirms that
2) The fuse bits; I think mine are OK, but then again it doesn't work (see image below)
3) Connection issues; my connector appears to have the correct interface and I have no problems programming the fuse bits. I can make changes and they take hold
4) Clock problems: I see a clean 3.3 V 8MHz clock when I output it to PORTB0
5) Programming frequency for ISP: In AS it says 1/4 of your clock, so 2MHz in my case
If anyone has an idea, it would be greatly appreciated!