Author Topic: Muliplexor for UARTs (Test Fixture)  (Read 585 times)

0 Members and 1 Guest are viewing this topic.

Offline 741Topic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: gb
    • Circuit & PCB Design (small PCB quantities OK)
Muliplexor for UARTs (Test Fixture)
« on: July 24, 2023, 02:27:28 pm »
I'm working on some test gear, and one requiremnent is to 'cut-in' a PC-driven UART between a pair of on-PCB micro-controllers.

The idea is the PC simulates the UART on one of the uC - and thus creates a a way to test the 'other' uC. I don't know for sure what maximum baud, let's say something slow like 9600 for now.

In terms of signal integrity, is there a reason not to use a 4053 or similar? I don't see much issue with say 300 Ohms or so switch resistance for example.

I'd use one channel for Tx, one for Rx and the test-jig would force the state on pulled-down control pins A, B to logic '1'.

Offline CosteC

  • Regular Contributor
  • *
  • Posts: 201
  • Country: pl
Re: Muliplexor for UARTs (Test Fixture)
« Reply #1 on: July 24, 2023, 02:37:40 pm »
If it is "functional test" so on separate fixture, and speeds are low, you may even use small relay. Even less intrusion into tested circuit. Also easy to move from TEST and NORMAL cases.

CMOS multiplexers shall work, but are more delicate and require power - more tricky solution in practice.

Production test (on every unit) is different and complicated story.
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: us
Re: Muliplexor for UARTs (Test Fixture)
« Reply #2 on: July 24, 2023, 03:49:09 pm »
To be clear, you're looking for a solution for how to intercept a UART connection internal to the DUT?

Another option, since you don't really need an analog switch here: a 3-input configurable logic gates configured as a 2-to-1 digital mux (eg 74LVC1G97).  May or may not be cheaper, but does preserve drive strength in the event you need it, and they're very useful parts in general. 

But the simples solution would be to just put test points directly on the link, with series resistors between each Tx pin and the test points.  Like:

Code: [Select]
MCU1        TP       MCU2
Rx <--------o--- R --< Tx
Tx >-- R ---o--------> Rx

The series R allows the test fixture to override the Tx line of the corresponding MCU.  This relies on there being a value of R that limits current (and power consumption) to an acceptable level without destroying your signal integrity.  That's probably not a big deal for a modern MCU and any common UART data rate. 
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13119
Re: Muliplexor for UARTs (Test Fixture)
« Reply #3 on: July 24, 2023, 03:55:14 pm »
Can you hold the MCU you are taking over from in Reset while testing the other one, and if so, does the MCU tristate its I/O pins when held in reset?  If so, you don't need any mux or gating logic on the PCB in-between (or even any resistors as Ajb suggests, though they'd be a cheap nice addition to guarantee no dangerous bus conflicts even if the test jig malfunctions), as the test jig's PC hosted UART can simply T into the RX and TX signals.  If the PC hosted UART can also tristate its TX pin, you can switch between both MCUs running and PC replacing one of them, under control of your test script. 
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1878
  • Country: au
Re: Muliplexor for UARTs (Test Fixture)
« Reply #4 on: July 25, 2023, 02:01:22 am »
In terms of signal integrity, is there a reason not to use a 4053 or similar? I don't see much issue with say 300 Ohms or so switch resistance for example.
Is this a true RS-232 signal ?
True RS-232 can swing +/- 15V, so you may want to check that.
A clamped 4053 could work, to pass +/- 7.5V signals.
 

Offline 741Topic starter

  • Frequent Contributor
  • **
  • Posts: 402
  • Country: gb
    • Circuit & PCB Design (small PCB quantities OK)
Re: Muliplexor for UARTs (Test Fixture)
« Reply #5 on: July 27, 2023, 08:48:44 pm »
Thanks to everyone for the replies. First, I'd never thought of using a "digital multiplexer" and that sounds interesting.

The series R could also be a solution maybe. One issue with that though is we might want to disable/cut 'Rx' on  the processor being 'mimicked' by our test jig. Depends on what the code does.

That is: Yes we can override the output of the 'disconnected' chip, but I suspect I have to prevent any incoming comms also.

I think the idea is the system being tested must run its standard code and can't incorporate debugging code. I assume there must be known quiet states or something that avoids half a frame being lost - not sure yet.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf