Multiple 4 digit 7 segment led display with mcp23017

Hi guys,

Currently, I am doing a project to display four parameters in four 4digit 7 segments LED display via MCP23017 I/O expander by I2c communication from the esp8266 controller. By the reference of this forum, I get the code of single 4 digits 7 segments through mcp23017. Now I’m facing brightness and flickering problem by my code. Suggest me some ideas to complete this project.

final2.ino (20.9 KB)

Can you show a wiring diagram ?
Interesting things are the common segment resistors and if the common anode/cathode is directly driven by mcp23017 pin or via a transistor.

You are using the wrong chip, you need a max7219 and that will handle two full four digit displays, so you only need two chips. The multiplexing is handled by hardware so there is no software overhead.

A max7219 would certainly be easier assuming the display is common cathode but he seems to have got quite far already and solving a multiplexing problem is a useful learning experience.

Now I'm facing brightness and flickering problem

Suggests he hasn’t got the multiplexing right yest.