Hi all.
I have interfaced my ATMEGA32 controller with Nokia 6610 LCD.
The interface pinouts are as follows:
// Connections between ATMEGA32 and LCD.
#define _RES PORTB.6 // /Reset
#define SCK PORTB.7 // Serial Clk
#define SDI PORTB.5 // Serial Data In
#define _SCE PORTB.4 // /Chip Select
// Connection Direction between ATMEGA32 and LCD.
#define SCK_DIR DDRB.7
#define SDI_DIR DDRB.5
#define _SCE_DIR DDRB.4
#define _RES_DIR DDRB.6
and the LCD Init routine is
void InitLcd(void)
{
// Configured all pins as output
SCK_DIR = 1;
SDI_DIR = 1;
_SCE_DIR = 1;
_RES_DIR = 1;
delay_us(200);
// Hardware reset
_SCE = 1;
_RES = 1; //Reset the LCD.
_RES = 0; //Reset the LCD.
delay_ms(10); //Wait 100ms.
_RES = 1; // Awake LCD from RESET state.
delay_ms(10); //Wait 10ms.
// Hardware reset
_SCE = 1;
SDI = 1;
SCK = 1;
// Sleep out (command 0x11)
WriteSpiCommand(SLEEPOUT);
// Sleep out (command 0x11)
WriteSpiCommand(BSTRON);
delay_ms(100);
// Inversion OFF (command 0x21)
WriteSpiCommand(INVON);
// Color Interface Pixel Format (command 0x3A)
WriteSpiCommand(COLMOD);
WriteSpiData(0x02);
// Memory access controler (command 0x36)
WriteSpiCommand(MADCTL);
WriteSpiData(0x48); // 0xC0 = mirror x ,NO MIRROR y,reverse rgb
// Write contrast (command 0x25)
WriteSpiCommand(SETCON);
WriteSpiData(0x3F); // contrast 0x30 DECMAL EQU 63
delay_ms(100); //Wait 100ms.
// Display On (command 0x29)
WriteSpiCommand(DISPON);
}
The VCC for the LCD is through Port pin and is divided to obtain3.3V.For the backlight i am externally providing 7V as mentioned. But still the backlight is not turning ON. I guess the backlight is not software controlled. Help me please.My controller is working on 1MHz.