The problem was solved after I hanged the ferrite rings on the loop connecting the display and the board. The hang-up situation became less frequent, but still sometimes the printer hangs when printing, but after I put in a second power supply, the hang-ups are gone.