Author MEDREA FLORIN ANDREI, thanks to ANTON RIECKERT.
Implemented on EasyPIC4 board, MCU PIC18F4620, Clock 40 MHz (10x4).
LCD SUPORT UP TO 65535 COLOURS. Now software is only for 256 colours !
PINOUTS : http://thomaspfeifer.net/nokia_6100_display.htm
LCD is connected on PORTB,0,1,2,3. Attention ! LCD work on 3.3 V. See SDCARD connections to MCU from MP help for more informations !!!
RESET : RB0 - LCD pin 2;
SDATA : RB1 - LCD pin 3;
SCLK : RB2 - LCD pin 4;
CS : RB3 - LCD pin 5;
LCD pin 1 + 6 : VCC 3.3 V
LCD pin 8 + 9 : GND
LCD pin 10 : Backlight through 470 ohm resistor to + 12V
Code: Select all
procedure LCD_PH_TYPE(const tip : byte); // tip : LCD_A or LCD_B
example : LCD_PH_TYPE(LCD_A);
procedure LCD_PH_Init;
example : LCD_PH_Init;
procedure LCD_PH_Direction(direction : byte); // VERTICAL OR HORIZONTAL
example : LCD_PH_Direction(VERTICAL);
procedure LCD_PH_Background(colour : byte);
procedure LCD_PH_Text_Background(colour : byte);
procedure LCD_PH_Text_Color(colour : byte); // colour : WHITE, BLACK, RED, GREEN, BLUE, YELLOW, CYAN, MAGENTA
example : LCD_PH_Background(WHITE);
example : LCD_PH_Text_Background(WHITE);
example : LCD_PH_Text_Color(BLACK);
procedure LCD_PH_Text_Size(size : byte); // size 1 to 16;
example : LCD_PH_Text_Size(2);
procedure LCD_PH_Clear_Screen;
example : LCD_PH_Clear_Screen;
procedure LCD_PH_Set_XY(x1,y1,x2,y2: byte);
example : LCD_PH_Set_XY(0,0,131,131);
procedure LCD_PH_Put_Text(xx,yy : byte; var txt : array[22] of char);
example : LCD_PH_Put_Text(6,26,'NOKIA 6100');
procedure LCD_PH_Put_Text_CP(var txt : array[22] of char);
example : LCD_PH_Put_Text_CP('NOKIA 6100');
procedure LCD_PH_Rectangle(x1,y1,x2,y2 : byte; bgcolor : byte);
example : LCD_PH_Rectangle(0,0,131,131,GREEN);
procedure LCD_PH_Chr (x,y,kar : byte);
example : LCD_PH_Chr (10,10,'B');
procedure LCD_PH_Chr_CP(kar : byte);
example : LCD_PH_Chr_CP('B');
procedure Draw_RGB;
example : Draw_RGB;
procedure Draw_RYB;
example : Draw_RYB;
procedure Put_Image(address,lungime : longint); // put image on the screen 132x132 pixels 256 colours
example : Put_Image(@WIN_XP_BMP,17424);
For Put_Image procedure you have a NokiaLcdEditor program.
Best regards Florin Medrea.