LCDInfo.com

http://www.lcdinfo.com
It is currently Fri Nov 22, 2024 9:35

All times are UTC + 2 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Re: urgent lcd info
PostPosted: Sat May 01, 2004 17:41 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
Quote:
dear sir
i am trying to interface nokia 3310 lcd with pic 18f8720.but i am unable to get any response in the lcd what r the parameters that i should take into consideration, do mail me .expecting ur reply at the earliest

with regards

veera vikraman.S

for S.N.Manufacturing co.


vikraman


Found this somewhere, it should be the basic initialization:

Code:
    LcdSend( 0x21, LCD_CMD );  // LCD Extended Commands.
    LcdSend( 0xC8, LCD_CMD );  // Set LCD Vop (Contrast).
    LcdSend( 0x06, LCD_CMD );  // Set Temp coefficent.
    LcdSend( 0x13, LCD_CMD );  // LCD bias mode 1:48.
    LcdSend( 0x20, LCD_CMD );  // LCD Standard Commands, Horizontal addr mode.
    LcdSend( 0x0C, LCD_CMD );  // LCD in normal mode.


For better explanation of different initialization parameters you should check the PCD8544 datasheet:
http://www.semiconductors.philips.com/a ... 8544_1.pdf


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 03, 2004 22:34 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
Discussion like this should be kept at the forum unless there's some need for private email.

Quote:
dear sir
The parameters specified by u is set still it(nokia 3310 lcd) doesnt respond i dont know why all the sample prog says the same spec.i am using 20Mhz crystal and using spi interface to connect with the lcd .
Is there timing spec for initialisation and data sending pls do reply to this mail i am stuck half way through.Pls do verify the code and reply me

i am suppling 3v to the lcd as power is there any specific time at which the lcd should be powered up.the lcd shows no response.my controller is 18f8720

i have attached the the code of mine also

veera vikraman.s


vikraman


Code:
#include<18f8720.h>

#fuses HS,NOWDT,NOPROTECT,NOLVP,NOBROWNOUT,PUT
#use delay(clock=20000000)
#use rs232(baud=9600,xmit = PIN_C6, rcv = PIN_C7)

#define LCD_DC_PIN                PIN_F3  //  Pf3
#define LCD_CE_PIN                PIN_D1  //  PD1
#define SPI_DO_PIN                PIN_C5  //  PB3
#define LCD_RST_PIN               PIN_D2  //  PD2
#define SPI_CLK_PIN               PIN_C3  //  PC3
#define LCD_PS                    PIN_D3

#define HIGH                 1
#define LOW                    0                         

void main ( void )
{
   int data_in,data;
   
   output_low(SPI_DO_PIN);
   output_low(SPI_CLK_PIN);
   setup_spi(SPI_MASTER | SPI_L_TO_H | SPI_CLK_DIV_16);
   output_bit(LCD_DC_PIN,HIGH);
    output_bit(LCD_CE_PIN,HIGH);
    output_bit(PIN_D3,1);
   
    delay_us(200);
   
    output_bit(LCD_RST_PIN,LOW);
    delay_ms(10);
    output_bit(LCD_RST_PIN,HIGH);
   
    output_bit(LCD_DC_PIN,LOW);
    output_bit(LCD_CE_PIN,LOW);
   
        spi_write( 0x21);
        spi_write( 0xC8);
        spi_write( 0x13);
        spi_write( 0x20);
        spi_write( 0x09);   
             
       delay_ms(50);
}


You should check the section 8.1 of the PCD8544 datasheet about the powerup and initialization. Basically just after power to the display is applied it should be resetted. (like you do)

I guess sample programs use the same initialization commands as they have been found to be working general settings. Of course they can be adjusted and they are explained in detail in the PCD8544 datasheet. But the settings mentioned here should give picture. I'm not aware of any specific initialization timings (except reset, figure 12.2 in PCD8544 datasheet) as long as your SPI is withing specs.

Have you tried different SPI speeds ? Have you verified SPI is working ok ? Instead of the hardware SPI you could just bit bang the bits using software to emulate SPI.
PCD8544 datasheet mentions the max. SPI speed as 4 MHz.

After initialization my display shows random garbage and it needs to be zeroed to clean the memory.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group