- Sun Mar 20, 2016 9:48 am
#43628
AdrianM wrote:eriksl wrote:All inputs are clear, no internal pull-ups. I know that because I write the firmware myself
I don't like the internal pull-ups because:
- they're not real pull-ups, they're current sources (see explanation from a.o. ATmel in their docs)
- they're too weak to make a real difference
Also, it's not clear whether enabling the internal pull up on a pin is honoured when the pin is routed to the UART. I actually doubt it.
Yet you seemed to be surprised that you needed to add an external pull-up on RXD. Very confusing (but then again I'm easily confused).
But serioulsy, I really would like to know why you think current sources are not effective as pull-ups and why ~27K equivalent is too weak. I couldn't work out what ATmel doc you were referencing. 50uA is about as much as I've ever needed to "establish" a logic level at a MOS input in a noisy RF environment. After all, it's just fighting electric fields that might otherwise put charge on the MOS gates.
In the meantime some things got back to my memory, so I will eloborate on this.
- There is no mentioning of this in ATmel doc's, so you (or I) won't find it. It's in an article in Circuit Cellar.
- The pull-ups in some ATmel 8 bit microcontrollers are a bit flimsy, in my experience. They can break easily (even though the port is still running fine) and the pull-up is not always strong enough (it's for instance disrecommend for something like I2C)
- There is no proper documentation on the pull-ups (like usual, on ESP8266)
So I tend to rely on my own resistors, that I know will work.
I would not expect for a pull up on the RXD to make the difference. I have no problems with the UART. I have problems with the WLAN RF. So I suspect, as I explained earlier, actually the TXD being the source of the problems, leaking some RF signal into circuitry acting as an antenna.
I removed the external resistors and activated the internal pull-ups. I could see no difference on the TXD pin (which I suppose is kind of obvious). So I played with the pull-up on the RXD. There was some difference, but not as clear as with the external pull-ups. So either the strength DOES matter, or, as I thought, the TXD needs a pull-up as well and the internal pull-up won't work on TXD.
So for future board layouts, I will definitely reserve some space for optional external pull-ups on the UART pins.
I guess someone with a proper oscilloscope should measure the UART pins in the RF range to know for sure.