TTL, CMOS and RS232 each have different levels, and wrong joining burns parts or fails comms. This page gives the three ranges and how to interconnect.
TTL: output low under 0.4 V, high above 2.4 V, threshold about 1.4 V (low under 0.8, high above 2.0). 5 V CMOS: low under 0.1 VDD, high above 0.9 VDD, so under 0.5 and above 4.5. RS232 is negative logic serial: mark (1) is minus 3 to minus 15 V, space (0) is plus 3 to plus 15 V, a different world that needs a transceiver like MAX232.
TTL and 5 V CMOS can be joined (though TTL high 2.4 V barely meets CMOS VIH 3.5, so use HCT or pull up). 3.3 V CMOS to 5 V needs level shifting or the 5 V output exceeds the 3.3 V part rating. RS232 must never touch a MCU TTL serial directly; use a transceiver, and TTL cannot drive RS232 negative either. The common mistake burns the serial chip.
| Standard | Low | High |
|---|---|---|
| TTL | under 0.4 V | above 2.4 V |
| 5V CMOS | under 0.5 V | above 4.5 V |
| 3.3 CMOS | under 0.33 V | above 2.97 V |
| RS232 | +3 to +15 (0) | -3 to -15 (1) |
| Input th | TTL ~1.4 V | CMOS VDD/2 |
| Join | needs shift | no over V |
TTL high is above 2.4 V, 5 V CMOS above 4.5 V, RS232 is plus minus 3 to 15 V negative logic. TTL and 5 V CMOS nearly connect but the high is marginal so pull up or use HCT; 3.3 V to 5 V needs shifting; RS232 absolutely needs a transceiver and never direct MCU serial.
The quantities and component characteristics discussed here follow current national standards and the corresponding IEC documents: Interface levels per GB/T 4728; serial to IEC 60204-1 and GB/T 5226.1. Always check the device datasheet and the product design file for ratings and derating.
Locate the issue with the approach above, then confirm with measurements; safety-related circuits must follow the standards and manufacturer requirements.