el_supremo
Well-known member
On the Teensy 3, the SPI SCK signal on pin 13 can be reassigned (in theory) to pin 14. I tried this out and can't get it to work. At the moment it seems that I can't get the SPI library to change SCK to pin 14. I have edited pins_arduino.h so that SCK is defined as 14 instead of 13 but when I run my sketch which reads an SPI real-time clock it still works on pin13.
Reassigning the pin also doesn't seem to work. If I set the SPI library code to use Pin 13 but reassign SCK to pin 14, the sketch still works with SCK on 13 whereas if the reassignment had worked the sketch should have failed.
So, two problems:
- how do I modify the SPI library so that it uses Pin 14?
- how to reassign SCK to pin14 properly. All I have done is reassign the pin to its ALT2 assignment with this
PORTD_PCR1 |= 0x200;
Is there something more that needs to be done to reassign the pin?
Pete
Reassigning the pin also doesn't seem to work. If I set the SPI library code to use Pin 13 but reassign SCK to pin 14, the sketch still works with SCK on 13 whereas if the reassignment had worked the sketch should have failed.
So, two problems:
- how do I modify the SPI library so that it uses Pin 14?
- how to reassign SCK to pin14 properly. All I have done is reassign the pin to its ALT2 assignment with this
PORTD_PCR1 |= 0x200;
Is there something more that needs to be done to reassign the pin?
Pete