As I read elsewhere on this forum or maybe on some other forums, it seems that the RX pin for Serial0 cannot be used because it is used by the ATmega for the USB-to-serial adapter. So I thought why would it work for the Uno and Mega, but not for the Due.
I first checked the difference in the schematics. As one can see (mega.png), for the Mega, the RX and TX pins are connected directly (through resistors) to the main chip, but for the Due (due.png) a Bus-line driver is used to control the RX line and no resistors are used. As I can understand this is necessary because the Dues uses 3.3V and the Atmega 5V, so this acts as a level translator.
Now, looking at the truth table of how a bus driver works (table.png), it seems that the High-Z state is obtained when #OE is HIGH. Because in the schematic the Input and #OE are tied together, one can deduce that the output can be either LOW or High-Z, but never HIGH.
So I used an oscilloscope to see myself if that is true, but surprisingly, when idle, the line is held HIGH. When I tried to connect a TX signal from my PC to the RX line, the line stays always HIGH as if it is directly connected to 3.3V.
My questions are:
- How that the line can be HIGH and not High-Z? Why is the line held HIGH and cannot be used for external communication?
- Can I fix it by adding a resistor somewhere in between the output of the buffer and the RX pin of the main chip? I think I can cut the trace and add a resistor here (resistor.png)
Hope we can get to the bottom of this!
PS: I know I can use other serials and don’t bother with this, but I have a specific application that needs Serial0 and It is weird why it wouldn’t work.