SoftwareSerial with Aurduino1.0

Hi,
with Arduino 022 and NewSoftSerial my GPS-programm works perfect

NewSoftSerial GPS (2,0);   // Pin 2  Eingang vom GPS TX-1
NewSoftSerial LCD (0,3);   // Pin 3  Ausgang zu SerLCD RX

void setup()  
{
  Serial.begin(57600);
  
  GPS.begin(4800);  //Set data rate for GPS-Receiver
  LCD.begin(9600);  //Set data rate for LCD  
  delay(100);

With Arduino 1.0 and SoftwareSerial my GPS-program
and also the Serial.print dosn't work.

SoftwareSerial GPS (2,0); // Pin 2  Eingang vom GPS TX-1
SoftwareSerial LCD (0,3); // Pin 3  Ausgang zu SerLCD RX

void setup()  
{
  Serial.begin(57600);
  
  GPS.begin(4800);  //Set data rate from GPS Receiver
  LCD.begin(9600);  //Set  data rate for SerLCD  
  delay(100);

If I turn off //LCD.begin(9600); the program and Serial.print works
but not the LCD.
What is the reason and what I have to do?
Willy

I looked at the sources and it looks like SoftwareSerial does NOT support single-sided serial ports. That means both of your SoftwareSerial ports are trying to use Pin 0!. No wonder your serial communication isn't working.

If you can spare the pins I recommend assigning a dummy pin for the side of the serial port you don't need:

NewSoftSerial GPS (2,4);   // Pin 2  Eingang vom GPS TX-1
NewSoftSerial LCD (5,3);   // Pin 3  Ausgang zu SerLCD RX

Something that MIGHT work is to use a non-existant pin number:

NewSoftSerial GPS (2,-1);   // Pin 2  Eingang vom GPS TX-1
NewSoftSerial LCD (-1,3);   // Pin 3  Ausgang zu SerLCD RX

Thank you for your suggestions. Unfortunately, both variants gives no change.
The new SoftwareSerial was supposed to replace NewSoftSerial.
I read by Mikal Hart
Willy

News: NewSoftSerial is in the core! Starting with Arduino 1.0 (December, 2011), NewSoftSerial has replaced the old SoftwareSerial library as the officially supported software serial library. This means that if you have 1.0 or later, you should not download this library. To port your code to 1.0, simply change all NewSoftSerial references to SoftwareSerial.

I looked at the sources and SoftwareSerial.cpp is nearly identical to NewSoftSerial.cpp. The main difference I found is that NewSoftSerial() contains these macros:

// Abstractions for maximum portability between processors
// These are macros to associate pins to pin change interrupts
#if !defined(digitalPinToPCICR) // Courtesy Paul Stoffregen
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__)
#define digitalPinToPCICR(p)    (((p) >= 0 && (p) <= 21) ? (&PCICR) : ((uint8_t *)NULL))
#define digitalPinToPCICRbit(p) (((p) <= 7) ? 2 : (((p) <= 13) ? 0 : 1))
#define digitalPinToPCMSK(p)    (((p) <= 7) ? (&PCMSK2) : (((p) <= 13) ? (&PCMSK0) : (((p) <= 21) ? (&PCMSK1) : ((uint8_t *)NULL))))
#define digitalPinToPCMSKbit(p) (((p) <= 7) ? (p) : (((p) <= 13) ? ((p) - 8) : ((p) - 14)))
#else
#define digitalPinToPCICR(p)    ((uint8_t *)NULL)
#define digitalPinToPCICRbit(p) 0
#define digitalPinToPCMSK(p)    ((uint8_t *)NULL)
#define digitalPinToPCMSKbit(p) 0
#endif
#endif

I don't know if or how that might cause the symptom you are seeing.

Another difference is that the .activate() method has changed name to .listen(). It switches which software serial port is currently looking for input (I guess you can't have more than one enabled at a time). A call to .read() or .available() will make that port active, but will return immediately if the port wasn't already active. If you alternate between calling .available() on two different software ports you will never see data. :frowning:

Thank you for your support. I could solve the problem using serLCD. This works without LCD.begin (9600);
Willy XD XD XD