PICSimLab Serial Port Not Working? Virtual Pair and 8N1 Fixes
Your simulated UART is silent: the terminal window shows nothing, or shows garbage, or the port will not open at all. In PICSimLab this is rarely a firmware bug. The desktop simulator’s serial port does not connect to a real COM port by itself — it needs a piece of operating-system setup first, and three settings after that. This page covers all of them.
Symptoms
- The serial terminal stays empty even though the program is running and should be transmitting.
- Received text is garbled or framed wrong.
- Your terminal program cannot open the port, or PICSimLab cannot open its end.
- Serial works with PICSimLab’s built-in virtual terminal but not with your external terminal program (or the other way round).
Why it happens
The virtual port pair is missing. Per the official documentation, desktop serial simulation in PICSimLab requires a NULL-MODEM virtual serial port pair: on Windows that pair is created by com0com, on Linux by tty0tty (which creates linked devices such as /dev/tnt2 <=> /dev/tnt3). PICSimLab opens one end of the pair and your terminal opens the other. Without the pair installed, there is simply nothing for either side to connect to — this is the single most common cause.
Both programs are on the same end. A pair only works when the two programs sit on opposite ends. Two programs on the same end hear nothing (and usually one of them fails to open the port at all, because a port end can only be opened once).
Format or baud mismatch. The link format is 8N1 (8 data bits, no parity, 1 stop bit), and the baud rate in the terminal must equal the baud rate the firmware was written for. A wrong baud rate is the classic cause of garbled text.
IO UART vs IO Virtual term confusion. PICSimLab has two different serial-related spare parts. The IO UART part (in the Others category of Modules → Spare parts) bridges the microcontroller’s UART to a serial port — this is the one that needs the virtual pair above. The IO Virtual term part (in the Virtual category) is a terminal that lives entirely inside the simulation: it needs no operating-system port at all, but it also cannot talk to external programs. Expecting the external path from the virtual terminal — or a virtual-pair setup from the built-in terminal — produces exactly the “nothing arrives” symptom. Note also that the official online version has no serial communication support at all (only the IO Vterm), so an external-terminal setup can never work there; use the desktop version.
Fix
- Install the pair driver. Windows: install com0com and create a dedicated pair (for example COM10/COM11). Linux: install tty0tty and note the pair it creates (for example
/dev/tnt2 <=> /dev/tnt3). Our virtual serial ports guide walks through both setups. - Put the programs on opposite ends. Configure PICSimLab’s serial port to one end (say COM10 or
/dev/tnt2) and open the other end (COM11 or/dev/tnt3) in your terminal. - Match the settings. Set the terminal to 8N1 and the exact baud rate your firmware uses. If text arrives garbled, the baud rate is wrong — this symptom is diagnostic, not random.
- Make sure the firmware really transmits. The simulation must be running, the loaded
.hexmust actually initialise and use the UART, and the UART pins must reach the serial connection on the selected board. A minimal known-good reference is our PIC16F877A UART tutorial, which runs at 9600 8N1. - On Linux, check device permissions. If opening
/dev/tnt*fails with a permission error, your user account is not allowed to read/write those device files. Fix the tty device permissions or group membership for your account first (logging out and back in after a group change), then retry — this is a general Linux serial-device rule, not a PICSimLab setting. - Or simplify: use the virtual terminal. If you only need to see what the firmware sends, add the IO Virtual term spare part instead of the IO UART part and skip the OS-level setup entirely.
Still stuck?
Re-check the setup end-to-end against the virtual serial ports guide and the worked example in the PIC16F877A UART tutorial. If a correct pair at matching 8N1 settings still passes nothing with the tutorial firmware on the desktop version, report it — operating system, pair driver, board and baud rate included — on the project’s tracker: github.com/lcgamboa/picsimlab/issues.
