计算器程序完美版(单片机).docVIP

  • 2
  • 0
  • 约6.24千字
  • 约 11页
  • 2016-12-24 发布于重庆
  • 举报
#includereg52.h #includemath.h #define uint unsigned int #define uchar unsigned char sbit dula=P2^6; sbit wela=P2^7; uchar code table[]={ 0x3f,0x06,0x5b,0x4f, 0x66,0x6d,0x7d,0x07, 0x7f,0x6f,0x77,0x7c, 0x39,0x5e,0x79,0x71,0}; uchar sign=0; char ifnum=0,ifcount=0,dian=0,dian1=0; long len=10; float result=0,b=0,key; void delay(uint z); uchar keyscan(); void display(long aa); void yunsuan(); char table1[8]={0x00,0x00,0x00,0x00,0x00,0x3f}; void main() { int i; dula=1; P0=0; dula=0; wela=1; P0=0xff; wela=0; //display(0); //delay(3000); while(1) { char h=0xfe,k,j=0; for(k=6;k0;k--) {

文档评论(0)

1亿VIP精品文档

相关文档