Will onboard SPI slave devices affect ICSP programming given both use same pins?

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would like to use ICSP programming on Atmega328 and Atmega1281. However, the circuit board 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 due to conflicts? If yes, what are some hardware changes needed to get ICSP programming working?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There will be no problem with genuine SPI slaves if they are powered.

 

For ICSP to work,  each Slave's /CS pin must be controlled by an external pull-up resistor.    This ensures that the Slave is de-selected when the AVR is not running (i.e. when being programmed)

 

For theusch:   In the event that you have an unusual SPI Slave with an active-high CS pin,  you use an external pull-down resistor.

 

David.

Last Edited: Thu. Aug 6, 2015 - 07:30 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
genuine SPI slaves

ie, SPI slaves in which de-asserting CS does prevent the device from doing anything on the bus.

 

each Slave's /CS pin must be controlled

and not just tied "permanently active" ... 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...