is software serial working?

I saw some writing about software serial not being completely working. Can someone please help me out:

I’ve got this code which uses hardware serial that works just fine (it writes to a VDIP1 usb device) (the code is btw based on this sample code http://www.arduino.cc/playground/Main/UsbMemory ) :

int incomingByte=0;
int fileNumber=1;
int noOfChars;
long int valToWrite;
char activityToLog;
long int x;
long int startLogTime = 0;
void setup() {
      Serial.begin(9600);                    // opens serial port, sets data rate to 9600 bps
        Serial.print("IPA");                  // sets the vdip to use ascii numbers (so I can read them in the code easily!)
        Serial.print(13, BYTE);               // return character to tell vdip its end of message
        delay(10000);  //60 seconds to init the disk before writing

}

void loop() {


  Serial.print("OPW LOG");                  // open to write creates a file - named
  Serial.print(fileNumber);                  // LOG%1.TXT first time round - .TXT is for the computer
  Serial.print(".TXT");                      // I have used the % sign in the name so I can search the disk for log files that it has created so as not to overwrite any that may be on already
  Serial.print(13, BYTE);                    // return character

  delay(1000);
  
 Serial.print("WRF ");               //write to file (file needs to have been opened to write first)
 Serial.print(6);            //needs to then be told how many characters will be written
 Serial.print(13, BYTE);             //return to say command is finished
 Serial.print("123456");        //followed by the info to write
 Serial.print(13, BYTE);             //write a return to the contents of the file (so each entry appears on a new line)
 delay(1000);
  Serial.print("CLF LOG");     // it closes the file
  Serial.print(fileNumber);     // LOG%1.TXT
  Serial.print(".TXT");
  Serial.print(13, BYTE);       // return character

  fileNumber++;                                    //so we can create other files
  
  delay(10000);

}

However, when I translate this to software serial I get nothing written to the memory stick:

#include <SoftwareSerial.h>

int incomingByte=0;
int fileNumber=1;
int noOfChars;
long int valToWrite;
char activityToLog;
long int x;
long int startLogTime = 0;

#define rxPin 2
#define txPin 3

SoftwareSerial vSerial = SoftwareSerial(rxPin, txPin);

void setup() {
  
  
      vSerial.begin(9600);                    // opens serial port, sets data rate to 9600 bps
        vSerial.print("IPA");                  // sets the vdip to use ascii numbers (so I can read them in the code easily!)
        vSerial.print(13, BYTE);               // return character to tell vdip its end of message
        delay(10000);  //10 seconds to init the disk before writing (some disks may take longer)

}

void loop() {


  vSerial.print("OPW LOG");                  // open to write creates a file - named
  vSerial.print(fileNumber);                  // LOG%1.TXT first time round - .TXT is for the computer
  vSerial.print(".TXT");                      // I have used the % sign in the name so I can search the disk for log files that it has created so as not to overwrite any that may be on already
  vSerial.print(13, BYTE);                    // return character

  delay(1000);
  
 vSerial.print("WRF ");               //write to file (file needs to have been opened to write first)
 vSerial.print(6);            //needs to then be told how many characters will be written
 vSerial.print(13, BYTE);             //return to say command is finished
 vSerial.print("123456");        //followed by the info to write
 vSerial.print(13, BYTE);             //write a return to the contents of the file (so each entry appears on a new line)
 delay(1000);
  vSerial.print("CLF LOG");     // it closes the file
  vSerial.print(fileNumber);     // LOG%1.TXT
  vSerial.print(".TXT");
  vSerial.print(13, BYTE);       // return character

  fileNumber++;                                    //so we can create other files
  
  delay(10000);

}

I have also noticed that when sending text to a serial LCD via SoftwareSerial it will send only the first couple of characters and then stop? Is there something I’m missing, perhaps a nuance of software serial that I need to account for?

I remember getting softserial working in arduino 007 or something but it had a bug printing a certain character (“8” IIRC) and it required a quick little fix.

Thanks in advance.

Solved: I used LadyAda's AFSoftSerial Lib and everything works awesomely. I guess the problem was compatibility with the newer chip on the arduino decimila.

for posterity: http://www.ladyada.net/make/eshield/AFSoftSerial.zip

Hi

Would you mind explaining how you physically connected the VDIP to the Arduino, as I am really confused.

Which pins on the VDIP do you connect to which pins on the Arduino (I know this varies with software serial but i can't get hardware serial working either)?

Do you need to set the jumper switches?

Many thanks, Mathew