Forums

nokia6100 lcd interface with msp430f2618

Started by imshareef2003 May 15, 2008
Hello everyone,

Am having problems running a nokia 6100 lcd with msp430f2618.

i have modified the code given in

http://electronique.marcel.free.fr/LCD%20Nokia%20couleurs.html

appropriately to fit into msp430f2618. But things dont seem to work.

First of all the LCD pin configuration given in the above site did not
match mine, though i had a similar looking lcd display. i could find
that it was mirrored. In my case the backlight was on pin 1 (vled+)
and pin 2 (vled-).

I have connected pins vdisp and vdig to 3.3v.

i have connected sda and clk directly to msp spi pins. and given cd
and reset to gpio pins of msp430.

But i dont get anythin on the screen except for the backlight.

here is my spi initialization part in the code:

#define Lcd_CE_Pin 0x01 // P5.0 = SCE
#define Lcd_DIN_Pin 0x02 // P5.1 = SIMO = SDIN
#define Lcd_RST_Pin 0x04 // P5.2 = RES
#define Lcd_CLK_Pin 0x08 // P5.3 = UCLK = SCLK
void InitSPI_Lcd(void)
{

UCB1CTL1 |= UCSWRST; // **Initialize USCI state
machine**

UCB1CTL0 |= UCMST+UCSYNC+UCCKPL+UCMSB+UCCKPH; //3-pin, 8-bit SPI
master
UCB1CTL0 &= ~UC7BIT;
UCB1CTL1 |= UCSSEL_2; // SMCLK
UCB1BR0 = 0x04; // /2
UCB1BR1 = 0; //
UCB1CTL1 &= ~UCSWRST; // **Initialize USCI state
machine**
P5SEL|=Lcd_DIN_Pin|Lcd_CLK_Pin;
P5REN |= Lcd_DIN_Pin|Lcd_CLK_Pin;
}

void main(void)
{
WDTCTL = WDTPW + WDTHOLD;
P5DIR=Lcd_CE_Pin|Lcd_DIN_Pin|Lcd_RST_Pin|Lcd_CLK_Pin;

//clock DCO 1 MHz
BCSCTL1 = CALBC1_8MHZ; // Set DCO to 8MHz
DCOCTL = CALDCO_8MHZ;

InitSPI_Lcd();
LcdInit(); //code for this is the same as given in the above link
Fill_Lcd(Bleu); //code for this is the same as given in the above link
Exemples_de_textes(); //code for this is the same as given in the
above link
for (;;)
{
}
}

The rest of the code is the same as given in the above link.
could someone please help me on this? I am on a tight schedule and i
have been struggling for a few months with this problem.

Regards and thanks,
shareef

Beginning Microcontrollers with the MSP430

There are several different versions of this lcd around.. make sure you use the
correct controller code.. the code for the olimex lcd board has both versions
of the hardware driver, you select it by a #define...
http://www.olimex.com/dev/soft/msp430/MSP430-4619LCD.zip
--- imshareef2003 wrote:

> Hello everyone,
>
> Am having problems running a nokia 6100 lcd with msp430f2618.
>
> i have modified the code given in
>
> http://electronique.marcel.free.fr/LCD%20Nokia%20couleurs.html
>
> appropriately to fit into msp430f2618. But things dont seem to work.
>
> First of all the LCD pin configuration given in the above site did not
> match mine, though i had a similar looking lcd display. i could find
> that it was mirrored. In my case the backlight was on pin 1 (vled+)
> and pin 2 (vled-).
>
> I have connected pins vdisp and vdig to 3.3v.
>
> i have connected sda and clk directly to msp spi pins. and given cd
> and reset to gpio pins of msp430.
>
> But i dont get anythin on the screen except for the backlight.
>
> here is my spi initialization part in the code:
>
> #define Lcd_CE_Pin 0x01 // P5.0 = SCE
> #define Lcd_DIN_Pin 0x02 // P5.1 = SIMO = SDIN
> #define Lcd_RST_Pin 0x04 // P5.2 = RES
> #define Lcd_CLK_Pin 0x08 // P5.3 = UCLK = SCLK
> void InitSPI_Lcd(void)
> {
>
> UCB1CTL1 |= UCSWRST; // **Initialize USCI state
> machine**
>
> UCB1CTL0 |= UCMST+UCSYNC+UCCKPL+UCMSB+UCCKPH; //3-pin, 8-bit SPI
> master
> UCB1CTL0 &= ~UC7BIT;
> UCB1CTL1 |= UCSSEL_2; // SMCLK
> UCB1BR0 = 0x04; // /2
> UCB1BR1 = 0; //
> UCB1CTL1 &= ~UCSWRST; // **Initialize USCI state
> machine**
> P5SEL|=Lcd_DIN_Pin|Lcd_CLK_Pin;
> P5REN |= Lcd_DIN_Pin|Lcd_CLK_Pin;
> }
>
> void main(void)
> {
> WDTCTL = WDTPW + WDTHOLD;
> P5DIR=Lcd_CE_Pin|Lcd_DIN_Pin|Lcd_RST_Pin|Lcd_CLK_Pin;
>
> //clock DCO 1 MHz
> BCSCTL1 = CALBC1_8MHZ; // Set DCO to 8MHz
> DCOCTL = CALDCO_8MHZ;
>
> InitSPI_Lcd();
> LcdInit(); //code for this is the same as given in the above link
> Fill_Lcd(Bleu); //code for this is the same as given in the above link
> Exemples_de_textes(); //code for this is the same as given in the
> above link
> for (;;)
> {
> }
> }
>
> The rest of the code is the same as given in the above link.
> could someone please help me on this? I am on a tight schedule and i
> have been struggling for a few months with this problem.
>
> Regards and thanks,
> shareef