0
\$\begingroup\$

I am planning to use ISP programmer to program my new AVR board. I use an 8 MHz crystal on my PCB to clock the micro (atmega328p-au). Now, as I understand the ISP programmer will provide its own clock to my board when programming. It occurs to me that this might pose an issue. I've read that using an SPI clock much slower than the system clock is the way to go, but haven't found any specific documentation. Any suggestions? Thanks!

\$\endgroup\$
3
  • \$\begingroup\$ Can you describe the issue you think may be happening? \$\endgroup\$
    – Ron Beyer
    Nov 16, 2019 at 14:58
  • 1
    \$\begingroup\$ IIRC, for most AVR controllers, ISP clock can be 1/4 system clock max. So having 8 MHz crystal, ISP has to be set to 2MHz or slower. But don't quote me on that. \$\endgroup\$
    – Rev
    Jan 19 at 7:54
  • 1
    \$\begingroup\$ @Rev The AVR ISP User Guide confirms this: i.stack.imgur.com/Xp9Ae.png \$\endgroup\$
    – Velvet
    Jan 19 at 8:25

2 Answers 2

2
\$\begingroup\$

ISP clock can't "interfere" with on-board clock. ISP clock is the clock for the ISP data. The MCU still needs a clock to run itself, and this clock needs to be high enough for the given ISP clock. Slower MCU clock needs slower ISP clock for sure, exact parameters are given in AVR datasheet.

\$\endgroup\$
1
\$\begingroup\$

The ISP clock is an SPI clock (for the purposes of serial programming which I am assuming)

So long as the ISP clock is not too fast for the ATMega to act as SPI slave there will be no problem.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.