|
基于AT89c51的智能测速仪,仿真是出现问题,在这请教各位。
[复制链接]
本人测速范围为10-----1000rpm,经过计算使用测周法测量,只要测一个脉宽就行了!现仿真有问题,不只是程序问题还是电路问题,但我仿真下来数码管是完全能驱动的,无需加上拉,在这请大家帮忙。谢谢!
#include
#include
#define uint unsigned int
#define uchar unsigned char
unsigned long Tsum;
long double Psum,Fresult,Fage;
unsigned char testcnt;
double temp[3];
sbit w1=P3^7;
sbit w2=P3^6;
sbit w3=P3^1;
sbit w4=P3^0; //按键申明
uchar m,n,keynum,key1num;
uint i;
uchar code table[]={
0x3f,0x06,0x5b,0x4f,
0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,
0x39,0x5e,0x79,0x71 }; // 数码
0Xc0,0Xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90
|
|