找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 3539|回復(fù): 0
收起左側(cè)

誰能幫我看看我的仿真 和程序 為什么timestep small

[復(fù)制鏈接]
ID:61356 發(fā)表于 2014-5-2 16:25 | 顯示全部樓層 |閱讀模式
#include<at89c52.h>
#include"RLCTest.h"
union count
{  
struct clockTwo
{
unsigned char clockH;
unsigned char clockL;
}clockTwo;  
unsigned int clock;
}count;   //定義頻率字  
unsigned char code disdata[16]={0xc0,0xf9,0xa4,0xb0,0x99,
0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};  unsigned char data dismem[8];
//定義LED顯示頻段  
-----------------------------------------
系統(tǒng)初始化
void init(void)
{      
     stateR=0;testR=1;  
         stateC=1;testC=0;  
         stateL=1;testL=0;  
         largeR=1;smallR=0;  
         largeC=1;smallC=0;  
}  
void delay4us(unsigned int time)
{  
while(--time);
}  
void delay2us(unsigned char time)  
{
while(--time);  
}  
void inittime(void)  
{   
TMOD=0x15;//C/T 0 為計數(shù)器,用于頻率計數(shù)。C/T 1 為定時器。用于動態(tài)顯示
TH1=0xF8;//timer1=2ms   
   TL1=0x2f;   
   ET1=1;   
   EA=1;   
   TR1=1;   
   TR0=1;   
   ET0=1;   
   ///timer 2   
   T2CON=0x04;   
   T2MOD=0x00;   
   TH2=0x3C;   
   TL2=0xB0;   
   RCAP2H=0x3C;  
   RCAP2L=0xB0;   
   TR2=1;   
   ET2=1;      

   }
這是程序  求好心大神   留郵箱 我把仿真發(fā)給你  跪求

回復(fù)

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機教程網(wǎng)

快速回復(fù) 返回頂部 返回列表