毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 课程设计 >> 正文

单片机课程设计出租车计价器设计+源代码 第2页

更新时间:2012-9-25:  来源:毕业论文

};
struct typFNT_GB16 code GB_16[] = { // 显示16*16
// 楷体_GB2312
"公",0x00,0x00,0x80,0x60,0x18,0x00,0x82,0x02,0x0C,0x10,0x20,0x40,0xC0,0x80,0x80,0x00,0x02,0x01,0x00,0x18,0x14,0x12,0x11,0x08,0x0A,0x0C,0x18,0x00,0x00,0x00,0x00,0x00,
"里",0x00,0x00,0x00,0x7C,0x84,0xA4,0xFC,0x54,0x52,0x42,0x72,0x0E,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x24,0x24,0x1F,0x12,0x12,0x12,0x10,0x10,0x10,0x10,0x00,0x00,
"程",0x40,0x40,0x48,0x48,0xFC,0x26,0x20,0x00,0xB8,0xA4,0xA4,0x54,0x5C,0x00,0x00,0x00,0x08,0x04,0x02,0x01,0x7F,0x01,0x12,0x10,0x12,0x12,0x1F,0x09,0x09,0x08,0x08,0x00,
"总",0x00,0x00,0x00,0x00,0xE2,0x24,0x10,0x98,0x94,0xD3,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x00,0x00,0x0D,0x11,0x21,0x24,0x28,0x20,0x28,0x32,0x02,0x04,0x00,0x00,
"单",0x00,0x00,0x00,0x70,0x92,0xAC,0xA8,0xF8,0xAC,0x8A,0x69,0x18,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x7F,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,
"价",0x80,0x40,0x20,0xD8,0x86,0x40,0x20,0x98,0x07,0x04,0xC8,0x10,0x20,0x40,0x40,0x00,0x00,0x00,0x00,0x3F,0x00,0x20,0x18,0x07,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,
"元",0x00,0x00,0x20,0x20,0x24,0xE4,0x24,0xE2,0x12,0x12,0x10,0x10,0x00,0x00,0x00,0x00,0x10,0x10,0x08,0x04,0x03,0x00,0x00,0x0F,0x10,0x20,0x20,0x20,0x20,0x20,0x1C,0x00,
"等",0x00,0x80,0x88,0x84,0xA7,0xAA,0xA2,0x78,0xD4,0x53,0x46,0x41,0x41,0x40,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x06,0x0A,0x22,0x7F,0x01,0x01,0x01,0x00,0x00,0x00,0x00,
"候",0x80,0x40,0xF0,0x0E,0xE0,0x00,0x10,0x94,0xF4,0x92,0x4E,0x4A,0x08,0x00,0x00,0x00,0x00,0x00,0x3F,0x00,0x07,0x20,0x23,0x12,0x0A,0x07,0x09,0x11,0x31,0x20,0x20,0x00,
"时",0x00,0xF8,0x48,0x44,0xFC,0x00,0xA0,0x20,0x20,0x20,0xFE,0x10,0x10,0x10,0x00,0x00,0x00,0x0F,0x04,0x04,0x0F,0x00,0x00,0x01,0x10,0x20,0x3F,0x00,0x00,0x00,0x00,0x00,
"间",0x00,0x00,0xF8,0x02,0x04,0xE0,0xA4,0x14,0xF4,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x00,0x07,0x02,0x02,0x07,0x00,0x10,0x20,0x1F,0x00,0x00,0x00,
":",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};

/*--------函数列表-------*/
/*-----状态检查-----*/
void Check_Busy(void)
{
   uchar dat;
   DI=0;
   RW=1;
   do{本文来自辣.文,论-文·网原文请找腾讯3249.114
      DataPort=0x00;
      EN=1;
      dat=DataPort;
      EN=0;
      dat=0x80 & dat;       //仅当第7位为0时才可操作(判别busy信号)
      }while(!(dat==0x00));
}

/*-----向LCD发送命令------*/
void Writ_Comd(uchar command)
{
   Check_Busy();
   RW=0;DI=0;
   DataPort=command;
   EN=1; EN=0;
}

/*-----写显示数据------*/
void Write_Dat(uchar dat)
{
   Check_Busy();
   RW=0;DI=1;
   DataPort=dat;
   EN=1; EN=0;
  }

/*------设定行地址(页)--X 0-7------*/
void Set_Line(uchar line)
{
  line=line & 0x07;    // 0<=line<=7
  line=line|0xb8;      //1011 1xxx
  Writ_Comd(line);
}

/*------设定列地址--Y 0-63-----*/
void Set_Column(uchar column)
{
  column=column & 0x3f;    // 0=<column<=63
  column=column | 0x40;    // 01xx xxxx
  Writ_Comd(column);
}

/*-----设定显示开始行--XX-----*/
void Set_StartLine(uchar startline) //0--63
{
  startline=startline & 0x07;
  startline=startline | 0xc0;     //1100 0000
  Writ_Comd(startline);
 }

/*-----开关显示-----ONOFF=1:ON;ONOFF=0:OFF-----*/
void Set_OnOff(uchar onoff)
{
onoff=0x3e | onoff; //0011 111x
Writ_Comd(onoff);
}

/*------选择屏幕:screen: 0-全屏,1-左屏,2-右屏-----*/
void Select_Screen(uchar screen)
{
   switch(screen)
   { case 0: cs1=1;
             cs2=1;
     毕业论文http://www.751com.cn/          break;
     case 1: cs1=1;
             cs2=0;
             break;
     case 2: cs1=0;
             cs2=1;
             break;
   }
}

上一页  [1] [2] [3] [4] 下一页

单片机课程设计出租车计价器设计+源代码 第2页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。