1

I would like to use UART communication to synchronize the clocks of two microcontrollers of different manufacturers. How can I relay outputs from one microcontroller to the other, as input? (Windows 10)

Are there specific programs I should use? Currently both microcontrollers can communicate with their own Putty terminals, but I would like to let them communicate with each other as well.

Kodiak
  • 77
  • 1
  • 7
  • You might want to wire the two microcontrollers up with a rs232 cable. The Tx of the first microcontroller should be connected with the Rx of the second microcontroller and vice versa. – B.Letz May 29 '19 at 12:42
  • It's not easy to infer what you're trying to do here but if you have both micros connected to your Windows 10 PC you might want to try Termite to do port forwarding, see here: https://www.compuphase.com/software_termite.htm – Marcos G. May 29 '19 at 14:46
  • @B.Letz unfortunately the microcontrollers only have micro USB ports. – Kodiak May 29 '19 at 15:20
  • @MarcosG. My apologies for any unclarity. Currently I have two sets of microcontrollers, both can communicate with my serial terminal (PuTTY). However, what I would like to accomplish, is that one set of micro controllers its UART serial output, acts as input for the other set. So serial terminal out -> serial terminal in. – Kodiak May 29 '19 at 15:22
  • no need to apologize. Just to be clear: you have two microcontrollers connected to your computer (Windows 10) each on a USB port. On your computer you see two virtual serial ports (COMxx, COMxy) and you can open two instances of PuTTY and communicate with both, but what you want to do is forward the output of one micro to the input of the other. Is that correct? – Marcos G. May 29 '19 at 15:46
  • @MarcosG. Yes! That is exactly what I would like to accomplish. – Kodiak May 30 '19 at 09:30

1 Answers1

0

Your goal here is, once you have both microcontrollers connected to your Windows 10 PC and communicating correctly, forward data from one of them to the other through your computer (in a kind of man-in-the-middle or sniffer arrangement).

You can accomplish that easily with Termite, following these steps:

-Download and install Termite from here: https://www.compuphase.com/software/termite-3.4.exe

-Open two instances of the software and go to "Settings" and make sure the parameters of your serial ports are correct (baud rate, data bits, stop bits)

-On one of the ports, in the same settings dialog box choose the other port under the option "Forwarding"

-Click on the bottom with the port parameters on each instance of Termite to open the port and establish the forwarding link

Quoting from Termite's manual:

With forwarding set up, all data received on the primary port is transmitted through the forward port. All data received on the forward port is transmitted through the primary port. The "sent/received colouring" of Termite is also still in effect: data received on the primary port is in green and data received on the secondary port is in blue.

In this configuration, Termite would typically only be used to monitor the communication between two devices. If you type in text on the edit line and transmit it, this text is only sent through the primary port.

EDIT: I made a quick test of the setup above and I realized there is actually no need to open two instances of Termite. You just have to setup one of the ports and select the other as the forwarding output.

I tested sending text from a serial port on a SBC (minicom Linux window in the screenshot), receiving on COM4 and forwarding to COM5 on a Windows 7 VM. The characters are indeed forwarded to COM5 (scope picture). So the chain is as follows:

SBC Serial (minicom)--->Termite COM4--->Termite COM5--->Oscilloscope

This can be indeed used a very simple serial port sniffer.

Serial Port Forwarding Test Scope Capture Serial Output

Marcos G.
  • 3,371
  • 2
  • 8
  • 16