欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

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

Proteus仿真報錯Model AT89 specified but not found in 2 #P.

[復(fù)制鏈接]
ID:1019786 發(fā)表于 2022-4-19 16:57 | 顯示全部樓層 |閱讀模式
各位大佬能看看我的出現(xiàn)什么問題了嗎

51hei圖片20220419165414.png

仿真

仿真
2.png

這個是單片機程序

#include<reg51.h>
#define uChar unsigned char
#define uInt unsigned int
uChar a[10]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
uChar b[8]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
uChar second=50,minute=59,hour=12,year=18,month=07,day=21,count;
sbit Key1 = P3^0; //計時停止
sbit Key2 = P3^1; //調(diào)位
sbit Key3 = P3^2; //加一
sbit Key4 = P3^3; //切換  
sbit Buzzer=P1^1;
/*********************延遲函數(shù)********************/
void Delay(uInt t)
{
while(t)
{
t--;
}
}
/*********************時分秒顯示函數(shù)*******************/
void Dispaly1(uChar second,uChar minute,uChar hour)
{
/*********************第一位數(shù)碼管*********************/
P2=b[0];
P0=a[hour/10];
Delay(10);
/*********************第二位數(shù)碼管*********************/
P2=b[1];
P0=a[hour%10];
Delay(10);
/*********************第三位數(shù)碼管*********************/
P2=b[2];
P0=0x40;
Delay(10);
/*********************第四位數(shù)碼管*********************/
P2=b[3];
P0=a[minute/10];
Delay(10);
/*********************第五位數(shù)碼管*********************/
P2=b[4];
P0=a[minute%10];
Delay(10);
/*********************第六位數(shù)碼管*********************/
P2=b[5];
P0=0x40;
Delay(10);
/*********************第七位數(shù)碼管*********************/
P2=b[6];
P0=a[second/10];
Delay(10);
/*********************第八位數(shù)碼管*********************/
P2=b[7];;
P0=a[second%10];
Delay(10);
}
/*********************年月日顯示函數(shù)********************/
void Dispaly2(uChar day,uChar month,uChar year)
{
P2=b[0];
P0=a[day/10];
Delay(10);

P2=b[1];
P0=a[day%10];
Delay(10);

P2=b[2];
P0=0x40;
Delay(10);

P2=b[3];
P0=a[month/10];
Delay(10);

P2=b[4];
P0=a[month%10];
Delay(10);

P2=b[5];
P0=0x40;
Delay(10);

P2=b[6];
P0=a[year/10];
Delay(10);

P2=b[7];
P0=a[year%10];
Delay(10);
}
/*********************時鐘按鍵掃描函數(shù)*********************/
void Keyscan1()
{
static uChar i=0,j=0;
if(Key1==0)
{
Delay(10); //消抖
if(Key1==0)
while(!Key1); //等待按鍵彈
i++;
}
/*時鐘暫停功能*/
if(i%2==1)
{
TR0=0;/*如果是奇數(shù)次按鍵自然關(guān)閉定時器0*/
}
if(i%2==0)
{
TR0=1;/*如果是偶數(shù)次按鍵則打開定時器0*/
}
/*時鐘調(diào)位和數(shù)值加一功能*/
if(Key2==0)
{
Delay(10);
if(Key2==0)
while(!Key2);
j++;
}
if(j%4==1)
{
if(Key3==0)
{
Delay(10);
if(Key3==0)
while(!Key3);
second++;
if(second==60)
second=0;
}
}
if(j%4==2)
{
if(Key3==0)
{
Delay(10);
if(Key3==0)
while(!Key3);
minute++;
if(minute==60)
minute=0;
}
}
if(j%4==3)
{
if(Key3==0)
{
Delay(10);
if(Key3==0)
while(!Key3);
hour++;
if(hour==24)
hour=0;
}
}
}
/*日期按鍵掃描函數(shù)*/
void Keyscan2()
{
static uChar m=0,n=0;
if(Key1==0)
{
Delay(10);
if(Key1==0)
while(!Key3);
m++;
}
if(m%2==1)
{
TR0=0;/*奇數(shù)次按鍵則關(guān)閉定時器0*/
}

if(m%2==0)
{
TR0=1;/*偶數(shù)次按鍵則打開定時器0*/
}
if(Key2==0)
{
Delay(10);
if(Key2==0)
while(!Key2);
n++;
}
/*日期調(diào)位和日期加一功能*/
if(n%4==1)
{
if(Key3==0)
{
Delay(10);
if(Key3==0)
while(!Key3);
day++;
if(day==30)
day=0;
}
}
if(n%4==2)
{
if(Key3==0)
{
Delay(10);
if(Key3==0)
while(!Key3);
month++;
if(month==12)
month=0;
}
}
if(n%4==3)
{
if(Key3==0)
{
Delay(10);
if(Key3==0)
while(!Key3);
year++;
if(year==99)
year=0;
}
}
}

