Hi,
I am using pin 6 (Maple rev5) for serial communicaion with an LCD 2.5 from Sparkfun, but also Serial1 for the communication with another processor.
According to the general pin map, pin 6 is beeing dedicated to Serial1.CK.
void setup() {
pinMode(pinLCD, OUTPUT); //Pin 6 to LCD, 5 V tolerant
pinMode(BOARD_LED_PIN, OUTPUT); //Watchdog-LED
Serial1.begin(57600); //subproc-Serial
Serial2.begin(9600); //Motorcontroller
LCD.begin(38400); //Bitbanging-LCDSerial at pin 6
pinMode(9, OUTPUT); //DTR to subproc
digitalWrite(9,LOW);//subproc-reset
delay(10);
digitalWrite(9,HIGH);
delay(2000);
//LCD.ClearDisplay();
delay(10);
//LCD.print( s_plashA );
delay(10);
//LCD.print( s_plashB );
delay(2000);
SerialUSB.println(s_plashA);
SerialUSB.println(s_plashB);
}
At the pin 6, which drives the LCD via SoftwareSerial (bitbanging) I never had any clock signal from the USART1, which definitely would have printed something strange on the LCD.
In the loop, there is - by the time now - never at the same time communication with the Serial1 and the LCD.
My question(s) is(are) now:
A) Do I bring the chip into danger by using the CK-pin of an activated USART for different purpose - (which indeed works seemingless right now), or
B) is this pin never used by the USART due to its parameters (synchronous/asynchronous??) after Serial.begin(Baudrate)?
C) And what about the other USART pins except (TXn, RXn), could they be reused the same way, when initialized as Input / Output pins before the Serial[n].begin()?
So- these are questions primarily posed to the folks from leaflabs...
Would be pleased if there might be a short answer...
(Forgibe any misspellings - am no native english speaker)
;-)