The "complete" code is about 700 lines (and it is not complete yet)
You just said...
I just wrote another code, which simply reads values of array and writes data on 1602LCD.
Issue still exists
That's the code that's 700 lines?

If you're having issues then continuing to add more code isn't going to help.
You should stop, and start trimming things down bit by bit until it starts working.
Then you'll know what to look at.

While compiler and chip issues are always a possibility, there's a much better chance you're just doing something wrong.