TTL logic is what the Arduino is putting out on the pins (0-5 volts) so that part should be easy. I haven't the funds yet to buy a second serial LCD yet so I haven't had the chance to play with two "output" devices. My the code I'm working on for a bike computer is using an RFID input and a serial LCD output so I'm posting the code so you can get an idea of how to start working with multiple serial ports.
I have a Seeeduino BT shield so that will explain the use of D8/D9 for the RFID.
This is still a work in progress.
/*
This is going to be my PeddleCart computer with:
RFID reader
* to allow certain "tag" holders to operate
* maybe speed control
Serial LCD
* display GPS info and other data
Bluetooth module
* to work as the RFID reader but to detect my phone
to allow opration
=================
to RFID reader working
Vcc to 5vdc
/Enable to D8
SOUT to D9
Gnd to GND
=================
to Serial LCD working
Vcc to 5vdc
Gnd to GND
Rx to D7
*/
#include <SoftwareSerial.h>
int val = 0; // RFID
char code[10]; // RFID
int bytesread = 0; // RFID
int loc = 0; // SLCD
#define rxRFID 9 // RFID data to Arduino
#define txRFID 255 // RFID (not needed)
#define enRFID 8 // RFID Enable from Arduino
#define rxSLCD 255 // SLCD (not needed)
#define txSLCD 7 // SLCD data from Arduino
String symDegree, symRArrow, symLArrow, beep, RFIDready;
SoftwareSerial RFID = SoftwareSerial(rxRFID,txRFID);
SoftwareSerial SLCD = SoftwareSerial(rxSLCD,txSLCD);
void setup()
{
pinMode(enRFID,OUTPUT);
pinMode(txSLCD,OUTPUT);
digitalWrite(enRFID, LOW);
digitalWrite(txSLCD, HIGH);
Serial.begin(9600); // output to computer
SLCD.begin(2400); // output to LCD
RFID.begin(2400); // the port being "Listen" to is started last
GPS.begin(4800); // (yea, how am I gonna work this?)
char symUnd_0_[9] = {248, 0, 0, 0, 0, 0, 0, 0, 0}; // defined char 0
char symDegree[9] = {249, 12, 18, 18, 12, 32, 32, 32, 32}; // defined char 1
char symRArrow[9] = {250, 16, 24, 28, 30, 28, 24, 16, 32}; // defined char 2
char symLArrow[9] = {251, 1, 3, 7, 15, 7, 3, 1, 32}; // defined char 3
char symUnd_4_[9] = {252, 12, 18, 18, 12, 32, 32, 32, 32}; // defined char 4
char symUnd_5_[9] = {253, 16, 24, 28, 30, 28, 24, 16, 32}; // defined char 5
char symUnd_6_[9] = {254, 1, 3, 7, 15, 7, 3, 1, 32}; // defined char 6
char symUnd_7_[9] = {255, 12, 18, 18, 12, 32, 32, 32, 32}; // defined char 7
char beep[3] = {209, 219, 220}; // short beep sound
RFIDready = "Ready to start";
SLCD.write(symDegree); // upload defined char(1) to the LCD
SLCD.write(symRArrow); // upload defined char(2) to the LCD
SLCD.write(symLArrow); // upload defined char(3) to the LCD
SLCD.write(12); // clear screen
SLCD.write(22); // disp on/curs off/blnk off
/*
SLCD.write(2);
SLCD.print(" It is 85");
SLCD.write(1); // hopefully a degree symbol
SLCD.write(3);
SLCD.write(209); // 1/32 note
SLCD.write(219); // 7th octave
SLCD.write(220); // A tone
*/
SLCD.print(beep);
SLCD.println(RFIDready);
delay(3000); // Wait 3 seconds
SLCD.write(12);
}
void loop()
{
//SLCD.write(128);
//SLCD.print("Reading...");
if((val = RFID.read()) == 10) // check for header
{
bytesread = 0;
while(bytesread<10)
{ // read 10 digit code
val = RFID.read();
loc = 148 + bytesread;
SLCD.write(loc);
SLCD.print(val);
if((val == 10)||(val == 13))
{ // if header or stop bytes before the 10 digit reading
break; // stop reading
SLCD.print("...error...");
}
code[bytesread] = val; // add the digit
bytesread++; // ready to read next digit
}
if(bytesread == 10)
{ // if 10 digit read is complete
Serial.println("TAG code is: "); // possibly a good TAG
//SLCD.println("TAG code is: "); // possibly a good TAG
Serial.println(code); // print the TAG code
SLCD.write(148); // print@ line 2 char 1
SLCD.print(code); // possibly a good TAG
SLCD.print(beep);
}
bytesread = 0;
delay(1000); // wait for a second
}
}