Where is Digital Pin10 of ArduPilot?Trying to connect the SCP1000 to ArduPilot (AT328), but cannot find Pin10 SlaveSelect. The SCP1000's CSB supposed to connect to the Atmega's SlaveSelect pin 10. Where can I access it?If I cannot access it, what other pin can I use? Would I have to change anything else in the code except from 10 to whatever the other pin number is? (Please see attached complete code I found on the net)It seems that Pin 10 is used in the servo out and also as the Reset for the Attiny at jumper 6/Pin 5 and for the 74LS157 chip at pin 6.Here is the relevant part of the SCP1000 code:// define spi bus pins#define SLAVESELECT 10#define SPICLOCK 13#define DATAOUT 11 //MOSI#define DATAIN 12 //MISOThanks for any help.
Found a work around on the net for using another Pin for Slaveselect besides pin 10. Cant find Pin 10. The SCP1000 seems to work now. The temp value seems a bit high (102F vs 80F), but the air pressure seems ok, and changes with elevating the sensor.
This is the work around: must insert this line here to force Pin 10 HIGH that allows another Pin to act as SlaveSelect.
Old code using Pin10 as SS:
digitalWrite(SLAVESELECT,HIGH); //disable device
SPCR = B01010011;
New code using Pin 8 as SS:
digitalWrite(SLAVESELECT,HIGH); //disable device
digitalWrite(10, HIGH); //physical SS pin high before setting SPCR
SPCR = B01010011;
Replies
This is the work around: must insert this line here to force Pin 10 HIGH that allows another Pin to act as SlaveSelect.
Old code using Pin10 as SS:
digitalWrite(SLAVESELECT,HIGH); //disable device
SPCR = B01010011;
New code using Pin 8 as SS:
digitalWrite(SLAVESELECT,HIGH); //disable device
digitalWrite(10, HIGH); //physical SS pin high before setting SPCR
SPCR = B01010011;
Will try to condition the signals next.