找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2801|回复: 0
打印 上一主题 下一主题
收起左侧

谁能帮我看看我的仿真 和程序 为什么timestep small

[复制链接]
跳转到指定楼层
楼主
ID:61356 发表于 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显示频段  
-----------------------------------------
系统初始化
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 为计数器,用于频率计数。C/T 1 为定时器。用于动态显示
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;      

   }
这是程序  求好心大神   留邮箱 我把仿真发给你  跪求

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 顶 踩
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表