“Eight bits, forty pins, infinite possibilities — proof that complexity is a choice, not a requirement.”
Notes on reprogramming the Sonoff MiniR2 controllers
The Sonoff MiniR2 is a versatile mains-powered device containing an Espressif ESP8285 (essentially an ESP8266 processor plus 1MB of built-in flash memory) along with a relay output, a switch input, and a spare GPIO input.
There's no need for a clock chip
The Arduino cores for the ESP8266 and ESP32 natively support the current date and time, synchronised to NTP servers. There is no need for a real-time clock chip or for extra libraries.
Read/Write Timing - Poor design and a wasted gate
I sometimes see 8-bit CPU interfacing to memory using an output enable signal (OE) to the memory device that is generated by combining (NANDing) the read/write (R/W) line with the CPU enable (E), as shown above, in a similar way to the write enable signal (WE). This is poor design and should be avoided.