I am porting a sketch (which I need to convert to a library) for driving a 14 segment display (six chars, but can be expanded) from an Arduino to the ESP-01.
I am trying to figure out the best way to drive the multiplexing. I have the hardware all sorted out (shift registers and a ULN2803), but on the Arduino I used an interrupt service routine called regularly to bit bang the data to the shift registers (which drive both the anodes, and the common cathodes via the ULN2803). This worked great.
In the ESP I am using the Ticker library as my "interrupt" routine. I am getting the occasional tiny bit of flicker, like a little glitch you might see in a sci-fi movie display. I am assuming this has to do with the ESP not being a realtime OS, and doing other things like WiFi (which I do not have setup in this sketch yet). The glitches are subtle, and hardly impact the utility, but they look less than professional. They really seem worst right after startup, as though the "os" is doing some other stuff right after boot that then calms down after a few seconds.
So was wondering if there was a better way to drive the multiplexing directly from the ESP. Is there a better way to handle the interrupts? I am multiplexing with a delay of 4 milliseconds, which seems to be as slow as I can go with a clean POV effect.
In another ESP project I have of course used a Max 7219 on an 8x7 segment display, and the 7219 handles the multiplexing internally. So there is no flicker. I don't really want to use a dedicated 14 segment driver chip. They are a lot more expensive than a 7219, and I don't have one right now
Perhaps I could or should use a 555 to drive a counter to drive the multiplexing on the ULN2803... This would cycle through the cathodes quickly, totally independently of the ESP.
Thoughts? Could the glitches be something else like RF? I have everything pulled as is normal. I am powering the LEDs and shift registers/ULN separately via 5v, and have the ESP on a bench power supply.
I wonder if I should try a 3.3v<->5v level shifter. I am currently trying to drive the pins on the shift registers with 3.3v "HIGH."
Anyone?
Thanks.