【正文】
} 。i++)。 for(i=0。 ET1=0。 } void triacctrl(void)interrupt 3 using 3 { register unsigned char i。 ET1=1。 TH1=powertab[2*heatpower]1。 testok=1。 河北師范大學(xué)本科生畢業(yè)論文 37 } else { TR0=0。 TL0=0。 px0count=100。 } void tempfrequency(void) interrupt 0 using 1 { if(px0count) return。 if(temp65)tempov=1。 break。 if(tempmaxtempmin=1) { if(temptab[tempmax]+temptab[tempmin]2*t0rig)temp=tempmax。 else if(t0rigtemptab[temp])tempmax=temp。 河北師范大學(xué)本科生畢業(yè)論文 36 while(1) { temp=(tempmin+tempmax)/2。 tempmin=0。 while(!testok)display()。 EX0=1。 px0count=2。 unsigned int t0rig。 buzz=0。 ET1=0。} } } else { relay=1。triac=0。led2=0。ET1=0。break。led3=1。} case 5: case 6: case 7: case 8:{led1=0。EX1=1。led2=1。break。led2=1。triac=1。 buzz=1。 } else return(0)。 IE=ch。 if(swkey==0) break。i++)display()。 for(i=0。 while(1) { while(swkey)display()。 dispram[1]=0x10。 P2=0xff。 P0=0xff。 ch=IE。 swkey=1。i++) display()。 for(i=0。 return(2)。 dispram[1]=heatpower。 if(heatpower0) heatpower++。i++)display()。 for(i=0。 return(1)。 dispram[1]=heatpower。 if(heatpower9) heatpower++。i++) display()。 for(i=0。 }} unsigned char keyscan(void) { unsigned char i,ch。 a=_crol_(a,1)。=a。 P0=table[dispram[i]]。i2。 a=0x01。 } void display(void) { unsigned char code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07, 0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71}。bt。dt。 河北師范大學(xué)本科生畢業(yè)論文 31 } } void delay(unsigned int dt) { register unsigned char bt。 j/=10。 j=abs(ctemp)。b++) temptest()。 }//end for(b=0。 display()。j100。 while(1) { i=1。 IP=0x01。 TMOD=0x11。 tempov=0。 ctep=15。 //超溫標(biāo)志、測溫開始標(biāo)志、測溫結(jié)束標(biāo)志 void main (void) { 河北師范大學(xué)本科生畢業(yè)論文 30 unsigned char i,j。 //顯示區(qū)緩存 unsigned char data heatpower,px0count。 //加熱檔位指示燈 3 signed char data ctemp。 //加熱檔位指示燈 1 sbit led2=P2^6。 //可控硅觸發(fā)信號輸出端 sbit relay=P1^7。 //加熱檔位“ — ”鍵 sbit buzz=P1^5。 //開關(guān)鍵 sbit upkey=P1^1。 //加熱控制函數(shù) void temptest(void)。 //顯示函數(shù) unsigned char keyscan(void)。正是由于他們,我才能在各方面取得顯著的進(jìn)步,在此向他們表示我由衷的謝意,并祝所有 的老師培養(yǎng)出越來越多的優(yōu)秀人才,桃李滿天下! 河北師范大學(xué)本科生畢業(yè)論文 27 附錄 1:系統(tǒng)硬件總原理圖 1 2 3 4 5 6ABCD654321DCBAT i t l eN u m b e r R e v i s i o nS i z eBD a t e : 1 8 J u n 2 0 1 0 S h e e t o f F i l e : C : \ D o c u m e n t s a n d S e t t i n g s \ A d m i n i s t r a t o r \ 桌面 \ 新建文件夾 \ B A 5 A 9 B ~ 1 . D D BD r a w n B y :U45vR6Q29012+5G N DabfcgdeD P Y1234567abcdefg8dpdpD S ?D P Y _ 7 S E G _ D PabfcgdeD P Y1234567abcdefg8dpdpD S ?D P Y _ 7 S E G _ D PR 1 1200*8R 1 2R 1 3R 1 5R 1 7R 1 8R 1 6R 1 4R9R 1 0Q?P N P 1Q?P N P 1R4100R 2 41KU 3 C7 4 L S 0 4U 3 A7 4 L S 0 4U 3 B7 4 L S 0 4C1R 1 9510R 2 0510R 2 1510L E D 2L E D 3L E D 4V i n1GND2V o u t3U17805C5C71 0 0 0 u F / 1 6 VC94 7 0 u F / 1 0 vC6D1I N 4 0 0 7R82 K / 1 WR 2 22 0 K / 2 WR 2 5h e e t e rQ6B T A 4 1U5M O C 3 0 2 3L E D 1D6I N 4 0 0 7Q59012K1220VF1F U S ER21MR310KR110KT12 2 0 / 9 vU 3 D7 4 L S 0 4Q1805022V1234D 2 ~ D 5I N 4 0 0 7 * 4+5G N DG N DS1S2S3G N DC21uFC333pFC433pFC?C A PR5Y11 2 M H zG N D+5E A / V P31X119X218R E S E T9I N T 012I N T 113T014T115P 1 . 01P 1 . 12P 1 . 23P 1 . 34P 1 . 45P 1 . 56P 1 . 67P 1 . 78P 0 . 039P 0 . 138P 0 . 237P 0 . 336P 0 . 435P 0 . 534P 0 . 633P 0 . 732P 2 . 021P 2 . 122P 2 . 223P 2 . 324P 2 . 425P 2 . 526P 2 . 627P 2 . 728RD17WR16P S E N29A L E / P30T X D11R X D108 9 C 5 1+5+5+5R7510+5R 2 3 河北師范大學(xué)本科生畢業(yè)論文 28 附錄 2: 元器件清單 序號 元件名稱 型號規(guī)格 數(shù)量 1 單片機(jī) AT89S52 1 2 三端穩(wěn)壓塊 L7805 1 3 光耦 MOC3023 1 4 雙向可控硅 BTA41600B 1 5 發(fā)熱管 1 6 蜂鳴器 5V 有源 蜂 鳴器 電磁式 1 7 碳膜電阻 RXT20KΩ 1 8 碳膜電阻 RXT2KΩ 1 9 碳膜電阻 RXT200Ω 1 10 碳膜電阻 RXT5K