-->
Page 1 of 1

Peek and Poke

PostPosted: Sun May 08, 2016 5:42 pm
by Pierre Woodhouse
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

Re: Peek and Poke

PostPosted: Mon May 09, 2016 7:33 am
by martinayotte
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)