Tell me what you want, What you really, really want.

Moderator: Mmiscool

User avatar
By Pierre Woodhouse
#47148 Hi I am processing smartmeter information ant posting to thingspeak. For ease of use I would like to use and inverted RX signal. The smartmeter provides an inverted 5v signal, easily scaled down to 3,3V using 2 resistors, but inverting this signal would need a transistor of FET. Some digging in the registers show the possibility to switch on an internal inverter for most UART signals. The serial commands do not allow for an inverted RX signal. So an old fashioned peek and poke statement would allow me to set the internal registers to my liking.

http://bbs.espressif.com/download/file.php?id=615 see line 61 ...

Greetings,

Pierre
User avatar
By martinayotte
#47184 Why do you need to invert serial signal ?
Usually, when we see inverted serial signal, this means it is not TTL level, but real RS232 where it swing between +/- 7V, in this case you should use an MAX232 chip to convert it. Of course, you can use discrete components such MOSFET if you only wish to get the RX signal received properly, but you won't have any driver for TX.
(BTW, I don't think there is any register inside ESP to invert the RX anyway, I've never seen such feature on any other UART as well)