So I plugged the 5V to 5V and the gnd to gnd and the TTL out to my arduino uno pin3.
I user the software serial library and im reading in the data, but the data comes in as random junk.
What format do I get the data in. I thought it comes in as BYTE.
I tried a baud rate of 9600 and 4800 on my software serial library that reading in data.
So this is what i used. Serial.print(mySerial.read(), BYTE)
char c = (char)mySerial.read();
what must I wrote to get the proper format. Sorry this must be really dumb question. But I tried alot of things.
Further, (Serial.print(mySerial.read(), BYTE))I dont know why but my arduino 1.0 IDE does not support this so I used the arduino 0022 IDE and it recognises that.
// set up a new serial port
SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
void setup() {
// define pin modes for tx, rx, led pins:
pinMode(rxPin, INPUT);
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
Serial.begin(9600);
}
void loop()
{
if(mySerial.available() > 0)
{
Serial.write(mySerial.read());
}
}
I tried setting baus rate of mySerial to 4800 and 9600 for the the combination on my Serial 4800 9600 57600 115200. I also changed the baud rate on the monitor to the appropriate Serial baud rate. For each I get similar output like the one above. For each I get junk.
So I plugged the 5V to 5V and the gnd to gnd and the TTL out to my arduino uno pin3.
That link say the TTL output is only produced if you set an optional link, have you done this as well. Otherwise you are trying to read RS232 signals and they are inverted and +12V and -12V
That link say the TTL output is only produced if you set an optional link, have you done this as well. Otherwise you are trying to read RS232 signals and they are inverted and +12V and -12V
optional link? No I have not. Didnt know I had to do that.
The only way to be sure is to measure it, preferably with an oscilloscope. The signal should be normally high at 5V and go down to 0V when data is being transmitted. You could test this with an LED if you are careful but a scope is the best.
From the look of what you are getting you have an upside down signal.