LcdNokia1202

M.R.Abedini

همکار جدید
سلام خدمت همه دوستان
باتوجه به کاربرد ال سی دی در اکثر پروژه های الکترونیکی ( دانشجویی -کاراکتری2در16 و صنعتی و..) که امروز همگی قیمت بالاتری دارن .. خواستیم یه ال سی دی ارزون قیمت(4 الی 15 هزارتومن) معرفی کنیم و درادامه کابخونهstm32 رو هم اپلود خواهیم کرد
البته مدل ال سی دی های نوکیا تو بازار زیاده که مصرف بیشتر و پیکسل های کمتری نسبت به این مدل دارن (گاها)
ال سی دی دوست داشتنی ما گرافیکی تک رنگ با ابعاد 1.3 اینچ و 96x68 پیکسل با درایور STE2007 ارائه شده .

http://nic.vajn.icu/PDF/lcd/Nokia1202/Nokia_1202_LCD.html
برای اطلاعات بیشترم میتونن به سایت بالا مراجعه کنین که ساده و وراوان توضیح داده.
 

پیوست‌ها

  • lcdnokia1202.rar
    1.7 مگایابت · بازدیدها: 3
  • STE2007.pdf
    725.7 کیلوبایت · بازدیدها: 1

Alma

مدیر
پرسنل مدیریت
چون ممکنه بعدا دیگه لینکی که معرفی کردین در دسترس نباشه من کله اطلاعاتی که منتشر کرده رو اینجا منعکس کردم

Nokia 1202 LCD
Monochrome graphics display 96 * 68 pix.

upload_2020-1-16_14-55-1.png


This display is set to a number of budget phones Nokia 1202/1203/1280.

Purchase displays can be stores selling spare parts for mobile phones at a very nice price .

Availability, simple serial interface and the relative ease of connection allows you to use this display in
amateur designs, and in more serious projects. If you need a color display higher resolution, you can
use the LCD from the budget Nokia 1661/5030 / 1616/1800/1662 .


LCD pinout
Connector pitch 0,6 mm Serial interface mode 3-lines 9-bit


upload_2020-1-16_14-57-3.png

STE2007 controller also allows you to work on the interface I2C, that in some cases it may be easier than SPI.

Init sequence
Display has 9 bit SPI interface.

upload_2020-1-16_15-0-53.png

Code example

upload_2020-1-16_15-1-57.png

کد:
//    Copyright (c) 2012, Greg Davill

#include <msp430g2452.h>

