Hello everyone,
I am carrying out a communication project, with RS232 / RS485 and USB, we come to communicate with a micro controller to turn on relays. Programming level I have no problem, and the project works. I am going to print a PCB and I would like to check that everything is fine, secure, etc ...
Technical informations :
- The 3 interfaces (RS232 RS485 USB) are connected to the same TX and RX of the uC, because only one means of communication is used, the other 2 are not connected. It is only to be more flexible in terms of my equipment
- For RS232: only channel 1 is used, do I have to connect the pins of channel 2 of the chip to something or can I leave them floating?
- For the RS485, Is it well connected?
- For USB, an external power is used so I use the VUSB pin to force reset FT232RL
AVR side:
- I connected the TX pin of the uC to the RX pins of the interfaces via a resistor, I added a pull-up resistor, each interface will receive the info but as only one will be connected the others should not cause problems yes ?
- For the RX of the uC it is connected to an AND gate. On this AND gate I have 3 inputs, these are the TX pins of the interfaces, as soon as an interface has a low level it will be transmitted. I added a pull-up resistor on each TX of the interfaces, it is good ?
Precision :
- I absolutely must have everything on the same UART. So no "change uC ...." please !
- I am using an ATMega328pb