LCDInfo.com http://forum.lcdinfo.com/ |
|
some nokia lcd... http://forum.lcdinfo.com/viewtopic.php?f=6&t=2198 |
Page 1 of 1 |
Author: | korenje [ Mon Apr 09, 2007 14:05 ] |
Post subject: | some nokia lcd... |
Hello. I got this lcd, from used cellar phone... I measured voltages on cellar phone. pin1 - CS 1.8V pin2 - SCK 1.8V pin3 - SDATA ~V?? pin4 - RESET pin5 - VCC-DIGITAL 1.8V other side: pin1 - LED V+ 6.6V(to pin2) or 7.13V(to pin3) (when leds off) and 18.81V when leds are supposed to be turned on (actually when I turn on the cell phone) pin2 - GND for LED 0.8V pin3 - GND 0V pin4 - / pin5 - VCC-display 2.75V Now I would like to attach this lcd to PIC18F and I need to know how to communicate with lcd. Does anyone have PIC16 or PIC18 assembly code for this LCD. I'd like to know LCD commands and stuff. thanks. |
Author: | cex [ Tue Apr 10, 2007 11:25 ] |
Post subject: | Nokia 6100 |
Hello, your LCD looks like a 6100 LCD with Epson controller. You can find code for PIC and AVR to drive that display over the net (try "6100 lcd library" or ""6100 lcd driver" at google). Hope this helps. Cex. |
Author: | Zee [ Tue Apr 10, 2007 11:25 ] |
Post subject: | |
This is what I used to test my Nokia color LCDs with 16F627... Code: W EQU H'0000'
F EQU H'0001' CMD EQU H'0000' DAT EQU H'0001' ;----- Register Files------------------------------------------------------ INDF EQU H'0000' TMR0 EQU H'0001' PCL EQU H'0002' STATUS EQU H'0003' FSR EQU H'0004' PORTA EQU H'0005' PORTB EQU H'0006' INTCON EQU H'000B' OPTION_REG EQU H'0081' TRISA EQU H'0085' TRISB EQU H'0086' CMCON EQU H'001F' ;----- STATUS Bits -------------------------------------------------------- IRP EQU H'0007' RP1 EQU H'0006' RP0 EQU H'0005' NOT_TO EQU H'0004' NOT_PD EQU H'0003' Z EQU H'0002' DC EQU H'0001' C EQU H'0000' ;========================================================================== ; ; RAM Definition ; ;========================================================================== __MAXRAM H'01FF' __BADRAM H'07'-H'09', H'0D', H'13'-H'14', H'1B'-H'1E' __BADRAM H'87'-H'89', H'8D', H'8F'-H'91', H'93'-H'97', H'9E' __BADRAM H'105', H'107'-H'109', H'10C'-H'11F', H'150'-H'16F' __BADRAM H'185', H'187'-H'189', H'18C'-H'1EF' ;========================================================================== ; ; Configuration Bits ; ;========================================================================== _BODEN_ON EQU H'3FFF' _BODEN_OFF EQU H'3FBF' _CP_ALL EQU H'03FF' _CP_75 EQU H'17FF' _CP_50 EQU H'2BFF' _CP_OFF EQU H'3FFF' _DATA_CP_ON EQU H'3EFF' _DATA_CP_OFF EQU H'3FFF' _PWRTE_OFF EQU H'3FFF' _PWRTE_ON EQU H'3FF7' _WDT_ON EQU H'3FFF' _WDT_OFF EQU H'3FFB' _LVP_ON EQU H'3FFF' _LVP_OFF EQU H'3F7F' _MCLRE_ON EQU H'3FFF' _MCLRE_OFF EQU H'3FDF' _ER_OSC_CLKOUT EQU H'3FFF' _ER_OSC_NOCLKOUT EQU H'3FFE' _INTRC_OSC_CLKOUT EQU H'3FFD' _INTRC_OSC_NOCLKOUT EQU H'3FFC' _EXTCLK_OSC EQU H'3FEF' _LP_OSC EQU H'3FEC' _XT_OSC EQU H'3FED' _HS_OSC EQU H'3FEE' __CONFIG _BODEN_ON & _CP_OFF & _DATA_CP_OFF & _PWRTE_ON & _WDT_OFF & _LVP_OFF & _MCLRE_ON & _HS_OSC TIMER1 EQU H'20' TIMER2 EQU H'21' BYTE EQU H'22' COUNT1 EQU H'23' COUNT2 EQU H'24' BYTE2 EQU H'25' ORG 0 GOTO RESET DELAY MOVLW D'54' MOVWF TIMER2 DEL_LOOP1 MOVLW D'60' MOVWF TIMER1 DEL_LOOP2 DECFSZ TIMER1,F GOTO DEL_LOOP2 DECFSZ TIMER2,F GOTO DEL_LOOP1 RETURN DELAY2; MOVLW D'1' ; MOVWF TIMER2 DEL_LOOP3 MOVLW D'1' MOVWF TIMER1 DEL_LOOP4 DECFSZ TIMER1,F GOTO DEL_LOOP4 ; DECFSZ TIMER2,F ; GOTO DEL_LOOP3 RETURN LCD_WRITE MOVWF PORTB MOVLW B'00000001' MOVWF PORTA ; CALL DELAY2 MOVLW H'02' MOVWF PORTB RLF BYTE,F RLF BYTE,F MOVF BYTE,W ANDLW H'01' MOVWF PORTB IORLW H'02' MOVWF PORTB RLF BYTE,F MOVF BYTE,W ANDLW H'01' MOVWF PORTB IORLW H'02' MOVWF PORTB RLF BYTE,F MOVF BYTE,W ANDLW H'01' MOVWF PORTB IORLW H'02' MOVWF PORTB RLF BYTE,F MOVF BYTE,W ANDLW H'01' MOVWF PORTB IORLW H'02' MOVWF PORTB RLF BYTE,F MOVF BYTE,W ANDLW H'01' MOVWF PORTB IORLW H'02' MOVWF PORTB RLF BYTE,F MOVF BYTE,W ANDLW H'01' MOVWF PORTB IORLW H'02' MOVWF PORTB RLF BYTE,F MOVF BYTE,W ANDLW H'01' MOVWF PORTB IORLW H'02' MOVWF PORTB RLF BYTE,F MOVF BYTE,W ANDLW H'01' MOVWF PORTB IORLW H'02' MOVWF PORTB ; CALL DELAY2 MOVLW B'00000011' MOVWF PORTA RETURN ; ********************************** ; ** RESET : main boot routine ** ; ********************************** RESET MOVLW B'00000111' ;Disable Comparator module's MOVWF CMCON ; BSF STATUS,RP0 ;Switch to register bank 1 ;Disable pull-ups ;INT on rising edge ;TMR0 to CLKOUT ;TMR0 Incr low2high trans. ;Prescaler assign to Timer0 ;Prescaler rate is 1:256 MOVLW B'11010111' ;Set PIC options (See datasheet). MOVWF OPTION_REG ;Write the OPTION register. ; CLRF INTCON ;Disable interrupts MOVLW B'11000000' MOVWF TRISB ;RB7 & RB6 are inputs. ;RB5...RB0 are outputs. MOVLW B'11111100' ;all RA ports are inputs MOVWF TRISA BCF STATUS,RP0 ;Switch Back to reg. Bank 0 CLRF PORTB ; MOVLW B'00000010' MOVWF PORTA ; CALL DELAY MOVLW H'FF' MOVWF PORTB ; CALL DELAY MOVLW H'00' MOVWF PORTB ; CALL DELAY MOVLW B'00000011' MOVWF PORTA ; CALL DELAY MOVLW H'00' MOVWF BYTE2 ; GOTO PHILIPS MOVLW H'BB' ;COMSCN MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'01' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'D1' ;OSCON MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'94' ;SLPOUT MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'20' ;PWRCTR MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'0F' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'A7' ;DISINV MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'BC' ;DATCTL MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'03' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'00' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'01' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'CE' ;RGBSET8 MOVWF BYTE MOVLW CMD CALL LCD_WRITE GOTO RGB PHILIPS MOVLW H'38' ;IDMOFF MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'11' ;SLPOUT MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'3A' ;COLMOD MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'02' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'25' ;SETCON MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'3E' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'23' ;DAL MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'36' ;MADCTL MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'88' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'2D' ;RGBSET8 MOVWF BYTE MOVLW CMD CALL LCD_WRITE RGB MOVLW H'00' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'02' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'04' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'06' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'08' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'0A' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'0C' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'0E' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'00' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'02' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'04' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'06' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'08' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'0A' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'0C' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'0E' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'00' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'04' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'08' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'0C' MOVWF BYTE MOVLW DAT CALL LCD_WRITE ; MOVLW H'13' ;NORON (Philips) ; MOVWF BYTE ; MOVLW CMD ; CALL LCD_WRITE MOVLW H'AF' ;DISON (Epson) ; MOVLW H'29' ;DISON (Philips) MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'75' ;PASET (Epson) ; MOVLW H'2B' ;PASET (Philips) MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'00' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'83' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'15' ;CASET (Epson) ; MOVLW H'2A' ;CASET (Philips) MOVWF BYTE MOVLW CMD CALL LCD_WRITE MOVLW H'00' MOVWF BYTE MOVLW DAT CALL LCD_WRITE MOVLW H'83' MOVWF BYTE MOVLW DAT CALL LCD_WRITE REPEAT MOVLW H'5C' ;RAMWR (Epson) ; MOVLW H'2C' ;RAMWR (Philips) MOVWF BYTE MOVLW CMD CALL LCD_WRITE ; MOVLW H'00' MOVF BYTE2,W COMF BYTE2,F MOVWF BYTE MOVLW D'132' MOVWF COUNT2 FILL_LOOP1 MOVLW D'132' MOVWF COUNT1 FILL_LOOP2 MOVLW DAT CALL LCD_WRITE ; INCF BYTE,F DECFSZ COUNT1,F GOTO FILL_LOOP2 ; INCF BYTE,F DECFSZ COUNT2,F GOTO FILL_LOOP1 ; MOVLW H'00' ; MOVWF PORTB THE_END GOTO REPEAT END |
Author: | korenje [ Tue Apr 10, 2007 11:54 ] |
Post subject: | |
thanks zee. I hope this works |
Author: | korenje [ Tue Apr 10, 2007 12:10 ] |
Post subject: | |
I've found this: I've modified it a bit from different parts, so it's not a real code. Code: #define DISON 0xaf //
#define DISOFF 0xae // #define DISNOR 0xa6 // #define DISINV 0xa7 // #define COMSCN 0xbb // #define DISCTL 0xca // #define SLPIN 0x95 // #define SLPOUT 0x94 // #define PASET 0x75 // #define CASET 0x15 // #define DATCTL 0xbc // #define RGBSET8 0xce // #define RAMWR 0x5c // #define RAMRD 0x5d // #define PTLIN 0xa8 // #define PTLOUT 0xa9 // #define RMWIN 0xe0 // #define RMWOUT 0xee // #define ASCSET 0xaa // #define SCSTART 0xab // #define OSCON 0xd1 // #define OSCOFF 0xd2 // #define PWRCTR 0x20 // #define VOLCTR 0x81 // #define VOLUP 0xd6 // #define VOLDOWN 0xd7 // #define TMPGRD 0x82 // #define EPCTIN 0xcd // #define EPCOUT 0xcc // #define EPMWR 0xfc // #define EPMRD 0xfd // #define EPSRRD1 0x7c // #define EPSRRD2 0x7d // #define NOP 0x25 // WriteCommand(COMSCN); WriteData(0x01); WriteCommand(OSCON); WriteCommand(SLPOUT); WriteCommand(PWRCTR); WriteData(0x0f); WriteCommand(DISINV); WriteCommand(DATCTL); WriteData(0x03); WriteData(0x00); WriteData(0x01); WriteCommand(RGBSET8); WriteData(0x00); // R WriteData(0x02); // R WriteData(0x04); // R WriteData(0x06); // R WriteData(0x08); // R WriteData(0x0a); // R WriteData(0x0c); // R WriteData(0x0e); // R WriteData(0x00); // G WriteData(0x02); // G WriteData(0x04); // G WriteData(0x06); // G WriteData(0x08); // G WriteData(0x0a); // G WriteData(0x0c); // G WriteData(0x0e); // G WriteData(0x00); // B WriteData(0x04); // B WriteData(0x08); // B WriteData(0x0c); // B Delay(100000); WriteCommand(DISON); ; ports and pins for display interface #define NRESET PORTB, 0 #define NCS PORTB, 1 #define SCK PORTB, 3 #define SDA PORTB, 2 _s_byte EQU B0h ; lcd send byte ; exported function: LC3510_SET_12BPP: pixels are packed RRRRGGGGBBBB ; no parameters LCD3510_SET_12BPP movlw 0x3A call _command movlw 0x03 call _parameter return ; exported function: LC3510_SET_8BPP. pixels are packed RRRGGGBB ; no parameters LCD3510_SET_8BPP movlw 0x3A call _command movlw 0x02 call _parameter return _command movwf _s_byte ; save W reg ; terminate any prior sequence of parameters bsf NCS bcf SCK bcf NCS ; first bit is zero for command bcf SDA bsf SCK bsf SDA ; data pin high, ready for byte sending goto __send_byte _parameter movwf _s_byte ; save W reg bcf SCK ; clock in a one for parameter bsf SDA bsf SCK __send_byte ; Send 8 bits = 1 byte bcf SCK btfss _s_byte, 7 ; if ( bit7=1 ){ SDA=0; } else { SDA=1; } bcf SDA bsf SCK bcf SCK btfsc _s_byte, 6 ; če je bit6 1, potem SDA=1, če je bit6 0, potem SDA=0 bsf SDA btfss _s_byte, 6 bcf SDA bsf SCK bcf SCK btfsc _s_byte, 5 bsf SDA btfss _s_byte, 5 bcf SDA bsf SCK bcf SCK btfsc _s_byte, 4 bsf SDA btfss _s_byte, 4 bcf SDA bsf SCK bcf SCK btfsc _s_byte, 3 bsf SDA btfss _s_byte, 3 bcf SDA bsf SCK bcf SCK btfsc _s_byte, 2 bsf SDA btfss _s_byte, 2 bcf SDA bsf SCK bcf SCK btfsc _s_byte, 1 bsf SDA btfss _s_byte, 1 bcf SDA bsf SCK bcf SCK btfsc _s_byte, 0 bsf SDA btfss _s_byte, 0 bcf SDA bsf SCK return |
Page 1 of 1 | All times are UTC + 2 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |