As in the title, Is it possible to use the CD4066 as level driver through RS232 and TTL(USART)? If it's possible how this work. Thanks.


The answer, once again, is "it depends".

Voltage levels

enter image description here

Figure 1. RS232 signal levels can be up to ±25 V. Source: 8051 projects.

  • RS232 signal levels are bi-polar.
  • Generally CMOS devices such as the CD4066 are used on single-ended supplies but the 4066 can be used on dual supplies of up to ±10 V but recommended limit is ±7.5 V and the switched signals would have to stay within that limit. You would be unfortunate to connect to a device that generated more than 7.5 V for switching but it could happen and the 4066 could be destroyed.
  • Switching the CD4066 in this configuration becomes awkward as the switching logic now has to switch between +7.5 and -7.5 V so logic level conversion is required.
  • The 4066 switches for the transmit signal would have to switch between +7.5 V and - 7.5 V to generate the transmitted signals.
  • The received signal would also have to be level shifted and inverted.

In short, you will have a very complex circuit requiring:

  • Voltage boost power supply for 'space' signal.
  • Negative voltage power supply for 'mark' signal.
  • Logic level conversion from TTL to RS232.
  • Withstand ±25 V on the RX pins.
  • Threshold discrimination (the ±3 V region in Figure 1).

Fortunately all these issues were solved by Maxim in 1987 when they brought out (you've guessed it) the MAX232. It's so good it is silly to consider any other way of doing it for true RS232 communication.

enter image description here

Figure 2. MAX232 pinout. Add four small capacitors for the voltage generators, a 5 V supply and you're done! Source: MAXIM


Firstly a MAX232 has both transmit and receive functions so a CD4066 won't work in any way as a receiver because the likely receive voltages it might see could be +/- 15V and this is way beyond the maximum power supply rating of 20V for this device.

As a transmitter it could work because, if you look at the MAX232 spec, it only generates typically +/- 7V on the RS232 transmit side. However, if someone misconnected the port wiring it could easily be destroyed if the receive wiring (potentially capable of +/-15V from some devices) were conencted to the output of the CD4066.

I'm not ruling out that some form of protection could be employed but it's all getting messy so, unless you have a convincing reason to use a CD4066 I would say "no".

  • \$\begingroup\$ I'll maybe use cd4066 just for protection. It max232 works as a form of protection to avoid PIC damage? \$\endgroup\$ – Brown Aug 5 '16 at 10:21
  • \$\begingroup\$ I don't understand your comment. \$\endgroup\$ – Andy aka Aug 5 '16 at 10:22
  • \$\begingroup\$ I'm using RS232(PC) to PIC24 microcontroller (USART), I read about max232 and cd4066 as drivers. but I was a little bit confuse. I just want to protect the pic to avoid damage in its USART port. Max232 may protect the pic from PC misconnect wires? \$\endgroup\$ – Brown Aug 5 '16 at 10:26
  • \$\begingroup\$ Yes, the MAX232 will protect the PIC providing the logic level interface is connected correctly to the PIC (by design). \$\endgroup\$ – Andy aka Aug 5 '16 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.