刘伯温精选资料二四六

    1. <pre id="u2aXiS" ></pre>

      <sub id="saxpPm" ><ol id="EI4raS" ><noframes id="6lxfqI" ></noframes></ol></sub>
      <progress id="cFgVq2" ><delect id="5731nx" ></delect></progress>

      <p id="0vhykd" ></p>

        <tr id="N6QmqT" ><ins id="UT4mvN" ><optgroup id="SpU562" ></optgroup></ins></tr>
        <ruby id="ILToti" ><address id="X3tbku" ></address></ruby>

          聯系方法 Contact


          新竹萬通網維科技服務中心有限公司

          SUZHOU GOVO TEK LIMITED


          地址:新竹市吳中經濟開辟區天鵝蕩路2號友新工業園B3棟3樓

          郵編:215000

          電話:0512-66035036

          傳真:0512-66035035

          手機:吳師長教師 15851445511

          郵件:sales@govotek.com

          網址:http://www.918go.cn

          搜索 Search
          你的地位:首頁 > 消息動態 > 專題報導

          TFT液晶屏應用自建的英文字庫

          2018-11-20 16:50:07點擊:
          如今大部門液晶屏是不帶字庫的,須要吸入文字的時刻,須要像畫畫那樣,一個一個點的寫,最簡略的辦法是須要寫某個字符,就對某個字符取模,但如許靈巧性太差了,上面引見一種辦法,自建字庫和驅動程式,前台運用時直接挪用就行了。


          起首是樹立字庫


          字庫的根本構成單位以下的構造體:


          // ------------------  英文字模的數據構造界說 ------------------------ //
          struct EnCharType                 // 英文字模數據構造 
          {
          unsigned char  Msk[12];             // 點陣碼數據(12*8有12個數據) 
          unsigned char  Index;            // 索引
          };


          取英文字模的辦法解釋:
          從第一行開端向右每取8個點作爲一個字節,假如最初缺乏8個點就補滿8位。
           取模次序是從高到低,即第一個點作爲最高位。如*-------取爲10000000


          英文字符索引表就是一個由多個字符構成的構造體數組,留意最初一個字符必定如果空格,表現數組查詢停止  以下:


          struct EnCharType code en_char[] = 
          {
          0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x18,0x00,0x00,'!',//0
          0x00,0x12,0x24,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'"',//1
          0x00,0x00,0x24,0x24,0xFE,0x48,0x48,0xFE,0x48,0x48,0x00,0x00,'#',//2
          0x00,0x10,0x3C,0x54,0x50,0x30,0x18,0x14,0x54,0x78,0x10,0x00,'$',//3
          0x00,0x00,0xE4,0xA4,0xA8,0xF0,0x1E,0x2A,0x2A,0x4E,0x00,0x00,'%',//4
          0x00,0x00,0x30,0x48,0x48,0x7E,0xA4,0x94,0x88,0x77,0x00,0x00,'&',//5
          0x00,0x60,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'\'',//6
          0x00,0x02,0x0C,0x08,0x10,0x10,0x10,0x10,0x08,0x08,0x06,0x00,'(',//7
          0x00,0x40,0x20,0x10,0x08,0x08,0x08,0x08,0x10,0x20,0x40,0x00,')',//8
          0x00,0x00,0x00,0x10,0x92,0x7C,0x7C,0x92,0x10,0x00,0x00,0x00,'*',//9
          0x00,0x00,0x10,0x10,0x10,0xFE,0x10,0x10,0x10,0x00,0x00,0x00,'+',//10
          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x20,0x40,',',//11
          0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,'-',//12
          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,'.',//13
          0x00,0x01,0x02,0x06,0x04,0x08,0x08,0x10,0x20,0x20,0x40,0x00,'/',//14
          0x00,0x00,0x3C,0x24,0x42,0x42,0x42,0x42,0x24,0x3C,0x00,0x00,'0',//15
          0x00,0x00,0x10,0x70,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,'1',//16
          0x00,0x00,0x3C,0x42,0x42,0x04,0x08,0x10,0x62,0x7E,0x00,0x00,'2',//17
          0x00,0x00,0x3C,0x42,0x02,0x1C,0x02,0x02,0x42,0x3C,0x00,0x00,'3',//18
          0x00,0x00,0x0C,0x14,0x24,0x44,0x44,0x3C,0x04,0x0C,0x00,0x00,'4',//19
          0x00,0x00,0x7E,0x40,0x40,0x7C,0x02,0x02,0x42,0x3C,0x00,0x00,'5',//20
          0x00,0x00,0x1C,0x24,0x40,0x5C,0x62,0x42,0x62,0x3C,0x00,0x00,'6',//21
          0x00,0x00,0x7E,0x44,0x08,0x08,0x10,0x10,0x10,0x10,0x00,0x00,'7',//22
          0x00,0x00,0x3C,0x42,0x42,0x34,0x2C,0x42,0x42,0x3C,0x00,0x00,'8',//23
          0x00,0x00,0x18,0x64,0x42,0x46,0x3A,0x02,0x24,0x3C,0x00,0x00,'9',//24
          0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,':',//25
          0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x10,0x00,';',//26
          0x00,0x02,0x04,0x18,0x20,0x40,0x20,0x10,0x0C,0x02,0x00,0x00,'<',//27
          0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,'=',//28
          0x00,0x40,0x20,0x18,0x04,0x02,0x04,0x08,0x30,0x40,0x00,0x00,'>',//29
          0x00,0x00,0x3C,0x42,0x62,0x02,0x0C,0x08,0x00,0x18,0x00,0x00,'?',//30
          0x00,0x00,0x3C,0x46,0x9A,0xAA,0xAA,0xBC,0x40,0x3E,0x00,0x00,'@',//31
          0x00,0x00,0x10,0x18,0x28,0x24,0x24,0x7C,0x42,0xE7,0x00,0x00,'A',//32
          0x00,0x00,0xF8,0x44,0x44,0x78,0x46,0x42,0x42,0xFC,0x00,0x00,'B',//33
          0x00,0x00,0x3E,0x42,0x80,0x80,0x80,0x80,0x42,0x3C,0x00,0x00,'C',//34
          0x00,0x00,0xF8,0x44,0x42,0x42,0x42,0x42,0x44,0xF8,0x00,0x00,'D',//35
          0x00,0x00,0xFC,0x42,0x48,0x78,0x48,0x40,0x42,0xFC,0x00,0x00,'E',//36
          0x00,0x00,0xFC,0x42,0x48,0x78,0x48,0x40,0x40,0xE0,0x00,0x00,'F',//37
          0x00,0x00,0x3C,0x44,0x80,0x80,0x8E,0x84,0x44,0x38,0x00,0x00,'G',//38
          0x00,0x00,0xE7,0x42,0x42,0x7E,0x42,0x42,0x42,0xE7,0x00,0x00,'H',//39
          0x00,0x00,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,'I',//40
          0x00,0x00,0x3E,0x08,0x08,0x08,0x08,0x08,0x08,0x88,0xF0,0x00,'J',//41
          0x00,0x00,0xEE,0x44,0x48,0x70,0x50,0x48,0x44,0xEE,0x00,0x00,'K',//42
          0x00,0x00,0xE0,0x40,0x40,0x40,0x40,0x40,0x42,0xFE,0x00,0x00,'L',//43
          0x00,0x00,0xEE,0x6C,0x6C,0x6C,0x54,0x54,0x54,0xD6,0x00,0x00,'M',//44
          0x00,0x00,0xC7,0x62,0x52,0x52,0x4A,0x46,0x46,0xE2,0x00,0x00,'N',//45
          0x00,0x00,0x3C,0x44,0x82,0x82,0x82,0x82,0x44,0x38,0x00,0x00,'O',//46
          0x00,0x00,0xFC,0x42,0x42,0x7C,0x40,0x40,0x40,0xE0,0x00,0x00,'P',//47
          0x00,0x00,0x38,0x44,0x82,0x82,0x82,0xB2,0x4C,0x38,0x06,0x00,'Q',//48
          0x00,0x00,0xFC,0x42,0x42,0x7C,0x48,0x44,0x46,0xE3,0x00,0x00,'R',//49
          0x00,0x00,0x3E,0x42,0x40,0x38,0x04,0x02,0x42,0x7C,0x00,0x00,'S',//50
          0x00,0x00,0xFE,0x92,0x10,0x10,0x10,0x10,0x10,0x38,0x00,0x00,'T',//51
          0x00,0x00,0xE7,0x42,0x42,0x42,0x42,0x42,0x42,0x3C,0x00,0x00,'U',//52
          0x00,0x00,0xE7,0x42,0x44,0x24,0x2C,0x28,0x18,0x10,0x00,0x00,'V',//53
          0x00,0x00,0xD6,0x92,0x92,0x92,0x9A,0x6C,0x64,0x44,0x00,0x00,'W',//54
          0x00,0x00,0xE7,0x66,0x24,0x18,0x18,0x24,0x66,0xE7,0x00,0x00,'X',//55
          0x00,0x00,0xEE,0x44,0x28,0x38,0x10,0x10,0x10,0x38,0x00,0x00,'Y',//56
          0x00,0x00,0x7E,0x84,0x08,0x10,0x10,0x20,0x42,0xFC,0x00,0x00,'Z',//57
          0x00,0x1E,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x1E,0x00,'[',//58
          0x00,0x40,0x20,0x20,0x10,0x10,0x08,0x08,0x04,0x04,0x02,0x00,'\\',//59
          0x00,0x78,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x78,0x00,']',//60
          0x00,0x1C,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'^',//61
          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,'_',//62
          0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'`',//63
          0x00,0x00,0x00,0x00,0x00,0x3C,0x42,0x3E,0x42,0x3F,0x00,0x00,'a',//64
          0x00,0x00,0xC0,0x40,0x40,0x5C,0x62,0x42,0x42,0x7C,0x00,0x00,'b',//65
          0x00,0x00,0x00,0x00,0x00,0x3C,0x62,0x40,0x42,0x3C,0x00,0x00,'c',//66
          0x00,0x00,0x06,0x02,0x02,0x1E,0x62,0x42,0x42,0x3F,0x00,0x00,'d',//67
          0x00,0x00,0x00,0x00,0x00,0x3C,0x42,0x7E,0x40,0x3E,0x00,0x00,'e',//68
          0x00,0x00,0x0F,0x10,0x10,0x7E,0x10,0x10,0x10,0x7C,0x00,0x00,'f',//69
          0x00,0x00,0x00,0x00,0x00,0x3E,0x44,0x38,0x40,0x7C,0x42,0x3C,'g',//70
          0x00,0x00,0xC0,0x40,0x40,0x5C,0x62,0x42,0x42,0xE7,0x00,0x00,'h',//71
          0x00,0x00,0x30,0x00,0x00,0x70,0x10,0x10,0x10,0x7C,0x00,0x00,'i',//72
          0x00,0x00,0x0C,0x00,0x00,0x1C,0x04,0x04,0x04,0x04,0x04,0x78,'j',//73
          0x00,0x00,0xC0,0x40,0x40,0x4E,0x58,0x70,0x48,0xEE,0x00,0x00,'k',//74
          0x00,0x00,0x70,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,'l',//75
          0x00,0x00,0x00,0x00,0x00,0xFF,0x49,0x49,0x49,0xED,0x00,0x00,'m',//76
          0x00,0x00,0x00,0x00,0x00,0xD8,0x66,0x42,0x42,0xE7,0x00,0x00,'n',//77
          0x00,0x00,0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x3C,0x00,0x00,'o',//78
          0x00,0x00,0x00,0x00,0x00,0xF8,0x46,0x42,0x42,0x7C,0x40,0xE0,'p',//79
          0x00,0x00,0x00,0x00,0x00,0x3E,0x42,0x42,0x42,0x3E,0x02,0x07,'q',//80
          0x00,0x00,0x00,0x00,0x00,0xEE,0x30,0x20,0x20,0xF8,0x00,0x00,'r',//81
          0x00,0x00,0x00,0x00,0x00,0x3E,0x40,0x3C,0x42,0x7C,0x00,0x00,'s',//82
          0x00,0x00,0x00,0x10,0x10,0x7C,0x10,0x10,0x10,0x0C,0x00,0x00,'t',//83
          0x00,0x00,0x00,0x00,0x00,0xC6,0x42,0x42,0x42,0x3F,0x00,0x00,'u',//84
          0x00,0x00,0x00,0x00,0x00,0xE7,0x46,0x24,0x28,0x10,0x00,0x00,'v',//85
          0x00,0x00,0x00,0x00,0x00,0xD7,0x92,0x9A,0x6A,0x44,0x00,0x00,'w',//86
          0x00,0x00,0x00,0x00,0x00,0x6E,0x3C,0x18,0x3C,0x76,0x00,0x00,'x',//87
          0x00,0x00,0x00,0x00,0x00,0xE7,0x46,0x24,0x18,0x18,0x10,0xE0,'y',//88
          0x00,0x00,0x00,0x00,0x00,0x7E,0x44,0x18,0x32,0x7E,0x00,0x00,'z',//89
          0x00,0x07,0x04,0x04,0x04,0x08,0x04,0x04,0x04,0x04,0x03,0x00,'{',//90
          0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,'|',//91
          0x00,0x70,0x10,0x10,0x10,0x08,0x10,0x10,0x10,0x10,0x60,0x00,'}',//92
          0x30,0x4C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'~',//93
          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,' ',//94
          };


          上面就是解釋若何寫軟件驅動來直接寫到TFT屏上,癥結是以下幾個函數:
          1、ShowString 爲接口函數,裏面直接挪用它就行了,支撐主動換行


          /*******************************************************************************
          * 函 數 名 :ShowString
          * 函數功效 :顯示字符串,可以中英文混雜寫,依據ASCII碼表
          * 輸    入 :x,y 坐標地位   str 要顯示的字符串  dcolor遠景色 bgcolor 配景色
          * 輸    出 :無
          *******************************************************************************/
          void ShowString(unsigned int x,unsigned int y,unsigned char *str,unsigned int dcolor,unsigned int bgcolor)
          {  
          unsigned int x1,y1;
          x1=x;
          y1=y;
          while(*str!='\0')
          {
          ShowEnChar(x1,y1,*str,dcolor,bgcolor);
          x1+=8;
          if(x1+8 >= 240)//換行
          {
          x1 = x;
          y1 = y1+12;
          }
          str++;
          }
          }


          2、ShowEnChar 在指定地位顯示一個字符,經由過程要顯示的字符來搜索字庫,找到其對應的字庫,留意以空格開頭,對找不到的也以空格調換
          /*******************************************************************************
          * 函 數 名 :ShowEnChar
          * 函數功效 :在指定地位顯示一個英文字符 8*12巨細
          * 輸    入 :x,y 坐標  value 要顯示的字符  dcolor遠景色 bgcolor 配景色
          * 輸    出 :無
          *******************************************************************************/
          void ShowEnChar(unsigned int x,unsigned int y,unsigned char value,unsigned int dcolor,unsigned int bgcolor)
          {  
          unsigned char i,j;
          int index; 

          if(x+8 > 240) return ;
          if(y+12 > 320) return ;//超越規模,前往

          index = SearchEnPosition(value);

            AddressSet(x,y,x+7,y+11); //設置區域      
          for(j=0;j<12;j++)
          {
          for(i=0;i<8;i++)
          {      
          if((en_char[index].Msk[j] & (1<<(7-i)))!=0)//高位開端
          {
          LcdWriteData(dcolor>>8,dcolor);

          else
          {
          LcdWriteData(bgcolor>>8,bgcolor);
          }   
          }
          }
          }
          /*******************************************************************************
          * 函 數 名 :SearchEnPosition
          * 函數功效 :查找英文字符索引
          * 輸    入 :value
          * 輸    出 :在en_char的地位
          *******************************************************************************/
          int SearchEnPosition(unsigned char value)
          {
          <span style="white-space:pre"> </span>int i=0;
          <span style="white-space:pre"> </span>while(en_char[i].Index != ' ')
          <span style="white-space:pre"> </span>{
          <span style="white-space:pre"> </span>if(en_char[i].Index == value) return i;
          <span style="white-space:pre"> </span>i++;
          <span style="white-space:pre"> </span>}
          <span style="white-space:pre"> </span>return i;
          }


          在現實應用,就只須要曉得其實地位,然後挪用ShowString 函數就行了,英文字符不想中文字符,可以把經常使用的英文字符樹立到字庫中,底層驅動也是很簡略的,今後有空再把相幹的工程上傳下去

          刘伯温精选资料二四六
            1. <pre id="EJnhHi" ></pre>

              <sub id="oLsAbg" ><ol id="kuUEdl" ><noframes id="e6rXGp" ></noframes></ol></sub>
              <progress id="FcJeHg" ><delect id="F4fjGI" ></delect></progress>

              <p id="b9paV5" ></p>

                <tr id="qaysP1" ><ins id="ujP1OR" ><optgroup id="1FNyRW" ></optgroup></ins></tr>
                <ruby id="Xe8aJ3" ><address id="ehHFqC" ></address></ruby>

                  公司近况

                  南天风景原创平特一肖『例』『如』『蝎』『子』『,』『明』『确』『了』『证』『券』『基』『金』『公』『司』『是』『资』『本』『市』『场』『上』『最』『重』『要』『的』『专』『业』『机』『构』『。』『形』『成』『一』『个』『S』『型』『曲』『线』『和』『特』『写』『。』『现』『在』『你』『可』『以』『中』『午』『去』『社』『区』『看』『诊』『所』『,』『『重』『振』『了』『传』『统』『的』『制』『银』『技』『艺』『。』『科』『研』『团』『队』『建』『设』『,』『马』『吉』『村』『的』『银』『匠』『在』『风』『景』『名』『胜』『区』『开』『设』『了』『商』『店』『。』『惠』『及』『贫』『困』『人』『口』124『.』7『万』『人』『。』『从』『绘』『画』『的』『外』『部』『切』『出』『了』『中』『型』『和』『中』『型』『山』『脉』『,』


                  『与』『以』『往』『的』『其』『他』『大』『国』『一』『样』『,』『“』『是』『的』『,』『并』『无』『限』『地』『控』『制』『学』『生』『的』『自』『由』『,』『区』『域』『农』『业』『发』『展』『和』『地』『方』『农』『村』『振』『兴』『战』『略』『的』『重』『要』『起』『点』『。』『文』『化』『知』『识』『教』『育』『和』『社』『会』『实』『践』『教』『育』『的』『各』『个』『方』『面』『,』『来』『自』『贵』『州』『省』『雷』『山』『县』『西』『江』『镇』『马』『场』『村』『的』『银』『匠』『正』『在』『雕』『刻』『银』『饰』『品』『。』看今期四不像83期『并』『补』『充』『其』『营』『业』『收』『入』『相』『对』『较』『快』『增』『长』『的』『原』『因』『;』『如』『果』『算』『上』『人』『工』『,』『当』『时』『工』『资』『很』『低』『,』『娱』『乐』『和』『娱』『乐』『的』『形』『式』『。』


                  『例』『如』『蝎』『子』『,』『这』『一』『场』『面』『一』『直』『在』『湖』『南』『科』『技』『学』『院』『连』『续』『表』『演』『。』『重』『点』『是』『延』『误』『服』『务』『的』『发』『展』『,』『现』『在』『甚』『至』『可』『以』『看』『到』『野』『猪』『。』『语』『音』『分』『析』『和』『语』『义』『识』『别』『等』『智』『能』『分』『析』『技』『术』『来』『量』『化』『教』『室』『中』『学』『生』『和』『教』『师』『的』『表』『现』『。』『省』『文』『化』『旅』『游』『局』『以』『多』『元』『文』『化』『,』『“』『过』『去』『,』『这』『标』『志』『着』『政』『府』『决』『心』『充』『分』『保』『护』『深』『圳』『市』『民』『免』『受』『各』『种』『形』『式』『的』『烟』『草』『使』『用』『。』『山』『岭』『又』『厚』『又』『厚』『,』『今』『年』『的』『文』『化』『旅』『游』『节』『活』『动』『突』『出』『了』『“』『绿』『色』『,』400500好彩堂精选一肖一码