FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    MCU 12864 C program

     

    "单片机12864摄氏度程序-MSP430与12864连接驱动程序(KS0108) 包括“MSP430x14x.h”//标准方程#包括“math.h”#包括“stdlib.h”#包括“stdio.h”#包括“string.h”#包括“ctype.h”#包括“HZTable.h”#包括“asci816.h”#定义uint unsigned int#定义uchar unsigned intchar//******************************************************定义RS比特0定义RW比特1定义E比特2定义CS1比特3定义CS2比特4定义RST比特5定义EL比特6//背光//数据线:p4口 ,控制线:p5口//**********************************************乌查尔克拉迪1号,克拉迪2号;uchar项1[5]={0,1,2,3,50}; //欢迎使用uchar项目2[5]={4,5,6,7,50}; //请等待…… //===============================================================================无效短延迟(uint i){uint j;对于(j=0;j<=i;j++;}无效延迟时间(uchar TIckms){uchar计数,i_NOP()_NOP()_NOP(); for(i=滴答声;i> 0;i--{for(count=0;计数<=58;计数++){;}_NOP();}}//**************************************************无效prl0(uchar com1)//写指令代码子程序(左){ P5DIR |=0X7F;//P5为输出口P5OUT |=CS1;//csa=1 P5OUT&=~CS2;//csb=0P5OUT&=~RS;P5OUT |=RW;//RS=0,R/W=1,以便读液晶状态P4DIR=0x00;//P4口为输入口do{P5OUT |=E;//E=1cradd1=P4IN;P5OUT&=~E;//E=0}while((cradd1&0x80)=0);P5OUT&=~RW;//rw=0P4DIR=0xff;//P4口为输出口P4OUT=com1;P5OUT |=E;//E=1P5OUT&=~E;//E=0}//***************************************************************************无效prl1(uchar dat1)//写显示数据子程序(左){P5DIR |=0X7F;//P5为输出口P5OUT |=CS1;//csa=1 P5OUT&=~CS2;//csb=0P5OUT&=~RS;P5OUT |=RW;//RS=0,R/W=1,以便读液晶状态P4DIR=0x00;//P4口为输入口do{P5OUT |=E;//E=1cradd1=P4IN;P5OUT&=~E;//E=0}while((cradd1&0x80)=0);P5OUT |=RS;//rs=1 P5OUT&=~RW;//rw=0P4DIR=0xff;//P4口为输出口P4OUT=dat1;P5OUT |=E;//E=1P5OUT&=~E;//E=0}//*************************************************************************无效prr0(uchar com2)//写指令代码子程序(右){ P5DIR |=0X7F;//P5为输出口P5OUT&=~CS1;//csa=0 P5OUT |=CS2;//csb=1P5OUT&=~RS;P5OUT |=RW;//RS=0,R/W=1,以便读液晶状态P4DIR=0x00;//P4口为输入口do{P5OUT |=E;//E=1cradd1=P4IN;P5OUT&=~E;//E=0}while((cradd1&0x80)=0);P5OUT&=~RW;//rw=0P4DIR=0xff;//P4口为输出口P4OUT=com2;P5OUT |=E;//E=1P5OUT&=~E;//E=0}//*******************************************************************无效prr1(uchar dat2)//写显示数据子程序(右){ P5DIR |=0X7F;//P5为输出口P5OUT&=~CS1;//csa=0 P5OUT |=CS2;//csb=1P5OUT&=~RS;P5OUT |=RW;//RS=0,R/W=1,以便读液晶状态P4DIR=0x00;//P4口为输入口do{P5OUT |=E;//E=1cradd1=P4IN;P5OUT&=~E;//E=0}while((cradd1&0x80)=0);P5OUT |=RS;//rs=1 P5OUT&=~RW;//rw=0P4DIR=0xff;//P4口为输出口P4OUT=dat2;P5OUT |=E;//E=1P5OUT&=~E;//E=0}//****************************************************//读显示数据子程序 (左屏)//****************************************************uchar ReadDatal(void){uchar Rdata;P5DIR |=0X7F;//P5为输出口P5OUT |=CS1;//csa=1 P5OUT&=~CS2;//csb=0P5OUT&=~RS;P5OUT |=RW;//RS=0,R/W=1,以便读液晶状态P4DIR=0x00;//P4口为输入口do{P5OUT |=E;//E=1cradd1=P4IN;P5OUT&=~E;//E=0}while((cradd1&0x80)=0); P5OUT |=RS;//RS=1//P5OUT |=RW;//R/W=1P5OUT |=E;//E=1Rdata=P4IN;P5OUT&=~E;//E=0返回Rdata; }//****************************************************//读显示数据子程序 (右屏)//****************************************************uchar ReadDatar(void){uchar Rdata;P5DIR |=0X7F;//P5为输出口P5OUT&=~CS1;//csa=0 P5OUT |=CS2;//csb=1P5OUT&=~RS;P5OUT |=RW;//RS=0,R/W=1,以便读液晶状态P4DIR=0x00;//P4口为输入口do{P5OUT |=E;//E=1cradd1=P4IN;P5OUT&=~E;//E=0}while((cradd1&0x80)=0); P5OUT |=RS;//RS=1//P5OUT |=RW;//R/W=1P5OUT |=E;//E=1Rdata=P4IN;P5OUT&=~E;//E=0返回Rdata;}/************************************************************************************************************************************************************************无效clsr(void)//清屏{uchar i,j;对于(i=0;i<8;i++{prl0(i|0xb8); //设置页地址prr0(i | 0xb8);prl0(0x40);prr0(0x40);对于(j=0;j<64;(j++)//设置列地址{ prl1(0x00); //写0x00 prr1(0x00);}}//**********************************************无效allon(无效)//满屏{ 乌查尔一世,j;对于(i=0;i<8;i++{prl0(i|0xb8);prr0(i | 0xb8);prl0(0x40);prr0(0x40);对于(j=0;j<64;j++{prl1(0xff); //写0xffprr1(0xff);}}//***********************************************空洞条纹(空洞){uchar i,j;对于(i=0;i<8;i++{prl0(i|0xb8);prr0(i | 0xb8);prl0(0x40);prr0(0x40);对于(j=0;j<64;j++{prl1(0xaa);prr1(0xaa); // 写0xaa}}}/*********************************************************无效条带1(无效){uchar i,j;对于(i=0;i<8;i++{prl0(i|0xb8);prr0(i | 0xb8);prl0(0x40);prr0(0x40);对于(j=0;j<64;j++{prl1(0x55); // 写0x55prr1(0x55);}} //*************************************************** //***************************************************无效hzw_pr(uchar colum2,uchar page2,uchar代码2)//写汉字 //第2页:页第2列:列代码2:代码代码2=0,1,2,3……表示第几个汉字{乌查尔一世,j,科伦;uchar*hzp; 乌查尔旗;hzp=&HZTable[code2][0];对于(j=0;j<2;j++{prl0(第2页| 0xb8); //页prr0(第2页| 0xb8);柱=柱2;如果(第2列>63列)//右屏{ 柱=柱-64;prr0(柱0x40);标志=1;}否则//左屏{prl0(柱0x40);标志=0;}//*********************对于(i=0;i<16;i++{if(flag==0){prl1(*hzp);}else{prr1(*hzp);}hzp++;如果(列==64)//列=64{column=0;如果(flag==0){flag=1;prr0(柱| 0x40);}else{break;}列+++;}页面2++;}}//***********************************************无效w_hzstr(uchar Column4,uchar page4,uchar*str1)//写汉字字符串{while(*str1=50){hzw_pr(第4栏,第4页,*str1);列4=列4+16;str1++;}}//***************************************************//初始化

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us