const unsigned char font_data[] = {
    0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0xF6,0x00,0x00,
    0x00,0xE0,0x00,0xE0,0x00,
    0x28,0xFE,0x28,0xFE,0x28,
    0xA4,0xEA,0xEE,0xAA,0xAA,
    0xC4,0xC8,0x10,0x26,0x46,
    0x6C,0x92,0x6A,0x04,0x0A,
    0xe0,0x2a,0x6a,0x26,0x28,
    0x00,0x38,0x44,0x82,0x00,
    0x00,0x82,0x44,0x38,0x00,
    0x28,0x10,0x7C,0x10,0x28,
    0x10,0x10,0x7C,0x10,0x10,
    0x00,0x0A,0x0C,0x00,0x00,
    0x10,0x10,0x10,0x10,0x10,
    0x02,0x00,0x00,0x00,0x00,
    0x04,0x08,0x10,0x20,0x40,
    0x7C,0x8A,0x92,0xA2,0x7C,
    0x00,0x42,0xFE,0x02,0x00,
    0x42,0x86,0x8A,0x92,0x62,
    0x84,0x82,0xA2,0xD2,0x8C,
    0x18,0x28,0x48,0xFE,0x08,
    0xE4,0xA2,0xA2,0xA2,0x9C,
    0x3C,0x52,0x92,0x92,0x0C,
    0x80,0x8E,0x90,0xA0,0xC0,
    0x6C,0x92,0x92,0x92,0x6C,
    0x60,0x92,0x92,0x94,0x78,
    0x00,0x6C,0x6C,0x00,0x00,
    0x00,0x6A,0x6C,0x00,0x00,
    0x10,0x28,0x44,0x82,0x00,
    0x28,0x28,0x28,0x28,0x28,
    0x00,0x82,0x44,0x28,0x10,
    0x40,0x80,0x8A,0x90,0x60,
    0x7C,0x82,0xBA,0x92,0x72,
    0x7E,0x90,0x90,0x90,0x7E,
    0xFE,0x92,0x92,0x92,0x6C,
    0x7C,0x82,0x82,0x82,0x44,
    0xFE,0x82,0x82,0x82,0x7C,
    0xFE,0x92,0x92,0x92,0x82,
    0xFE,0x90,0x90,0x90,0x80,
    0x7C,0x82,0x92,0x92,0x5E,
    0xFE,0x10,0x10,0x10,0xFE,
    0x00,0x82,0xFE,0x82,0x00,
    0x04,0x02,0x82,0xFC,0x80,
    0xFE,0x10,0x28,0x44,0x82,
    0xFE,0x02,0x02,0x02,0x02,
    0xFE,0x40,0x30,0x40,0xFE,
    0xFE,0x20,0x10,0x08,0xFE,
    0x7C,0x82,0x82,0x82,0x7C,
    0xFE,0x90,0x90,0x90,0x60,
    0x7C,0x82,0x8A,0x84,0x7A,
    0xFE,0x90,0x98,0x94,0x62,
    0x62,0x92,0x92,0x92,0x8C,
    0x80,0x80,0xFE,0x80,0x80,
    0xFC,0x02,0x02,0x02,0xFC,
    0xF0,0x0C,0x02,0x0C,0xF0,
    0xFC,0x02,0x1C,0x02,0xFC,
    0xC6,0x28,0x10,0x28,0xC6,
    0xE0,0x10,0x0E,0x10,0xE0,
    0x86,0x8A,0x92,0xA2,0xC2,
    0x3C,0x52,0x92,0x94,0x78,
    0x40,0x20,0x10,0x08,0x04,
    0x00,0x82,0xFE,0x00,0x00,
    0x20,0x40,0x80,0x40,0x20,
    0x02,0x02,0x02,0x02,0x02,
    0x00,0x00,0xC0,0x20,0x00,
    0x04,0x2A,0x2A,0x2A,0x1E,
    0xFE,0x12,0x22,0x22,0x1C,
    0x1C,0x22,0x22,0x22,0x04,
    0x1C,0x22,0x22,0x12,0xFE,
    0x1C,0x2A,0x2A,0x2A,0x18,
    0x10,0x7E,0x90,0x80,0x40,
    0x30,0x4A,0x4A,0x4A,0x7C,
    0xFE,0x10,0x20,0x20,0x1E,
    0x00,0x22,0xBE,0x02,0x00,
    0x04,0x02,0x22,0xBC,0x00,
    0x00,0xFE,0x08,0x14,0x22,
    0x00,0x82,0xFE,0x02,0x00,
    0x3E,0x20,0x18,0x20,0x1E,
    0x3E,0x10,0x20,0x20,0x1E,
    0x1C,0x22,0x22,0x22,0x1C,
    0x3E,0x28,0x28,0x28,0x10,
    0x10,0x28,0x28,0x18,0x3E,
    0x3E,0x10,0x20,0x20,0x10,
    0x12,0x2A,0x2A,0x2A,0x04,
    0x20,0xFC,0x22,0x02,0x04,
    0x3C,0x02,0x02,0x04,0x3E,
    0x38,0x04,0x02,0x04,0x38,
    0x3C,0x02,0x0C,0x02,0x3C,
    0x22,0x14,0x08,0x14,0x22,
    0x30,0x0A,0x0A,0x0A,0x3C,
    0x22,0x26,0x2A,0x32,0x22,
    0x00,0x10,0x6C,0x82,0x82,
    0x00,0x00,0xFE,0x00,0x00,
    0x82,0x82,0x6C,0x10,0x00,
    0x20,0x40,0x20,0x10,0x20,
};


