关于单片机仿真问题

2019-03-24 18:24发布

楼主是一名小白,最近在研究51单片机,算是刚刚入门吧。昨天楼主写了一个程序,是一个关于流水灯和蜂鸣器的程序,所用单片机仿真芯片为 SSTE516RD,单片机芯片为STC89C52,程序在电片及芯片上可以完美运行,可在仿真芯片上出了点问题。如截图所示,该设置都设置好了,点击模拟运行按钮(1)在工具栏中(2)有一些按钮是灰 {MOD}的,跳出一个disasemmbly的串口,貌似无法进行仿真操作,请问各位此问题该如何解决?

此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
11条回答
五加一等于六
2019-03-25 01:57
程序如下:

#include <reg52.h>
#include <intrins.h>
#define uint unsigned int
#define uchar unsigned char
void delay (uint xms);
uchar timer = 0;
sbit beem = P2^3;
void main ()
{
        timer = 0xfe;
        P1 = timer;
        while (1)
        {
                delay (500);
                beem = 1;
                delay (500);
                timer =  _crol_ (timer, 1);
                P1 = timer;       
                beem = 0;
        }
}

void delay ( uint xms)
{
        uint i,j;
        for ( i=xms;i>0;i--)
                for (j=110;j>0;j--);
}

一周热门 更多>