Hi
I'd like to build a device wit Arduino that reads data from a serial TomTom GPS and, managing string, displays some informations on a LCD.
As a first step I've tried to connect Arduino an the GPS device in order to see if the strings where read correctly. The GPS display sends strings at 4800 baud and I've tested it with a pc and a serial connection and everything was ok. When I've connected it to Arduino I've put this circuit between the gps and the arduino:

My idea to check the data strings was to read from the device and to send it to the "serial monitor" and I've used this code:
#include <SoftwareSerial.h>
#define rxPin 2
#define txPin 3
#define ledPin 13
// set up a new serial port
SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
byte pinState = 0;
void setup() {
// define pin modes for tx, rx, led pins:
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
pinMode(ledPin, OUTPUT);
// set the data rate for the SoftwareSerial port
mySerial.begin(4800);
Serial.begin(9600);
}
void loop() {
// listen for new serial coming in:
char someChar = mySerial.read();
// print out the character:
mySerial.print(someChar);
Serial.print(someChar);
// toggle an LED just so you see the thing's alive.
// this LED will go on with every OTHER character received:
toggle(13);
}
void toggle(int pinNum) {
// set the LED pin using the pinState variable:
digitalWrite(pinNum, pinState);
// if pinState = 0, set it to 1, and vice versa:
pinState = !pinState;
}
some data arrives to the monitor, but caracters are "strange"!!
Where am I wrong?
Thanks in advance!
Alex