Shop OBEX P1 Docs P2 Docs Learn Events
RFID - sharing I/O pins? — Parallax Forums

RFID - sharing I/O pins?

xanatosxanatos Posts: 1,120
edited 2012-03-14 15:38 in General Discussion
Just wondering... If I need four RFID modules running in a project, that will be read at random but non-simultaneous times, can they share I/O lines?

Thanks,

Dave

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-01-12 20:09
    Each RFID reader has to have its own /Enable line. The data line can be shared. You could save a pin by using a 1 to 4 selector that takes one out of four lines low with a two select bits and an /enable line.
  • SRLMSRLM Posts: 5,045
    edited 2012-01-12 20:27
    Mike Green wrote: »
    Each RFID reader has to have its own /Enable line. The data line can be shared. You could save a pin by using a 1 to 4 selector that takes one out of four lines low with a two select bits and an /enable line.

    Couldn't you save two if you were ok with one reader being always on? You can gate type decoder such as the one below to control the enable lines. And for one more pin you can have 8 readers.

    wiki image
  • Mike GreenMike Green Posts: 23,101
    edited 2012-01-12 20:39
    SRLM,
    The kind of device I was suggesting is similar to what you showed except that 3 of the 4 lines are high (rather than low) and the 4th line is connected to the /enable line using 2 bits (a0 and a1) to select which line to connect to the /enable line. It's called a decoder rather than a selector and the 74HC139 is a dual version of it.
  • xanatosxanatos Posts: 1,120
    edited 2012-01-13 17:12
    This is helpful, thanks. Looks like I will still need to scrimp on pins from another place. As usual, I need to control and monitor an entire small country with only 16 pins! :-)

    Thanks,

    Dave
  • nicorosennicorosen Posts: 3
    edited 2012-03-13 05:58
    Hi, I read what you have post, and I though that would work fine but couldn't get the modules to transmit the serial data.

    I've bought four RFID Readers Modules (#28140) and I'm trying to use them all in the same circuit, but one at time, by multiplexing the |CE (Chip Enable) of each module and parallel wiring of the Serial Output of all the modules into the same TX bus.
    Everything works well with one module on the TX bus. As soon as I place the second module in the same TX bus, I can't get the serial transmission with the microprocessor.
    Have you got any idea on how to wire 4 modules, to be controlled by 1 microprocessor with only 1 uart?
    I'm attaching an image of the schematic.
    Waitin anxiously for your help.

    Best regards,

    Nicolas Rosencovich

    RF_Modules.jpg

    1024 x 547 - 79K
  • Mike GreenMike Green Posts: 23,101
    edited 2012-03-13 07:46
    You can't multiplex the RFID reader the way you've shown it. The serial outputs idle at logic 1 (Vcc) and the Schottky diode gate you've shown does an OR operation. You need an AND operation. The diodes need to be reversed and you need a pull-up resistor to Vcc on the common side (PIC_TX). You want a 1 output from that gate whenever all the inputs are a 1 and a 0 output whenever any one or more inputs are a 0.
  • nicorosennicorosen Posts: 3
    edited 2012-03-13 16:14
    Mike, thanks a lot for your help!!! I understood exactly what you suggested and I'm going to do these changes to see if the communication problem is solved.
    By the way, could you suggest which reverse diode to use and which value of pull up resistor would be better?
    Again, I'm very grateful for your explicative and fast response.
  • nicorosennicorosen Posts: 3
    edited 2012-03-14 15:38
    Mike, works great! thnxx a lot!
Sign In or Register to comment.