Hello,
I have made a perfboard circuit for bootloading Atmega328P-AU which works fine using the ArduinoISP sketch with a Arduino Nano.
I'm trying to use ATmega168PA-AU instead of 328P-AU for my project. As their pin assignment are the same, I use the same circuit for bootloading the 328p-au. This time, I'm using Nick Gammon's sketch and it detects the 168PA-AU without any problem. After sending "G" in serial monitor, it said "Clearing 'Divide clock by 8' fuse bit" and started "fixing low fuses setting". However, It could no longer enter programming mode and the chip could not be detected anymore (Failed to enter programming mode. Double-check wiring!). I have tried 2 168PA-AUs and the results are the same. I have been searching for hours and still could not solve the problem. Does anyone have faced the same problem before? Thanks for your time.
EDIT:
I found that I used a 1k pull-up resistor for the RESET pin instead of a 10k. After replacing that and adding two 0.1uF decoupling caps, it works fine now! Wonder why the 1k pullup works for 328P. Hope this would help someone in the future!