Cant seem to relocate PB0 and PB1 (20 and 21)
xlar54 opened this issue · comments
Im wanting to use a RTC module which relies on pin 20 and 21, so Im trying to relocate the CLOCK and SRQ lines. I think this is done in arch-config.h:
// Pins assigned for the IEC lines
#define IEC_PIN_ATN PD3
#define IEC_PIN_DATA PD2
#define IEC_PIN_CLOCK PD1
#define IEC_PIN_SRQ PD0
but changing them to anything else doesnt seem to work. I would like to shift all the lines up the header just by two (so PD0 becomes PD2, etc). Doing so, the device is no longer recognized. Any ideas?
Nevermind - figured it out. In addition to the pin #s, you also have to change the IEC signals line for the specific port, aka:
/*** IEC signals ***/
#define IEC_INPUT PINA
#define IEC_DDR DDRA
#define IEC_PORT PORTA
// Pins assigned for the IEC lines
#define IEC_PIN_ATN PA4 // digital pin 26
#define IEC_PIN_DATA PA5 // digital pin 27
#define IEC_PIN_CLOCK PA6 // digital pin 28
#define IEC_PIN_SRQ PA7 // digital pin 29
For someone's future reference, this page tells what pins are refered to above:
https://www.arduino.cc/en/Hacking/PinMapping2560
While this allowed the clock to operate, i was unable to read from it (T-RA). It reports DSrtc not found to the uart. Unusual since it works fine with a clock test sketch in this configuration.
Disregard. I found another 3231 library and it works now.