I have been trying to get a HD44780 LCD display to work for multiple times. The first time was by parallel port from a computer, then multiple times using different PIC uCs. I am only able to get the display to show half of the dots (the right side of the screen) as black, and the left side as blank/white. I read from the internet that it means the display is not initializing properly.
The display is Tianma TM161A/B
setData(0b00110000); // INIT
strobeE();
DelayMs(5);
setData(0b00110000); // INIT
strobeE();
DelayMs(5);
setData(0b00001111); // ON/OFF
strobeE();
DelayMs(5);
setData(0b00000001); // CLEAR
strobeE();
DelayMs(5);
setData(0b00000110); // ENTRY MODE
strobeE();
void strobeE() {
mPORTDSetBits(E);
DelayMs(1);
mPORTDClearBits(E);
}
I have used a logic analyzer, a logic probe and a multimeter to check if the connections between the PIC and the LCD are correct. I think they are.
A ( bad ) picture of my timings on a logic analyzer;
What am I doing wrong?