/************************************************/
/***************主函數(shù)***************************/
/************************************************/
void main()
{                                                
TMOD=0x01;          /*定時器以方式一工作*/
TH0=(65536-10000)/256;
TL0=(65536-10000)%256;/*10ms計時*/
EA=1;
ET0=1;/*允許定時器0中斷*/
TR0=1;/*打開定時器0*/
while(1)
{
static uChar h=0;
/*時鐘和日期切換功能*/
if(Key4==0)
{
Delay(10);
if(Key4==0)
while(!Key4);
h++;
}
if(h%2==0)/*如果按鍵偶數(shù)次則顯示時鐘*/
{
Dispaly1(second,minute,hour);
Keyscan1();
}

if(h%2==1)/*如果按鍵奇數(shù)次則顯示日期*/
{
Dispaly2(year,month,day);
Keyscan2();
}
}
}
/**********************中斷函數(shù)**************************/
void time0_int(void) interrupt 1
{
TH0=(65536-10000)/256;
TL0=(65536-10000)%256;
count++;
if(count==100)/*10ms??ê±£???100′??ò??o?1s*/
{
count=0;
second++;
if(second==60)
{
second=0;
minute++;
if(minute==60)
{
minute=0;
hour++;
if(hour==24)
{
hour=0;
day++;
if(day==30)
{
day=0;
month++;
if(month==12)
{
month=0;
year++;
if(year==99)
{
year=0;
}
}
}
}
}
}
}
/*判斷整點提醒*/
if(second==00&&minute==00)                                                                  
Buzzer=0;
else
Buzzer=1;
}
回復(fù)

使用道具 舉報

ID:96682 發(fā)表于 2022-4-19 18:24 來自觸屏版 | 顯示全部樓層
置換新的 AT89C52 或編輯當前芯片的屬性,
回復(fù)

使用道具 舉報

ID:523803 發(fā)表于 2022-4-19 18:28 | 顯示全部樓層
你試一下右鍵管理員權(quán)限打開
回復(fù)

使用道具 舉報

ID:1019786 發(fā)表于 2022-4-19 19:34 | 顯示全部樓層
18520649817 發(fā)表于 2022-4-19 18:28
你試一下右鍵管理員權(quán)限打開

還是沒用
回復(fù)

使用道具 舉報

ID:1019786 發(fā)表于 2022-4-19 19:34 | 顯示全部樓層
wc86110 發(fā)表于 2022-4-19 18:24
置換新的 AT89C52 或編輯當前芯片的屬性,

但是我這個是c51可以換嗎
回復(fù)

使用道具 舉報

ID:1019786 發(fā)表于 2022-4-26 11:23 | 顯示全部樓層
解決了
回復(fù)

使用道具 舉報

ID:1056322 發(fā)表于 2022-12-7 19:42 | 顯示全部樓層
怎么解決的?能說說嗎?我也出現(xiàn)了這個問題
回復(fù)

使用道具 舉報

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

本版積分規(guī)則

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

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

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