Hello…This is very urgent…I am new to arm processors and embedded systems. I have purchased an lpc2378-stk kit. i have tried doing everything possible to run the lcd. The lcd has GE 8 sticker. pls write a simple c program for me displaying some text like abcd…i want to know the details of ssp control registers especially the ssp0cro and ssp0cr1 values. also i have understood that if we write any values to data register, it will automatically transmit serially. also that values has to be hexa equivalent of ascii values of characters. all my questions can be answered by writing a small program for me pls. i request your help pls. thanks.
My code is as follows:
#include <LPC23xx.H>
int main()
{
SCS = 0X00000001;
SSP0CR0 = 0X2F08;
SSP0CR1 = 0X02;
SSP0CPSR = 0X78;
PINSEL7 = 0x00000000; // Select P3.25 as GPIO for LCD_RST lpc2378
PINMODE3 = 0X00000000;
FIO3DIR = 0X02000000; // Select P3.25 - LCD_RST LPC2378 as OUTPUT
PINSEL0 = 0x80000000; //Select P0.15 as SCK0 in LPC2378
PINMODE0 = 0X00000000;//Select P0.0 to P0.15 as Pull Up Resistor Mode
PINSEL1 = 0x00000022; //Select P0.16 as SSEL0 and P0.17 as MISO0 lpc2378
PINMODE1 = 0X00000000;//Select P0.16 to P0.31 as Pull Up Resistor Mode
PINSEL3 = 0x00000000; //LCD Backlight (P1.26 as GPIO for anabling LCD Backlight)…
PINMODE3 = 0X00000000;
FIO1DIR = 0X04000000;
FIO1SET = 0x04000000; //…LCD Backlight
SSP0DR = 0X2CA;// Display Control
SSP0DR = 0X600;
SSP0DR = 0X61F;
SSP0DR = 0X68A;
SSP0DR = 0X2BB;// Common Scan Direction
SSP0DR = 0X600;
SSP0DR = 0X2D1;// Internal Oscillator ON
//SSP0DR = 0X2D2;// Internal Oscillator OFF
SSP0DR = 0X294;// Sleep out
SSP0DR = 0X220;// Power Control
SSP0DR = 0X60F;
SSP0DR = 0X2A6; // Normal Display
SSP0DR = 0X2BC;// Data Scan Direction
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X601;
SSP0DR = 0X281;// Electronic Volume Control
SSP0DR = 0X624;
SSP0DR = 0X603;
SSP0DR = 0X225;//No Operation
SSP0DR = 0X275;// PASET
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X215;// CASET
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X2CE;// 256-Color Position Set
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X600;
SSP0DR = 0X2AF;// Display ON
SSP0DR = 0X25C;// Ram Write
while (1)
{
SSP0DR = 0X645;
SSP0DR = 0X642;
SSP0DR = 0X643;
SSP0DR = 0X644;
}
}