Hi, I'm trying to implement bit-banged serial interface (TX, RTS, DTR) using a CP2102 chip and I'm experiencing a problem related to setting/clearing the break on the TX line using either SetCommBreak/ClearCommBreak or EscapeCommFunction(hCom, SETBREAK)/EscapeCommFunction(hCom, CLRBREAK) function. The error I get is always: ERROR_GEN_FAILURE, 31 (0x1F), A device attached to the system is not functioning. Other signals (i.e. RTS, DTR) can be set and cleared normally. My machine is running Windows7/x64. I am using the CP210X VCP Driver version 18.104.22.1681. What am I missing? Test C code, compiled in Visual Studio 2010, is in attachment. Br, Matej
Why are you trying to bit bang a serial interface, instead of using the built in UART the device provides? If you are interested in more than one UART port, consider the CP2105 or CP2108.