导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→各位与机器斗争的软件工程师,请进[liujiahong888888]

 *第49333篇: 各位与机器斗争的软件工程师,请进

  
楼 主:liujiahong888888 2007年5月30日11:52
 各位与机器斗争的软件工程师,请进
各位与机器斗争的同仁们,大家好!在这个利益至上的社会里面,我们是不是应该联手起来,一同做经验上的交流,呵呵!!!
最主要的是一起分享资料,一起讨论c语言程序设计的经验,以求对芯片的了解,对程序的了解,对事物的了解,从而大家共赢,大家丰收!!!
我的qq号码是181646458,一般晚上都在线(呵呵顺便提一下,我主要是从事车载电视方面软体设计的,用的是c语言开发 )   


  
2楼:liujiahong888888 2007年5月30日12:04
 送大家一段程序
unsigned char xdata write_command_address _at_ 0xe0ff;
unsigned char xdata busy _at_ 0xe7ff;
unsigned char bdata busybyte;
sbit busybit=busybyte^7 ;
unsigned char xdata write_data_address _at_ 0xe8FF;
unsigned char xdata read_data_address _at_ 0xefff;

void command_write(char x){write_command_address=x;
                           busybyte=busy;                      
                           while(busybit){busybyte=busy;}
                           }
void data_write(char y){write_data_address=y;
                        busybyte=busy;
                        while(busybit){busybyte=busy;}
                        }

/*void delay()
           { int x,y;
           x=10;
          while(x)
                {for(y=0;y  <1000;y++){;}  
                    x=x-1;
                    }
             }*/
             
void initial_12864(){ command_write(0x30);  //不调用扩充指令
                      command_write(0x04);  //点设定,游标向右移
                      command_write(0x0f);  //开光标
                      command_write(0x0c);  //关光标
                      command_write(0x01);  //清屏
                      command_write(0x02);  //地址归位,光标移到第1行第1列
                    }
                    
void setcursor(unsigned char position){
                                 command_write(position);
                                 
                                 
                                 }


>>>>>>对该主题发表你的看法

本主题贴数2,分页: [第1页]


[上一篇主题]:[求助]熟悉LPC2210的帮看一个串口通信的问题,急啊~

[下一篇主题]:关于vb串口通讯的问题