Go Down

Topic: conflict SPI device and ICSP burning (Read 1 time) previous topic - next topic

begael

Hello.
I use an atmega328 on a breadboard, and an accelerometer in SPI.
To not remove all the time the uC to burn it, I made an ICSP connector.
But it seems that with the accelerometer, the uC doesn't want to be burned.
Everything goes well when I remove the accelerometer...
On a breadboard, it is ok, but when I'll build a real circuit, I'll can not remove the accelerometer !
I suppose that ICSP use also ISP protocol, and there is a conflict.
Someone knows how doing this ?
Thank you.

CrossRoads

Add the pins for an FTDI-Basic and program it via the Rx/Tx pins instead so you don't have the SPI pins conflict.
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.

begael

Thank you CrossRoad.
This is a good idea... Except that I've got already an XBee on the serial pins :-(
Maybe I can just put a little switch on the lines ?

pieturp

#3
May 31, 2011, 11:17 pm Last Edit: May 31, 2011, 11:23 pm by pieturp Reason: 1
The CS (Chip Select, also known as SS) pin (usually pin 10, but can be anything) is used to select the device on the SPI bus to communicate with.
So if you put a switch in between, it should work. However, CS is active low, that means you should pull it high if you want a device not to communicate with your Arduino.

edit:
Read more about SPI on wikipedia

begael

thank you pieturp !
I 'll try it tomorrow (it is night now in belgium :-) )
A switch and a 10K pull-up.

begael

thank you pieturp.
i 've tried, and it works very good.

pieturp

Good to hear!

And by the time you read this: goedemorgen!

Go Up