Go Down

Topic: Will ICSP programming be affected if there are SPI slave devices on board? (Read 1 time) previous topic - next topic

lightaiyee

I would like to use ICSP programming. However, the circuit also uses a SPI slave device. Since ICSP and the SPI slave device both use MISO, MOSI and SCK, will ICSP programming be affected by the SPI slave device? If yes, what are some hardware changes needed to get ICSP programming working?

CrossRoads

Yes, if the slaves can drive MISO. Be sure to have a pullup resistor on the slave chip select pins to keep them off the SPI bus while the processor's reset line is low and the IO pins are not driven (they default to INPUT state when Reset is low).
If the slaves use active high chip select, then a pulldown resistor is needed.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

jboyton

There was someone recently with this problem. It turned out that the SPI device he was using doesn't tri-state the MISO line when its chip select is deactivated. The datasheet was clear on the subject.

I have an OLED display that also misbehaves during ICSP programming unless I pull up not only CS but also its RESET pin. Without the pullups it screws up not only MISO but also MOSI and SCK.

chucktodd

There was someone recently with this problem. It turned out that the SPI device he was using doesn't tri-state the MISO line when its chip select is deactivated. The datasheet was clear on the subject.

I have an OLED display that also misbehaves during ICSP programming unless I pull up not only CS but also its RESET pin. Without the pullups it screws up not only MISO but also MOSI and SCK.

I had a similar problem with a SD card,  If the SD card was installed ISP programming would fail at different memory locations.  These locations changed depending on the byte stream send.  I about pulled out my hair until I stripped everything off the board.

Chuck.
Currently built mega http server, Now converting it to ESP32.

Go Up