Wiring Forum
Wiring Hardware >> Tangible computing >> Dual serial problem

Message started by barmak on 04/16/07 at 03:38:36

Title: Dual serial problem
Post by barmak on 04/16/07 at 03:38:36
Hi I was trying to connect the serial from my PC (COM1) to the Serial1 (pins 2 and 3) of the wiring board. And after receiving any char typed at COM1 sending it back again to the PC trough the wiring USB. But somehow I can't see the typed chars... Why?

The same happens when i connect my GPS to the Serial1 and try to send it back through serial0, it's looks like baud-rate problem...???

Can it be logic levels problems? Something like trying to read TTL but actually reading RS-232?

This is the code I wrote:

int val;

void setup() {
Serial1.begin(1200); // RFID reader SOUT pin connected to Serial1 RX pin at 2400bps
Serial.begin(9600);  // Serial set to 9600

void loop() {
 if(Serial1.available() > 0) {          // if data available from reader
   val = Serial1.read();
   Serial.print(val, BYTE);   // possibly a good TAG
   Serial.print(" * ");

Thank you

Title: Re: Dual serial problem
Post by barragan on 04/19/07 at 21:00:34
hi, have you checked this? http://wiring.org.co/learning/examples/rfid_reading.html
could you post a diagram of what you're doing?

Wiring Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.