I'm using a ATMega2560, and a FT812 Graphical LCD. Before my upgrade, I'm used USBASP and worked well. For some reason, I bought a AVRISP mkII. But I got a problem, the programmer does not frees the SPI after programming. The ATMega2560 only have a single SPI (sorry), and therefore I cannot dedicate a SPI for programmer only. If I unplug the programmer each time after programming it works, but I don't want to always do it. If the programmer was plugged after programming, i tested the microcontroller will run, and the only problem is the my graphical LCD, which cannot run without the SPI. My guess is the AVRISP mkII won't release SPI after program, but this can be different cause.
Datasheets
-
1\$\begingroup\$ Is this a custom board made by yourself or some commercial product that have a ICSP port? \$\endgroup\$hcheung– hcheung2025年05月31日 01:54:15 +00:00Commented May 31 at 1:54
-
\$\begingroup\$ If you operate the LCD WITHOUT the programmer and THEN add the programmer, does it then immediately stop . || It is more likely NOT a matter of not releasing the SPI but of the programmer responding to SPI signals not inteded for it. Look at your SPI addressing and enable system and see if the programmer SPI can be logically disabled. || IF not you could add a gate or gate in the programmer SPIlines to isolate it. \$\endgroup\$Russell McMahon– Russell McMahon ♦2025年06月01日 11:57:19 +00:00Commented Jun 1 at 11:57
1 Answer 1
If the AVRISP is connected to the processor it is important that you keep the power supplied to the AVRISP - do not unplug it from the computer even if it is not actively programming.
If you power down the AVRISP it will load down the reset line and prevent the ATMega2560 executing.