基于单片机的数字电压表设计c语言(精选).docVIP

  • 6
  • 0
  • 约3.57千字
  • 约 5页
  • 2016-08-17 发布于重庆
  • 举报

基于单片机的数字电压表设计c语言(精选).doc

基于单片机的数字电压表设计c语言(精选)

#includereg52.h #includeintrins.h sbit st=P2^4; sbit eoc=P3^7; sbit oe=P2^5; sbit ale=P2^3; sbit key1=P3^6; sbit key2=P3^5; unsigned char seg_code[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; unsigned char seg_ale[]={0xf8,0xf9,0xfa,0xfb}; unsigned char num[4]; /************延时函数**********************/ void delay_us(unsigned int delayus) { while(delayus--); } void delay_ms(unsigned int delaytime) { unsigned int i; unsigned char j; for(i=0;idelaytime;i++) for(j=0;j110;j++); } /********************************************/ /************ADC转换函数***

文档评论(0)

1亿VIP精品文档

相关文档