跪求有谁知道 为什么51单片机的eeprom中存储的数据不能在外部中断子程序中读取

跪求有谁知道 为什么51单片机的eeprom中存储的数据不能在外部中断子程序中读取,第1张

关于读取:在一个中断读取,如果其它中断到来且可以嵌套本中断,那么就可能读错。如果嵌套的中断中没有读取同地址的、且嵌套中断结束执行的主程序指令不是读取同地址的,那么就不会出错(如AVR中断规定,中断结束后最少执行主程序一条指令,再返回或响应其它大宏改中断)。所以,不管读写,滚判保证原子性,也就是读写前后关开中断。如果时间不允许,那么就在程序逻辑上保证不要绝袭嵌套读写。

程序设计内容

(1).&nbsp密码的设定,在此程序中密码是固定在程序存储器ROM中,兆稿假设预设的密码为“12345”共5位密码。

(2).&nbsp密码的输入问题:  由于采用两个按键来完成密码的输入,那么其中一个按键为功能键,另一个按键为数字键。在输入过程中族培孝,首先输入密码的长度,接着根据密码的长度输入密码的位数,直到所有长度的密码都已经输入完毕;或者输入确认功能键之后,才能完成密码的输入过程。进入密码的判断比较处理状态并给出相应的处理过程。

(3).按键禁止功能:初始化时,是允许按键输入密码,当有按键按下并开始进入按键识别状态时,按键禁止功能被激活,但启动的状态在3次密码输入不正确的情况下发生的。

C语言源程序

#include unsigned char code ps[]={1,2,3,4,5}

unsigned char code dispcode[]={0x3f,0x06,0x5b,0x4f,0x66, &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp

0x6d,0x7d,0x07,0x7f,0x6f,0x00,0x40}

unsigned char pslen=9 unsigned char templen

unsigned char digit unsigned char funcount

unsigned char digitcount

unsigned char psbuf[9]

bit cmpflag

bit hibitflag

bit errorflag

bit rightflag

unsigned int second3

unsigned int aa

unsigned int bb

bit alarmflag

bit exchangeflag

unsigned int cc

unsigned int dd

bit okflag

unsigned char oka

unsigned char okb

void main(void)

{ &nbsp

unsigned char i,j &nbsp

P2=dispcode[digitcount] &nbsp

TMOD=0x01 &nbsp

TH0=(65536-500)/256 &nbsp

TL0=(65536-500)%6 中册&nbsp

TR0=1 &nbsp

ET0=1 &nbsp

EA=1 &nbsp

while(1) &nbsp&nbsp

&nbsp { &nbsp&nbsp&nbsp&nbsp&nbsp

if(cmpflag==0) &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp

{ &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp

if(P3_6==0) //function key &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp

&nbsp { &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp

for(i=10i>0i--) &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp

for(j=248j>0j--) &nbsp&nbsp&nbsp&nbsp&nbsp

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(P3_6==0) &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp

{ &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp

&nbsp&nbsp if(hibitflag==0) &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp { &nbsp&nbsp&nbsp&nbsp

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp funcount++ &nbsp

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nb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sp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp rightflag=1

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp hibitflag=0

a:&nbsp&nbsp&nbspcmpflag=0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp }

}

}

void t0(void)

interrupt 1 using 0 { &nbsp TH0=(65536-500)/256 &nbsp

TL0=(65536-500)%6 &nbsp

if((errorflag==1) && (rightflag==0)) &nbsp

{

&nbsp&nbsp&nbsp&nbsp&nbsp bb++

&nbsp&nbsp&nbsp&nbsp&nbsp if(bb==800)

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp {

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp bb=0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp alarmflag=~alarmflag

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp }

&nbsp&nbsp&nbsp&nbsp&nbsp if(alarmflag==1)

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp {

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp P0_0=~P0_0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp }

&nbsp&nbsp&nbsp&nbsp&nbsp aa++

&nbsp&nbsp&nbsp&nbsp&nbsp if(aa==800)

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp {

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp aa=0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp P0_1=~P0_1

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp }

&nbsp&nbsp&nbsp&nbsp&nbsp second3++

&nbsp&nbsp&nbsp&nbsp&nbsp if(second3==6400)

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp {

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp second3=0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp hibitflag=0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp errorflag=0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp rightflag=0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp cmpflag=0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp P0_1=1 &nbsp

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp alarmflag=0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp bb=0 &nbsp

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp aa=0 &nbsp

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp }

&nbsp&nbsp&nbsp }

&nbsp if((errorflag==0) && (rightflag==1))

&nbsp&nbsp&nbsp {

&nbsp&nbsp&nbsp&nbsp&nbsp P0_1=0

&nbsp&nbsp&nbsp&nbsp&nbsp cc++

&nbsp&nbsp&nbsp&nbsp&nbsp if(cc<1000)

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp {

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp okflag=1

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp }

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp else if(cc<2000)

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp {

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp okflag=0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp }

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp else

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sp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp {

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp oka=0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp P0_0=~P0_0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp }

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp }

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp else

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp {

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp okb++

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(okb==3)

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp {

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp okb=0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp P0_0=~P0_0

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp } &nbsp

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp }

&nbsp&nbsp&nbsp }

}


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12315206.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-24
下一篇 2023-05-24

发表评论

登录后才能评论

评论列表(0条)

保存