PIC Vietnam

Go Back   PIC Vietnam > Thành Viên

Tài trợ cho PIC Vietnam
Trang chủ Đăng Kí Hỏi/Ðáp Thành Viên Lịch Bài Trong Ngày Vi điều khiển

laiquangtuyen laiquangtuyen is offline

Đệ tử 4 túi

Visitor Messages

Showing Visitor Messages 1 to 5 of 5
  1. cunmeo
    08-11-2013 12:58 PM
    cunmeo
    Cùng tải game về cho dế cưng của bạn trên trang
    tai game vui mien phi, với những game dành cho điện thoại Java nhưtai game fifa, tai game viet hoa, tai game thoi trang, Và phần mềm Chat
    tai ola
  2. viptruyen
    08-07-2013 01:12 AM
    viptruyen
    trong cuộc sống luôn luôn tìm tòi những cái mới dặc biệt là vấn đề nhậy cảm như truyen sex thì nó lại mang lại nguồn cảm hứng mới cho mọi người
  3. thanhsonvn90
    17-09-2011 07:05 PM
    thanhsonvn90
    Anh ơi. Em đang nghiên cứu về Pic và ethernet. Thấy anh có mấy cái clip thú vị quá.
    Anh sử dụng trình biên dịch gì vậy. CCs có hỗ trợ hàm cho mấy cái này không. Web thì anh thiết kế bằng gì. Nếu có thể anh có thề gửi em ít tài liệu ví dụ để em tham khảo vào mail :thanhsonvn90@yahoo.com đươc không anh? Cảm ơn anh
  4. tranpic
    12-04-2010 09:23 AM
    tranpic
    chào anh em thấy anh làm các tft hay quá. anh cho em hỏi 1 tí về nó đi.
    liệu mình có thể dùng 8952 để điều khiển nó hiển thị đựoc ko.
    em viết thế này mà nó ko có màu mè j hết (nick yahoo: bansequen mong anh giúp với cảm ơn anh nha)
    #define DBH P2
    #define DBL P0
    #define ROW 320
    #define COL 240

    sbit CS0 = P3^0;
    sbit RST = P3^7;
    sbit RS = P3^1;
    sbit WR0 = P3^2;
    sbit RD0 = P3^3;
    sbit LI = P3^6;



    //----------------------------------------------------------------------------
    void Delay(unsigned int dly);
    void ResetChip(void);
    void WaitKey(void);

    void WriteComm(unsigned int i);
    void WriteData(unsigned int i);
    void DispColor(unsigned int rgb);

    void InitLCD(void);
    /************************************************** ***************************
    FUNCTION DIFINE
    ************************************************** ***************************/
    void WriteComm(unsigned int i)
    {
    CS0=0;
    RD0=1;
    RS=0;

    DBL=i;
    DBH=i>>8;

    WR0=0;
    WR0=1;
    CS0=1;
    }
    void WriteData(unsigned int i)
    {
    CS0=0;
    RD0=1;
    RS=1;

    DBL=i;
    DBH=i>>8;

    WR0=0;
    WR0=1;
    CS0=1;
    }

    void BlockWrite(unsigned int Xstart,unsigned int Xend,unsigned int Ystart,unsigned int Yend)
    {
    WriteComm(0x0050);WriteData(Xstart); // WINDOW ADDRESS
    WriteComm(0x0051);WriteData(Xend);

    WriteComm(0x0052);WriteData(Ystart);
    WriteComm(0x0053);WriteData(Yend);

    WriteComm(0x0020); //HS
    WriteData(Xstart);

    WriteComm(0x0021); //VS
    WriteData(Ystart);

    WriteComm(0x0022); // WRITE RAM
    }

    void Delay(unsigned int dly)
    {
    unsigned int i,j;

    for(i=0;i<dly;i++)
    {
    for(j=0;j<1000;j++);
    }
    }

    void ResetChip(void)
    {
    P0=0xff; P1=0xff;P2=0xff;P3=0xff;

    RST = 1;
    Delay(50);
    RST = 0;
    Delay(300);
    RST = 1;
    Delay(50);
    }

    void DispColor(unsigned int rgb)
    {
    unsigned int i,j;

    BlockWrite(0,COL-1,0,ROW-1);

    CS0=0;
    RD0=1;
    RS=1;

    DBH=rgb>>8;
    DBL=rgb;

    for(i=0;i<ROW;i++)
    for(j=0;j<COL;j++)
    {
    WR0=0;
    WR0=1;
    }
    CS0=1;
    }


    void InitLCD(void)
    {

    //FOR WTK2.8,ILI9325
    WriteComm(0x00E3);WriteData(0x3008);
    WriteComm(0x00E7);WriteData(0x0012);
    WriteComm(0x00EF);WriteData(0x1231);

    WriteComm(0x0000);WriteData(0x0100);
    WriteComm(0x0001);WriteData(0x0100);
    WriteComm(0x0002);WriteData(0x0700);
    WriteComm(0x0003);WriteData(0x1030);
    WriteComm(0x0004);WriteData(0x0000);
    WriteComm(0x0008);WriteData(0x0207);
    WriteComm(0x0009);WriteData(0x0000);
    WriteComm(0x000A);WriteData(0x0000);
    WriteComm(0x000C);WriteData(0x0000);
    WriteComm(0x000D);WriteData(0x0000);
    WriteComm(0x000F);WriteData(0x0000);

    WriteComm(0x0010);WriteData(0x0000);
    WriteComm(0x0011);WriteData(0x0007);
    WriteComm(0x0012);WriteData(0x0000);
    WriteComm(0x0013);WriteData(0x0000);

    Delay(200);

    WriteComm(0x0010);WriteData(0x1400);
    WriteComm(0x0011);WriteData(0x0227);
    Delay(100);
    WriteComm(0x0012);WriteData(0x001a);
    Delay(100);
    WriteComm(0x0013);WriteData(0x1400);
    WriteComm(0x0029);WriteData(0x0016);
    WriteComm(0x0029);WriteData(0x0001);
    Delay(100);

    WriteComm(0x0020);WriteData(0x0000);
    WriteComm(0x0021);WriteData(0x0000);

    WriteComm(0x0030);WriteData(0x0000);
    WriteComm(0x0031);WriteData(0x0505);
    WriteComm(0x0032);WriteData(0x0007);
    WriteComm(0x0035);WriteData(0x0502);
    WriteComm(0x0036);WriteData(0x0807);
    WriteComm(0x0037);WriteData(0x0007);
    WriteComm(0x0038);WriteData(0x0202);
    WriteComm(0x0039);WriteData(0x0707);
    WriteComm(0x003C);WriteData(0x0205);
    WriteComm(0x003D);WriteData(0x0608);

    WriteComm(0x0050);WriteData(0x0000);
    WriteComm(0x0051);WriteData(0x00ef);
    WriteComm(0x0052);WriteData(0x0000);
    WriteComm(0x0053);WriteData(0x013f);

    WriteComm(0x0060);WriteData(0xA700);
    WriteComm(0x0061);WriteData(0x0001);
    WriteComm(0x006a);WriteData(0x0000);

    WriteComm(0x0080);WriteData(0x0000);
    WriteComm(0x0081);WriteData(0x0000);
    WriteComm(0x0082);WriteData(0x0000);
    WriteComm(0x0083);WriteData(0x0000);
    WriteComm(0x0084);WriteData(0x0000);
    WriteComm(0x0085);WriteData(0x0000);

    WriteComm(0x0090);WriteData(0x0010);
    WriteComm(0x0092);WriteData(0x0600);
    WriteComm(0x0093);WriteData(0x0003);
    WriteComm(0x0095);WriteData(0x0110);
    WriteComm(0x0097);WriteData(0x0000);
    WriteComm(0x0098);WriteData(0x0000);

    WriteComm(0x0007);WriteData(0x0133);
    Delay(100);
    WriteComm(0x0022);
    }

    /************************************************** ***************************
    MAIN TEST PROGRAM
    ************************************************** ***************************/
    void main(void)
    {
    ResetChip();
    InitLCD();

    while(1)
    {
    DispColor(0xffff); //white
    LI=0;
    Delay(500);
    LI=1;

    DispColor(0xf800); //red
    LI=0;
    Delay(500);
    LI=1;

    DispColor(0x001f); //blue
    LI=0;
    Delay(500);
    LI=1;

    DispColor(0x0000); //black
    LI=0;
    Delay(500);
    LI=1;


    }

    }
  5. chinhphuc123456
    29-12-2009 01:51 PM
    chinhphuc123456
    may gui cho tao cai trang gi ma toan may e bi "e" ko vay
    hjjh,may lam mót tren trang wed nay ah,ghe nhi,tao moi bit trang nay do,moi vo ne, co gi dau, chan chet me

About Me

  • Signature
    LẠI QUANG TUYẾN
    Phone: 0906.189.269

Statistics

Tổng số bai
Visitor Messages
General Information
  • Lần cuối: 29-08-2014 01:30 AM
  • Tham gia ngày: 22-07-2007
  • Ðã giới thiệu: 1

Thông Tin Liên Lạc

Chat
Send an Instant Message to laiquangtuyen Using...
Home Page
http://machdienlythu.com
This Page
http://picvietnam.com/forum/member.php?u=6867

Múi giờ GMT. Hiện tại là 01:12 AM.


Được sáng lập bởi Đoàn Hiệp
Powered by vBulletin®
Page copy protected against web site content infringement by Copyscape
Copyright © PIC Vietnam