siemens S55 and nokia 5110 lcd problem using the same code

Hello,
I have made a code that works great with the siemens S-55 lcd but I tried the same code with 5110 lcd and it stops and reloops.
The code is the same. I changed the library and the print commands according to each library examples.

Can anyone help me to solve this problem? :sweat_smile:

sketch_jan05a.ino (9.02 KB)

sketch_jan05anok.ino (9.13 KB)

Is there anyone that can help me to make the code work with nokia 5110 LCD, please??

Thank you!