Hi,
I had a msp-exp432p4111 and trying to use an external lcd with ST7066U chip.I managed to do that and started to design a board of my own. But i used an other MCU which is msp432p401R and i failed using lcd with this MCU. I think i found the problem. Normally when i feed the lcd, a few flowing pins are high but when i connect those flowing pins to the msp-exp432p4111, pins changes according to settings of msp432p4111 . I mean lets say P4.0 is low and one of the pins of LCD is high. If i connect these, the last statement is low. But this is not happening with my new board.
int main(){
P4->DIR |= BIT6;
P4->DIR |= BIT7;
P5->DIR |= 0xFF;
Initial_ks0066();
CGRAM();
WriteIns(0x80);
WriteString1(8," Light");
WriteIns(0xc0);
WriteString1(8," House");
__bis_SR_register(LPM3_bits + GIE);
}
void WriteIns(char instruction)
{
P4->OUT ^= BIT7;
P5->OUT = instruction;
P4->OUT |= BIT6; //1us
for(i=0;i<1000;i++);
P4->OUT ^= BIT6; //1us
}
//=================================
//=================================
void WriteData(char data1)
{
P4->OUT |= BIT7;
P5->OUT = data1;
P4->OUT |= BIT6;
for(i=0;i<1000;i++);
P4->OUT ^= BIT6;
}
void WriteString1(count,MSG)
char count;
char *MSG;
{
char i;
for(i = 0; i<count;i++)
{
WriteData(MSG[i]);
// delay(1);
}
}
//=================================
//=================================
void Initial_ks0066()
{
WriteIns(0x38);
WriteIns(0x38);
WriteIns(0x38);
WriteIns(0x38);
WriteIns(0x08);
WriteIns(0x01);
WriteIns(0x0c);
WriteIns(0x06);
}
