Has anyone been successful with the Serial1 port at other than 9600?

I’m trying to interface to an RFID card from Parallax (TTL serial at 2400 baud). I’m reading strange data and about 4 times more than I would expect. Strangely changing the baud rate in the Serial1.begin(2400) doesn’t change the received data at all. Any ideas?

I have successfully tested up to 115200, but nothing below 9600. :-/

1 Like

I wrote a loop back test and set the port to 2400 and it passes, so whatever it is doing it consistent.

Let me play with it a bit more and I will try to figure something out.

1 Like

OK, I tried a few things:

  • I set my serial LCD display for 2400 baud and wrote to it. This worked fine.
  • I set my serial LCD back to 9600 baud while continuing to write it 2400 baud and it displayed garbage.
  • I wrote 1024 chars out the serial port and read them back in, timing it with a stop watch and the D7 LED. With the buffering and some code overhead, the overall rate should be close to but a little under 2400 baud or 240 chars per second (1 start, 8 data, 1 stop). I got 1024 chars in 4.68 to 4.78 seconds over several runs for a rate of 2188 to 2142 baud, so just about what I expected.

So I am not seeing big problems.

So looking at the doc for the Parallax RFID reader, it has a output enable pin that you drive low to enable the output. Hope that’s OK. The doc also mentions that noise can be a problem and that you should get two good readings before deciding you have detected a card.

1 Like

Thanks guys. i must be doing something stupid. time to pull out the oscilloscope. I appreciate the good work.

1 Like

I just had a few minutes in the lab but noticed there is a LARGE (3v pp) noise signal on the core’s Vin relative to Gnd when i run it from my HP laptop’s USB. Tomorrow I’ll try to isolate the source (laptop, core or RFID board), If someone has a scope handy, I’d appreciate a second opinion on the quality of the core’s Vcc.