-->
Page 1 of 1

Behavior of Setial1

PostPosted: Sat Apr 17, 2021 6:31 pm
by tlaren
I have a project that outputs to a simple display.
The output is ASCII, Display address and a Command.
I have it working with Serial.Swap() but want to add another Serial device.
The display does not return anything so I tried Serial1.
I cannot get it to accept commands.

Logic Analyzer of Serial1
Image
Logic Analyzer of Serial
Image
The idle state of Serial1 in inverted.
Is there a way to fix this, the display complains.
Code: Select allvoid setup() {
  Serial.begin(38400,SERIAL_8N2);
  Serial1.begin(38400,SERIAL_8N2);
}

String Message = "*0011DCMETH 911";

void loop() {
  Serial.flush();
  Serial.swap();
  Serial.print(Mess + "\n");
  Serial.flush();
  Serial.swap();
  Serial1.print(Mess + "\n");
  delay(1000);
}

Logic Analyzer is connected directly to the pins of a ESP8266 NodeMCU, no chips or logic.

Thanks.
Tim