基于单片机的数字电压表代码.docVIP

  • 9
  • 0
  • 约2.88千字
  • 约 8页
  • 2017-05-27 发布于湖北
  • 举报
基于单片机的数字电压表代码课案

主程序: #include reg52.h #include intrins.h #include string.h #include LCD1602.h #include ADC0808.h //---------------忙检查-------------------// uchar LCD_Busy_Check() { uchar LCD_Status; RS = 0; RW = 1; E = 1; delay4us(); LCD_Status = P0; E = 0; return LCD_Status; } //--------------向LCD写入命令--------------------// void Write_LCD_Command(uchar cmd) { while((LCD_Busy_Check() 0x80)==0x80); //忙等待 RS = 0; RW = 0; E = 0; P0 = cmd; delay4us(); E = 1; delay4us(); E = 0; } //-----------向LCD写入一个字节的数据函数-----------------*/ void Write_LCD_Data(uchar dat) { while((LCD_Busy_Check()0x80

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档