14x rs232

Hi there,

I'm new to this forum! :) loads of information over here!! :D:D

but I'm wondering if anyone has got experience with multiple rs232 on an Arduino.

The devices are RFID readers which only TX, one way communication.

So I've got 14 readers which communicate at 2400 baud and i want to connect it to an Arduino.

Could anyone help me 8-)

KR Martijn

You might be able to use NewSoftSerial to communicate with each one, using a different RX pin. Use 255 for the TX pin, since NewSoftSerial will never write to it, anyway.

Then, in each pass through loop, activate and check each instance.

The problem with this is that each reader would be active for only 1/14 of the total time.

I don't think software serial will cope with that. As there is no serialAvailable on the software serial. see:- http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274419796

There are two options:-

1) Use extra UART hardware attached to the I2C bus. This is one http://ics.nxp.com/products/bridges/uart.i2c.master.gpio/

2) As RFID cards don't output stuff all the time arrange a multiplexer on the front end, scan this constantly. When a logic zero is detected, switch to that input until a valid card is read. This requires the sort of reader that repeats the card code while it is in the field, not one of the one shot types.

Third alternative is to use an RFID reader with a Wiegand output, it's a lot easer to read those with an ISR.

Otherwise it is a matter of getting as many hardware UARTS into the picture as possible. The arduino mega has four so you need four of them, then you can get them to communicate through I2C, make one a master and the other three slaves.

i2c is indeed a good idea, but do these UART's have an interrupt? or do i need to poll constantly?

KG Martijn

Not sure look in the data sheet. I do remember they have a buffer so you won't get data over runs anyway.