Muliplexor for UARTs (Test Fixture) - Page 1
Forum section: electronics / projects

author: 741
author_rank: Frequent Contributor
timestamp: July 24, 2023, 02:27:28 pm
content: 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'.

author: CosteC
author_rank: Regular Contributor
timestamp: July 24, 2023, 02:37:40 pm
content: 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.

author: ajb
author_rank: Super Contributor
timestamp: July 24, 2023, 03:49:09 pm
content: 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 ananalogswitch 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:MCU1 TP MCU2Rx <--------o--- R --< TxTx >-- R ---o--------> RxThe 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.

author: Ian.M
author_rank: Super Contributor
timestamp: July 24, 2023, 03:55:14 pm
content: 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.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 25, 2023, 02:01:22 am
content: Quote from: 741 on July 24, 2023, 02:27:28 pmIs 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.

author: 741
author_rank: Frequent Contributor
timestamp: July 27, 2023, 08:48:44 pm
content: 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.