// Some fine defines.
#define SDA     BIT2
#define SCK        BIT3
#define CS        BIT1
#define RESET    BIT0

#define LCD_DATA 0x100

void lcdClr(void);
void lcdHome(void);
void lcdRow(char r);
void lcdCol(char c);
void xputs(char* s, char line);
void xputc(char r);
void lcdSpi(int d);

int main(void)
{
    WDTCTL = WDTHOLD + WDTPW;
 

    P2SEL = 0x00;
    P2SEL2 = 0x00;
    P2DIR = SDA|SCK|CS|RESET;


    P2OUT |= RESET; // Hard reset
 
    lcdSpi(0xE2); // SW reset.
 
    lcdSpi(0xA4);
    lcdSpi(0x2F);
    lcdSpi(0xAF);
 
    lcdSpi(0xA1);    // Display flipped
 
    lcdSpi(0x80 | 16);
 
    lcdClr();


    // v--- Likely these aren't needed...And might not be working :P ---v

    lcdSpi(0xef);    // Set refresh rate
    lcdSpi(3);        // 65 Hz
 
    lcdSpi(0x3d);    // Set Charge Pump multiply factor
    lcdSpi(0);        // 5x
 
    lcdSpi(0x36); // Bias ratio 1/4
 
    lcdSpi(0xad);    // set contrast
    lcdSpi(0x20 | 20);    // 20/32
 
    lcdSpi(0xe1);
    lcdSpi(0);
 
    lcdSpi(0xa6);
 
 
 
 
 
    // Some test strings
 
    xputs(" G`Day world!",7);
    xputs("ABCDEFGHUJKLMNOP",5);
    xputs("QRSTUVWXYZ~!@#$'",4);
    xputs("abcdefghijklmnop",3);
    xputs("qrstuvwxyz%^&*()",2);
    xputs("`1234567890_+-=/",1);
    xputs("[]{}|\\<>,.?",0);
 
 
 
    // Don't need the CPU. Sleep forever.
    __bis_SR_register(LPM4_bits);

}

void lcdClr(void)
{
    int i;
    lcdHome();
    for(i=0; i<16*6*9; i++)
    {
        lcdSpi(LCD_DATA | 0x00); // fill DDRAM with Zeros
    }
}

void lcdHome(void)
{
    lcdSpi(0xB0);
    lcdSpi(0x10);
    lcdSpi(0x00);
}

void lcdRow(char r)
{
    lcdSpi(0xB0 | (r & 0x0F));
}

void lcdCol(char c)
{
    lcdSpi(0x10 | (c>>4)); // Sets the DDRAM column addr - upper 3-bit
    lcdSpi(0x00 | (c & 0x0F)); // lower 4-bit
}


void xputs(char* s, char line)
{
    lcdHome();
    lcdRow(line);
    while(*s)
    {
        xputc(*s++);
    }
}

void xputc(char r)
{
    char i;
    int d = r - ' ';
    d *= 5;
 
    for(i = 0; i< 5; i++)
    {
        lcdSpi(LCD_DATA | font_data[d++]);
    }
 
    lcdSpi(LCD_DATA | 0); // 1px gap after each letter
 
}


void lcdSpi(int d)
{
    P2OUT &= ~CS;
 
    char i;
    for(i = 0; i< 9; i++)
    {
        P2OUT &= ~SDA;
        if(d & 0x100)
            P2OUT |= SDA;
   
        P2OUT &= ~SCK;
        P2OUT |= SCK;
   
        d <<= 1;
   
    }
 
    P2OUT |= CS;
}

Schematic example

upload_2020-1-16_15-3-51.png
Eagle files here.

 

پیوست‌ها

  • lcd1202-devboard.zip
    15.8 کیلوبایت · بازدیدها: 3
  • example-main.c
    4.9 کیلوبایت · بازدیدها: 2
بالا پایین