I made a prototype circuit of what I'm trying to achieve with the mechanical slide switch. I found a MUX/DEMUX analog switch used for switching between 2 USB(D+,D-) ports. I did some search and found these analog switches but don't know how to make a circuit with a mechanical switch so that I can change from one serial port to another. Whenever I send data via its serial header pins it doesnt receive anything because it is already connected to the CP2104 serial port, and I dont wat to use softwareserial since it is not reliable for WiFi applications. The MCU is an ESP8266, which has only one serial port. The 5V Arduino will read 3.3v as HIGH so you can connect the ESP8266 TX pin directly to the Arduino RX pin. You only need the voltage divider on the Arduino TX pin. To summarize, the user would select between USB serial or header pin serial. Arduino pin 3 to voltage divider and then to ESP8266 RX Arduino pin 2 to ESP8266 TX Arduino GND to ESP8266 GND Pull CHPD HIGH with a 10K resistor to +3.3v +3.3V to vcc. I want to be able to switch between these 2 ports with some kind of analog switch/multiplexer and a mechanical switch but I cannot find a way to implement it. I'm working on a device that is connected to 2 serial ports (both TX and RX).The first serial port is connected to a CP2104 USB chip, the second serial port is left open with TX,RX,GND,3V pins.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |