久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 3478|回復(fù): 6
打印 上一主題 下一主題
收起左側(cè)

Proteus仿真報(bào)錯(cuò)Model AT89 specified but not found in 2 #P.

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
各位大佬能看看我的出現(xiàn)什么問題了嗎



這個(gè)是單片機(jī)程序

#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; //計(jì)時(shí)停止
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í)分秒顯示函數(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í)鐘按鍵掃描函數(shù)*********************/
void Keyscan1()
{
static uChar i=0,j=0;
if(Key1==0)
{
Delay(10); //消抖
if(Key1==0)
while(!Key1); //等待按鍵彈
i++;
}
/*時(shí)鐘暫停功能*/
if(i%2==1)
{
TR0=0;/*如果是奇數(shù)次按鍵自然關(guān)閉定時(shí)器0*/
}
if(i%2==0)
{
TR0=1;/*如果是偶數(shù)次按鍵則打開定時(shí)器0*/
}
/*時(shí)鐘調(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)閉定時(shí)器0*/
}

if(m%2==0)
{
TR0=1;/*偶數(shù)次按鍵則打開定時(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;          /*定時(shí)器以方式一工作*/
TH0=(65536-10000)/256;
TL0=(65536-10000)%256;/*10ms計(jì)時(shí)*/
EA=1;
ET0=1;/*允許定時(shí)器0中斷*/
TR0=1;/*打開定時(shí)器0*/
while(1)
{
static uChar h=0;
/*時(shí)鐘和日期切換功能*/
if(Key4==0)
{
Delay(10);
if(Key4==0)
while(!Key4);
h++;
}
if(h%2==0)/*如果按鍵偶數(shù)次則顯示時(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;
}
}
}
}
}
}
}
/*判斷整點(diǎn)提醒*/
if(second==00&&minute==00)                                                                  
Buzzer=0;
else
Buzzer=1;
}
分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復(fù)

使用道具 舉報(bào)

沙發(fā)
ID:96682 發(fā)表于 2022-4-19 18:24 來自手機(jī) | 只看該作者
置換新的 AT89C52 或編輯當(dāng)前芯片的屬性,
回復(fù)

使用道具 舉報(bào)

板凳
ID:523803 發(fā)表于 2022-4-19 18:28 | 只看該作者
你試一下右鍵管理員權(quán)限打開
回復(fù)

使用道具 舉報(bào)

地板
ID:1019786 發(fā)表于 2022-4-19 19:34 | 只看該作者
18520649817 發(fā)表于 2022-4-19 18:28
你試一下右鍵管理員權(quán)限打開

還是沒用
回復(fù)

使用道具 舉報(bào)

5#
ID:1019786 發(fā)表于 2022-4-19 19:34 | 只看該作者
wc86110 發(fā)表于 2022-4-19 18:24
置換新的 AT89C52 或編輯當(dāng)前芯片的屬性,

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

使用道具 舉報(bào)

6#
ID:1019786 發(fā)表于 2022-4-26 11:23 | 只看該作者
解決了
回復(fù)

使用道具 舉報(bào)

7#
ID:1056322 發(fā)表于 2022-12-7 19:42 | 只看該作者
怎么解決的?能說說嗎?我也出現(xiàn)了這個(gè)問題
回復(fù)

使用道具 舉報(bào)

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

本版積分規(guī)則

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

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

快速回復(fù) 返回頂部 返回列表
主站蜘蛛池模板: 亚洲国产成人精品一区二区 | 羞羞视频网站在线观看 | 午夜a√ | 成人深夜福利 | 99精品国产成人一区二区 | 欧美一区二区三区在线观看视频 | 中文字幕在线免费视频 | 337p日本欧洲亚洲大胆 | 91免费看片| 本道综合精品 | 欧美精产国品一二三区 | 国产一区二区三区在线 | 中文字幕欧美在线观看 | 亚洲国产精品久久久久秋霞不卡 | 日本黄色大片免费看 | 亚洲视频在线免费观看 | 欧美日本韩国一区二区 | 一区二区视频在线观看 | 日本精品久久 | 免费观看一级毛片 | 97视频网站| 国产日韩欧美在线一区 | 欧美视频一区二区三区 | 免费九九视频 | 天天插日日操 | 欧美在线成人影院 | 中文字幕亚洲一区 | 精品一区二区在线观看 | 欧美极品在线观看 | 中文字幕免费在线 | 久久久蜜桃 | 最近日韩中文字幕 | 国产精品视频专区 | www.色综合| 妞干网视频 | caoporon| 18av在线播放 | 日韩精品一区二区三区四区视频 | 国产美女在线看 | 99pao成人国产永久免费视频 | 国产精品1区2区3区 中文字幕一区二区三区四区 |