shiftPWM - Alternate MOSI / SCK pins

Status
Not open for further replies.

AdmiralCrunch

Well-known member
Hi,

something I really don't get.. in the shiftPWM-lib i have to uncomment the following lines to get it working

Code:
 #define SHIFTPWM_NOSPI
 const int ShiftPWM_dataPin = 11;
 const int ShiftPWM_clockPin = 13;

.. like the const-name tells me, no SPI is used here? corrent? .. so why do I have to use the pin 11 (MOSI) and 13 (SCK)??

anyway.. my pins 11 and 13 are already used otherwise, so I would like to take the alternative pins 27 and 28.. I have read here that I have to move the SPI-functionality by

Code:
SPI.setMOSI(28);
SPI.setSCK(27);

is this correct? where in the code do I place the SPI-pin-move according to the non_blocking_example? I just can't get it woikring with alternative pins.
 
No. As you guessed from "NOSPI", it's not actually using the SPI hardware.

To select different pins, just edit the numbers on these 2 line:
Code:
 const int ShiftPWM_dataPin = 11;
 const int ShiftPWM_clockPin = 13;

I did.. (I use T_3.6)

Code:
 const int ShiftPWM_dataPin = 28;
 const int ShiftPWM_clockPin = 27;

but it is not working.
 
Status
Not open for further replies.
Back
Top