4x4 Keypad Password + LCD

At the very least, you probably want == (test for equality) not = (assignment) in many places.

At a glance, the logic for getting out when passpos becomes 5 don’t look right.

Trace it by hand, that is “play computer” and walk yourself through it to see… it’s doing what you wrote, maybe not what you think.

a7