motomanxd
Newbie level 4

Hello,
I use this LCD display: http://www.artronic.com.pl/o_produkcie.php?id=684
Electromagnetic noise emitted by piezo ignition causes image disappear from the screen. Sometimes image disappears from all 3 segments (there are 3 chips, each 64x64 pixels), sometimes image disappears from one or two segments. It is enough to call displayOn() function to cause the image appear on the screen again - I do not need to redraw graphics. In my program, I call displayOn() in infinite loop, so the image appears automatically.
Please, see the film:
I would be glad, if you could suggest me what probably the problem is (in what way noise influences the LCD that the image disappears) and what I can do to improve immunity of the display. I think that a tip is that noise causes the image disappears and displayOn() cause the image appears again.
In my film, the display is without a case. But when I close metal case, the situation is a little bit better, but it does not solve the problem.
My displayOn():
I use this LCD display: http://www.artronic.com.pl/o_produkcie.php?id=684
Electromagnetic noise emitted by piezo ignition causes image disappear from the screen. Sometimes image disappears from all 3 segments (there are 3 chips, each 64x64 pixels), sometimes image disappears from one or two segments. It is enough to call displayOn() function to cause the image appear on the screen again - I do not need to redraw graphics. In my program, I call displayOn() in infinite loop, so the image appears automatically.
Please, see the film:
I would be glad, if you could suggest me what probably the problem is (in what way noise influences the LCD that the image disappears) and what I can do to improve immunity of the display. I think that a tip is that noise causes the image disappears and displayOn() cause the image appears again.
In my film, the display is without a case. But when I close metal case, the situation is a little bit better, but it does not solve the problem.
My displayOn():
Code:
#define DISPLAY_TURN_ON_OFF 0x3E
#define DISPLAY_SET_Z_ADDRESS 0xC0
void displayOn() {
cbi(RS_OUTPUT_PORT, RS_OUTPUT_PIN);
cbi(RW_OUTPUT_PORT, RW_OUTPUT_PIN);
cbi(CSA_OUTPUT_PORT, CSA_OUTPUT_PIN);
cbi(CSB_OUTPUT_PORT, CSB_OUTPUT_PIN);
writeCommand(DISPLAY_TURN_ON_OFF | 0x01);
writeCommand(DISPLAY_SET_Z_ADDRESS | 0x00);
sbi(CSA_OUTPUT_PORT, CSA_OUTPUT_PIN);
cbi(CSB_OUTPUT_PORT, CSB_OUTPUT_PIN);
writeCommand(DISPLAY_TURN_ON_OFF | 0x01);
writeCommand(DISPLAY_SET_Z_ADDRESS | 0x00);
sbi(CSB_OUTPUT_PORT, CSB_OUTPUT_PIN);
cbi(CSA_OUTPUT_PORT, CSA_OUTPUT_PIN);
writeCommand(DISPLAY_TURN_ON_OFF | 0x01);
writeCommand(DISPLAY_SET_Z_ADDRESS | 0x00);
}
void writeCommand(uint8_t cmd) {
busyWait();
cbi(RS_OUTPUT_PORT, RS_OUTPUT_PIN);
cbi(RW_OUTPUT_PORT, RW_OUTPUT_PIN);
DATA_OUTPUT_PORT = cmd;
sbi(EN_OUTPUT_PORT, EN_OUTPUT_PIN);
delay();
cbi(EN_OUTPUT_PORT, EN_OUTPUT_PIN);
}