This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP-EXP430F5438 LCD Display

Hello,

I am currently using the MSP-EXP430F5438 experimental board to understand its features.  I have downlaoded the sample software and able to run on the board. However when i tried to understand the code for the LCD display, it was difficult to find the reasons for the operation carried out in the fuctions related to LCD like lcd_init. I also tried to download the user guide, datasheet, user manual for the LCD Hitachi HD66753 but no valid document was avaliable.

Request you to please help in the my understanding of the LCD code and algorithm used for it

Thnaks in advance

  • The LCD is from Hitachi and includes its own controller. So everything LCD-related is display-specific and not MSP specific (except the low-level data exchange).

    Datasheet of the display and its controller should be available somewhere, either form Hitachi, or form the board's product page. If not, well, sorry, can't help you then. I have only access to the same resources as you have. But maybe a TI official with additional resources jumps in and provides a link or attachment.

    (well, I dimly remember that this topic came up some years ago when the 54xx was new, and maybe a datasheet or at least link was provided then, so use the forum search)

  • Hello,

     

    Thanks for your reply. I have gone thorough the forum post but did no found the answer.

     

    Request your help in this

  • I just checked it and yes, the old post I remembered was about replacing the LCD and not about programming it.

    Sorry, can't help you. I don't have access to other resources than you.

    However, entering "HD66753" (the controller on the LCD) into Google did give me the datasheet as first hit.

  • Hello,

    Thanks for your reply. I also got the datasheet from the google, but while going through it i found that the pin name and numbers were not same as mentined in TI experimental board. I also tried the reverse engineering in the sample software provided by TI but was unable to get a completed undestanding based on the datasheet provided by the google.

    Could you please advice whoom i can check for this ?

    I appreciate your contionus co operation.

  • vinay kumar6 said:
    I found that the pin name and numbers were not same as mentined in TI experimental board.

    Maybe this old thread will shed some light on it.

  • I'm a new user for MSP430 but I work years with PIC

    AIP31066 , HD44780, KS0066 , SPLC780 , ST7066

    sbit 	RS=P2^0;
    sbit 	R_W=P2^1;
    sbit 	E=P2^2;
    bit 	log=0;
    sbit	int0=P3^2;
    #define  DATA_BUS	P1
    #define  TIMING     8                 //8     8 bit data transmission            4       4 bit data transmission
    
    void LCD_initialize(void);
    void Write_CGRAM(uchar  a[]);
    void Write_Command(uchar cmd);
    void Write_Data(uchar dat);
    void Busy(void);
    void Delay(uint n);
    void Delay1(uint n);
    void Write_DDRAM(uchar a);
    void write_CGROM(uchar a);
    void shaw_character_string(uchar a[]);
    
    
    uchar code character_string[]=
    {
    	   "EastRisingTechnologyEastRisingTechnology"
    	   "EastRisingTechnologyEastRisingTechnology"
    };
    
    uchar code font[]=
    {
    	0x1f,0x00,0x1f,0x00,0x1f,0x00,0x1f,0x00,
    	0x00,0x1f,0x00,0x1f,0x00,0x1f,0x00,0x1f,
    	0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
    	0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
    	0x08,0x0f,0x12,0x0f,0x0a,0x1f,0x02,0x02,	//Year
    	0x0f,0x09,0x0f,0x09,0x0f,0x09,0x09,0x13,	//Month
    	0x1f,0x11,0x11,0x1f,0x11,0x11,0x11,0x1F,	//Day
    	0x0C,0x0a,0x11,0x1f,0x09,0x09,0x09,0x13,	//minute
    };
    
    
    
    void Step(void) interrupt 0 using 0
    {
    	Delay1(500);
    	if(int0==0)	log=!log;
       while(!int0);
      return;
    
    }
    
    
    void Delay1(uint n)
    {while(n--);
       
    }
    
    void Delay(uint n)
    {while(n)
     { 
    	  n--;
     }
     	for(;log==1;)
    	{
    
    	}
    
    }
    
    #if  (TIMING==8)
    
    void Busy(void)
    {
        uchar flag=0xff;
        RS=0;E=0;R_W=1;
    	while ((flag&0x80)==0x80)
    	{	P1=0xff;
    		E=1;
    		_nop_();
    	    flag=DATA_BUS;
        	E=0;
    	}
    }
    
    #else
    void Busy(void)
    {
        uchar flag=0xf0;
        RS=0;E=0;R_W=1;
    	while ((flag&0x80)==0x80)
    	{	P1=0xf0;
    		E=1;
    		_nop_();
    	    flag=DATA_BUS;
        	E=0;
    	}
    }
    
    
    #endif
    
    
    #if  (TIMING==8)
    void Write_Data(uchar dat) 
    {
        Busy();
        RS=1;
        R_W=0;
    	DATA_BUS=dat;
        E=1;
        _nop_();
        E=0;
    }
    
    #else
    
    void Write_Data(uchar dat) 
    {
        Busy();
        RS=1;
        R_W=0;
    	DATA_BUS=dat&0xf0;
        E=1;
        _nop_();
        E=0;
    	dat<<=4;
    	DATA_BUS=dat&0xf0;
        E=1;
        _nop_();
        E=0;
    
    }
    
    #endif
    
    
    #if  (TIMING==8)
    void Write_Command(uchar cmd)
    {
    	Busy();
        RS=0;
        R_W=0;
    	DATA_BUS=cmd;
        E=1;
    	_nop_();
        E=0;
    }
    
    #else					
    void Write_Command(uchar cmd)
    {
       Busy();
        RS=0;
        R_W=0;
    	DATA_BUS=cmd&0xf0;			
        E=1;
    	_nop_();
        E=0;
    	cmd<<=4;
    	DATA_BUS=cmd&0xf0;
        E=1;
        _nop_();
        E=0;
     
    }
    
    #endif
    
    void Write_CGRAM(uchar  a[])
    {uchar i=64,k;
    	Write_Command(0x40);
    	for(k=0;k<64;k++)
    	{Write_Data(a[k]);
    	}
    }
    
    void LCD_initialize(void)
    {
    if(TIMING==8)   Write_Command(0x38);
     else   Write_Command(0x28);
     Write_Command(0x0c);
     Write_Command(0x06);
     Write_Command(0x01);
     Write_CGRAM(font);
    }
    
    void Write_DDRAM(uchar a)
    {uchar j;
     Write_Command(0x02);
      Delay(1000);
     Write_Command(0x80);
    	for(j=0;j<40;j++)
    	{Write_Data(a);
    	}
     Write_Command(0xc0);
    	for(j=0;j<40;j++)
    	{Write_Data(a);
    	}
    		Delay(35000);
    		Delay(65000);
    
    }
    
    
    void write_CGROM(uchar a)
    {uchar j;
     Write_Command(0x02);
      Delay(1000);
     Write_Command(0x80);
     	for(j=0;j<40;j++)
    	{Write_Data(a);a+=1;
    	}
     Write_Command(0xc0);
    	for(j=0;j<40;j++)
    	{Write_Data(a);a+=1;
    	}
    		Delay(35000);
    		Delay(65000);
    
    }
    
    void shaw_character_string(uchar a[])
    {uchar j;
     Write_Command(0x02);
      Delay(1000);
     Write_Command(0x80);
     	for(j=0;j<40;j++)
    	{Write_Data(a[j]);
    	}
     Write_Command(0xc0);
     	for(j=40;j<80;j++)
    	{Write_Data(a[j]);
    	}
    		Delay(35000);
    		Delay(65000);
    
    }
    
    
    void main(void)
    {	IE=0x81;
    	IP=0x01;
    	TCON=0x01;
    	int0=1;
    	DATA_BUS=0xff;
    	P2=0xff;
    	Delay(10000);
    	LCD_initialize();
    while(1)
    
    	{Write_DDRAM(0xff);	
    	Write_Command(0x01);
    	Delay(35000);
    	shaw_character_string(character_string);
    	Write_DDRAM(0);	
    	Write_DDRAM(1);
    	Write_DDRAM(2);
    	Write_DDRAM(3);
    	write_CGROM(0xA0);
    	Write_DDRAM(4);	
    	Write_DDRAM(5);
    	Write_DDRAM(6);
    	Write_DDRAM(7);
    
    
    	}
    }
    
    

**Attention** This is a public forum