MSP430F5529液晶SPI通信协议

发布者:zhuanshi最新更新时间:2018-10-17 来源: eefocus关键字:MSP430F5529  液晶  SPI  通信协议 手机看文章 扫描二维码
随时随地手机看文章

#include

uchar  ascii_table_8x16[95][16];

uchar  ascii_table_5x7[95][5];

void delay(int i)

{

 int j,k;

 for(j=0;j

 for(k=0;k<110;k++);

}

void transfer_command(int data1)

{

     char i;

     cs0;

     cd0;

     for(i=0;i<8;i++)

     {

          sclk0;

          if(data1&0x80) sda1;

          else sda0;

          sclk1;

          data1=data1<<=1;

     }

}

void transfer_data(int data1)

{

     char i;

     cs0;

     cd1;

     for(i=0;i<8;i++)

     {

          sclk0;

          if(data1&0x80) sda1;

          else sda0;

          sclk1;

          data1=data1<<=1;

     }

}

void LCD_init()

{

     cs0;

     reset0;        

     delay(100);

     reset1;          

     delay(20);

     transfer_command(0xe2);  

     delay(5);

     transfer_command(0x2c);  

     delay(5);

     transfer_command(0x2e);  

     delay(5);

     transfer_command(0x2f);  

     delay(5);

     transfer_command(0x23);  

     transfer_command(0x81);  

     transfer_command(0x28);  

     transfer_command(0xa2);  

     transfer_command(0xc8);  

     transfer_command(0xa0);  

     transfer_command(0x40);  

     transfer_command(0xaf);  

     cs1;

}

void lcd_address(uchar page,uchar column)

{

     cs0;

     column=column-1;                            //我们平常所说的第 1 列,在 LCD 驱动 IC 里是第 0 列。所以在这里减去1

     page=page-1;

     transfer_command(0xb0+page);

               //设置页地址。每页是 8 行。一个画面的 64 行被分成 8 个页。我们平常所说的第 1页,在 LCD 驱动 IC 里是第 0 页,所以在这里减去 1*/

     transfer_command(((column>>4)&0x0f)+0x10);     //设置列地址的高 4 位

     transfer_command(column&0x0f);                  //设置列地址的低 4 位

}

void clear_screen()

{

     unsigned char i,j;

     cs0;

     for(i=0;i<9;i++)

     {

          lcd_address(1+i,1);

          for(j=0;j<132;j++)

          {

               transfer_data(0x00);

          }

     }

     cs1;

}

//==================display a piture of 128*64 dots================

void full_display()

{

     int i,j;

     for(i=0;i<8;i++)

     {

          cs0;

          lcd_address(i+1,0);

          for(j=0;j<128;j++)

          {

               transfer_data(0xff);

          }

     }

}

void display_graphic_32x32(uchar page,uchar column,uchar *dp)

{

     uchar i,j;

     cs0;

     for(j=0;j<4;j++)

     {

          lcd_address(page+j,column);

          for (i=0;i<31;i++)

          {

               transfer_data(*dp);        

               dp++;

          }

     }

     cs1;

}

void display_graphic_16x16(uchar page,uchar column,uchar *dp)

{

     uchar i,j;

     cs0;

     for(j=0;j<2;j++)

     {

          lcd_address(page+j,column);

          for (i=0;i<16;i++)

          {

               transfer_data(*dp);        

               dp++;

          }

     }

     cs1;

}

void display_graphic_8x16(uchar page,uchar column,uchar *dp)

{

     uchar i,j;

     cs0;

     for(j=0;j<2;j++)

     {

          lcd_address(page+j,column);

          for (i=0;i<8;i++)

          {

               transfer_data(*dp);              

               dp++;

          }

     }

     cs1;

}

void display_string_8x16(uint page,uint column,uchar *text)

{

     uint i=0,j,k,n;

     cs0;

     while(text[i]>0x00)

     {

          if((text[i]>=0x20)&&(text[i]<=0x7e))

          {

               j=text[i]-0x20;

               for(n=0;n<2;n++)

               {

                    lcd_address(page+n,column);

                    for(k=0;k<8;k++)

                    {

                         transfer_data(ascii_table_8x16[j][k+8*n]);

                    }

               }

               i++;

               column+=8;

          }

          else

          i++;

     }

}

void display_string_5x7(uint page,uint column,uchar *text)

{

     uint i=0,j,k;

     cs0;

     while(text[i]>0x00)

     {

          if((text[i]>=0x20)&&(text[i]<0x7e))

          {

               j=text[i]-0x20;

               lcd_address(page,column);

               for(k=0;k<5;k++)

               {

                    transfer_data(ascii_table_5x7[j][k]);

               }

               i++;

               column+=6;

          }

          else

          i++;

     }

}

void Num_String(double change_num,int precision,char *change_array)

{

    char p[50]="",p1[50]="",k=0;

    char i=0,b=0;

    double z;

    unsigned long y;

    if(change_num<0)  //判断是否为负数

    {

        p[k]='-';

        change_num=0-change_num;

        k++;

    }

    y=(unsigned long)change_num;

    z=change_num-y;

    if(y)   //反序整数部分p1[]

    {

      while(y)

      {

           p1[b]=y+0x30;

           y/=10;

           b++;

      }

    }

    else

        p1[0]=0+0x30;

    b=strlen(p1);  //正序整数部分到p[]

    for(i=0;i

        p[k]=p1[b-1];

    for(i=0;i<50;i++)

        p1[i]=0;

    k=0;

    i=0;

    p1[k]='.';   //加小数点

    k++;

    while(i!=precision+1) //正序小数部分p1[]

    {

      z=z*10;

      y=(int)(z);

      z-=y;

      p1[k]=y+0x30;

      k++;

      i++;

    }

    p1[strlen(p1)-1]='\0';

    strcat(p,p1);

    strcat(change_array,p);

}

void display_number_8x16(uint page,uint column,double Number,int precision)

{

   char String[20]="";  //必须为空

   Num_String(Number,precision,String);   //精度7位

   //(const char*)String;

   display_string_8x16(page,column,(unsigned char*)String);   // uchar *text _____________无符号类型

}

void display_number_5x7(uint page,uint column,double Number,int precision)

{

    char String[20]="";  //必须为空

    Num_String(Number,precision,String);   //精度7位

    //(const char*)String;

    display_string_5x7(page,column,(unsigned char*)String);   // uchar *text _____________无符号类型

}

uchar  ascii_table_8x16[95][16]={

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00,

0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00,

0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00,

0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00,

0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10,

0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00,

0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00,

0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00,

0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00,

0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,

0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,

0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,

0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,

0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,

0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,

0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,

0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,

0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,

0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,

0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,

0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00,

0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00,

0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,

0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,

0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,

0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00,

0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,

0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,

0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,

0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,

0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,

0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,

0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,

0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,

0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,

0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,

0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,

0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,

0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00,

0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,

0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,

0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,

0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00,

0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,

0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,

0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,

0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,

0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,

0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00,

0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,

0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,

0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,

0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00,

0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00,

0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,

0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,

0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,

0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,

0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,

0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,

0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,

0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,

0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,

0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,

0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,

0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,

0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00,

0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,

0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,

0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,

0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,

0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00,

0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80,

0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,

0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,

0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00,

0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,

0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00,

0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00,

0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00,

0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00,

0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,

0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40,

0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,

0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00,

0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

};

uchar  ascii_table_5x7[95][5]={

0x00,0x00,0x00,0x00,0x00,//space

0x00,0x00,0x4f,0x00,0x00,//!

0x00,0x07,0x00,0x07,0x00,//"

0x14,0x7f,0x14,0x7f,0x14,//#

0x24,0x2a,0x7f,0x2a,0x12,//$

0x23,0x13,0x08,0x64,0x62,//%

0x36,0x49,0x55,0x22,0x50,//&

0x00,0x05,0x07,0x00,0x00,//]

0x00,0x1c,0x22,0x41,0x00,//(

0x00,0x41,0x22,0x1c,0x00,//)

0x14,0x08,0x3e,0x08,0x14,/

0x00,0x41,0x41,0x7f,0x00,//]

0x04,0x02,0x01,0x02,0x04,//^

0x40,0x40,0x40,0x40,0x40,//_

0x01,0x02,0x04,0x00,0x00,//`

0x20,0x54,0x54,0x54,0x78,//a

0x7f,0x48,0x48,0x48,0x30,//b

0x38,0x44,0x44,0x44,0x44,//c

0x30,0x48,0x48,0x48,0x7f,//d

0x38,0x54,0x54,0x54,0x58,//e

0x00,0x08,0x7e,0x09,0x02,//f

0x48,0x54,0x54,0x54,0x3c,//g

0x7f,0x08,0x08,0x08,0x70,//h

0x00,0x00,0x7a,0x00,0x00,//i

0x20,0x40,0x40,0x3d,0x00,//j

0x7f,0x20,0x28,0x44,0x00,//k

0x00,0x41,0x7f,0x40,0x00,//l

0x7c,0x04,0x38,0x04,0x7c,//m

0x7c,0x08,0x04,0x04,0x78,//n

0x38,0x44,0x44,0x44,0x38,//o

0x7c,0x14,0x14,0x14,0x08,//p

0x08,0x14,0x14,0x14,0x7c,//q

0x7c,0x08,0x04,0x04,0x08,//r

0x48,0x54,0x54,0x54,0x24,//s

0x04,0x04,0x3f,0x44,0x24,//t

0x3c,0x40,0x40,0x40,0x3c,//u

0x1c,0x20,0x40,0x20,0x1c,//v

0x3c,0x40,0x30,0x40,0x3c,//w

0x44,0x28,0x10,0x28,0x44,//x

0x04,0x48,0x30,0x08,0x04,//y

0x44,0x64,0x54,0x4c,0x44,//z

0x08,0x36,0x41,0x41,0x00,//{

0x00,0x00,0x77,0x00,0x00,//|

0x00,0x41,0x41,0x36,0x08,//}

0x04,0x02,0x02,0x02,0x01,//~

};

extern uchar  zhuang1[]={

0x08,0x30,0x00,0xFF,0x20,0x20,0x20,0x20,0xFF,0x20,0xE1,0x26,0x2C,0x20,0x20,0x00,

0x04,0x02,0x01,0xFF,0x40,0x20,0x18,0x07,0x00,0x00,0x03,0x0C,0x30,0x60,0x20,0x00};

extern uchar  zhuang2[]={

0x00,0x08,0x30,0x00,0xFF,0x20,0x20,0x20,

0x20,0xFF,0x20,0x20,0x22,0x2C,0x20,0x00,

0x04,0x04,0x02,0x01,0xFF,0x80,0x40,0x30,

0x0E,0x01,0x06,0x18,0x20,0x40,0x80,0x00,

};


关键字:MSP430F5529  液晶  SPI  通信协议 引用地址:MSP430F5529液晶SPI通信协议

上一篇:msp430f5419/38学习笔记之USCI:UART模式
下一篇:基于MSP430F5529的金属循迹小车

推荐阅读最新更新时间:2024-03-16 16:16

面板价反弹,液晶监视器品牌商积极为Q4需求备货
  根据集邦科技(TRENDFORCE)旗下研究部门 WitsView 新发布的全球前十大液晶监视器品牌商10月出货调查显示,随着液晶监视器面板价格呈现触底反弹态势,品牌厂商对于面板跌价损失风险隐忧已然消失,厂商及通路商之策略,已转为积极着手为欧美第四季需求备货。   其中以欧洲地区通路厂商拉货最为积极,原因除了为第四季需求备货外,欧元持续升值使得欧洲区厂商进货成本相对低,因而更增进欧洲通路商拉货力道。因此,2010年10月份出货总量约达1,242万台,相较于9月份MoM持续增加1.2%。因此,也带动10月份全球前10大SI出货量MoM稳健增加1.5%,出货总量达1,406万台,延续9月出货动能。   WitsView认为,目
[半导体设计/制造]
面板价反弹,<font color='red'>液晶</font>监视器品牌商积极为Q4需求备货
【STM32学习笔记】USART波特率 vs SPI速率
上一篇学习笔记介绍了USART硬件流控,相信大家理解了为什么要做流控,硬件流控与软件流控的区别,以及硬件流控如何处理。 本篇文章将与大家探讨USART波特率 vs SPI速率。这里提出一个问题,为什么USART的波特率是内核时钟的1/8或者1/16,而SPI最快的频率可以是内核时钟的1/2。 请大家带着这个问题来阅读本文。 串口和SPI内部时钟 在回答上面问题之前,需要先了解STM32内部时钟的概念,尤其是串口和SPI的内部时钟。 STM32里包含有系统时钟、AHB时钟和APB时钟。APB时钟来源于AHB,AHB时钟来源于系统时钟。 从上图中可以看出,时钟就像流水一样,从时钟源汇聚到系统时钟上,再从系统时
[单片机]
三星拟在中国投资DRAM芯片厂 推动液晶面板
  据国外媒体报道称,显示面板业界人士称,三星电子计划在中国投资DRAM工厂,以加速中国政府对其液晶面板投资计划的审批。   上述消息人士称,三星电子不仅要在中国投资DRAM工厂,还愿意放弃中国政府对其液晶面板工厂项目的补贴。   但是,中国台湾地区的DRAM芯片厂商对此传言持怀疑态度,称三星电子近期不大可能在中国投资DRAM工厂。   上述消息人士指出,韩国面板厂商担心,台湾地区竞争对手和大陆地区电视厂商的密切合作关系将削弱它们在中国市场的竞争力。   业内人士称,三星电子还考虑在韩国建设第十一代面板工厂,扩大对竞争对手的领先优势,巩固作为全球第一大液晶面板厂商的地位。   友达光电已经向台湾地区政府递交了在大陆地区建
[半导体设计/制造]
单片机控制TFT液晶屏显示数字
单片机控制TFT液晶屏显示数字,此工程的硬件部分如下 单片机部分 液晶电路 接下来就是软件部分程序的编写,我们先来看main函数,main函数如下 main函数里做了3件事,第一件就是对TFT液晶屏的初始化,包括对TFT液晶屏接口的初始化和驱动芯片ILI9341的初始化,这个不是我们研究的重点; 第二件就是设置液晶屏的背景色,代码如下, 屏幕分辨率是320X240的,通过改变color的值,可以给屏幕设置不同的背景色; 第三件就是写入我们要写的数字到液晶屏中去,此部分代码如下, 此处的num=num-‘ ’ 要注意理解,' '对应的ASCII码为32,所以传入的num值必须至少大于或
[单片机]
单片机控制TFT<font color='red'>液晶</font>屏显示数字
MSP430F249—SPI主从机通信
1。主机发送读取 /****************************************************************** ** ** File : SPI.c | Master Send | ** Version : 1.0 ** Description : SPI Master Send and Receive ** Author : LightWu ** Date : 2013-4-16
[单片机]
电脑和液晶拼接屏连接使用方法简介
液晶拼接市场发展突飞猛进,在各行业已被广泛使用,一般情况下, 液晶拼接屏 与 电脑 相连合合并使用的越来越多,两者连接使用也能起到很重要的作用,很多企业单位安装液晶拼接屏后,比如在开会的时候,一些文件要用液晶拼接屏显示出来,还有培训的时候,特别是人多的地方,那些培训资料得使用大屏幕展现出来,还有学校里的多媒体教室,讲师在给同学们讲课的时候课件用大屏幕展现出来等等,这些都是必须将电脑和液晶拼接屏连接使用。为此,我们给大家总结了部分的连接方法供大家参考授用。 硬件连接方式 液晶拼接屏的连接首先是硬件的连接,液晶拼接大屏幕如何才能与电脑相连呢?对液晶拼接屏比较了解的人应该都知道,液晶拼接屏是由多块小屏幕组合而成的,液晶拼接屏后面
[嵌入式]
液晶面板市场数据发布:台湾群创占比超三星
    7月28日上午消息,DisplaySearch液晶面板出货量数据发布,在供应电视机的大尺寸液晶面板出货量方面,第一季度出货量为1亿6800万片,第二季度出货量增加至1亿8000万片,总量呈小幅增长趋势。   在各品牌生产商的大尺寸液晶面板市场占比方面,LG Display第二季度出货量达4544万片,占市场总量25.2%,连续19个季度位居第一;台湾群创占比20.2%,三星Display占比18.7%,分列二、三位,这是台湾群创在大尺寸液晶面板出货量方面超越三星升至第二位。第四位则被台湾友达以16%的市占率夺得,大陆面板厂京东(29.03, -0.02, -0.07%)方市占率升至6.9%,位列第五。   消息显示
[家用电子]
单片机与液晶显示器的接口应用介绍
引言   液晶显示器(LCD)具有工作电压低、微功耗、显示信息量大和接口方便等优点,现在已被广泛应用于计算机和数字式仪表等领域,成为测量结果显示和人机对话的重要工具。液晶显示器按其功能可分为三类:笔段式液晶显示器、字符点阵式液晶显示器和图形点阵式液晶显示器。前两种可显示数字、字符和符号等,而图形点阵式液晶显示器还可以显示汉字和任意图形,达到图文并茂的效果,其应用越来越广泛。   GTG240128液晶显示模块:   1 模块特点   GTG240128图形点阵式液晶显示器的点阵的大小为240×128,带背光功能。内置1片T6963C液晶显示控制器和5片KS0086驱动器。该液晶显示模块具有如下特点。   ● 8位并行总线
[工业控制]
小广播
添点儿料...
无论热点新闻、行业分析、技术干货……
设计资源 培训 开发板 精华推荐

最新单片机文章
何立民专栏 单片机及嵌入式宝典

北京航空航天大学教授,20余年来致力于单片机与嵌入式系统推广工作。

换一换 更多 相关热搜器件
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved