Maybe explain or actually show what screen you're working with, why your code is using a port expander, where you got that code, and what it is you're trying to do?
Have you ever gotten the screen working with a simpler code that prints hello world or something?