版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、版權(quán)所有版權(quán)所有 http:/版權(quán)所有版權(quán)所有 http:/ / /* *-reg51.hreg51.hheader file for generic 80c51 and 80c31 microcontroller.header file for generic 80c51 and 80c31 microcontroller.copyright (c) 1988-2002 copyright (c) 1988-2002 keilkeil elektronikelektronik gmbh and gmbh and keilkeil software, inc. software, inc.al
2、l rights reserved.all rights reserved.-* */ /# #ifndefifndef _reg51_h_ _reg51_h_#define _reg51_h_#define _reg51_h_/ /* * byte register byte register * */ /sfrsfr p0 = 0 x80; p0 = 0 x80;sfrsfr p1 = 0 x90; p1 = 0 x90;sfrsfr p2 = 0 xa0; p2 = 0 xa0;sfrsfr p3 = 0 xb0; p3 = 0 xb0;sfrsfr psw = 0 xd0; psw =
3、 0 xd0;sfrsfr acc = 0 xe0; acc = 0 xe0;sfrsfr b = 0 xf0; b = 0 xf0;sfrsfr sp = 0 x81; sp = 0 x81;sfrsfr dpl = 0 x82; dpl = 0 x82;sfrsfr dph = 0 x83; dph = 0 x83;版權(quán)所有版權(quán)所有 http:/sfrsfr pcon = 0 x87; pcon = 0 x87;sfrsfr tcon = 0 x88; tcon = 0 x88;sfrsfr tmod = 0 x89; tmod = 0 x89;sfrsfr tl0 = 0 x8a; tl
4、0 = 0 x8a;sfrsfr tl1 = 0 x8b; tl1 = 0 x8b;sfrsfr th0 = 0 x8c; th0 = 0 x8c;sfrsfr th1 = 0 x8d; th1 = 0 x8d;sfrsfr ie = 0 xa8; ie = 0 xa8;sfrsfr ip = 0 xb8; ip = 0 xb8;sfrsfr scon = 0 x98; scon = 0 x98;sfrsfr sbuf = 0 x99; sbuf = 0 x99;/ /* * bit register bit register * */ / /* * psw psw * */ /sbitsbi
5、t cy = 0 xd7; cy = 0 xd7;sbitsbit ac = 0 xd6; ac = 0 xd6;sbitsbit f0 = 0 xd5; f0 = 0 xd5;sbitsbit rs1 = 0 xd4; rs1 = 0 xd4;sbitsbit rs0 = 0 xd3; rs0 = 0 xd3;sbitsbit ov = 0 xd2; ov = 0 xd2;sbitsbit p = 0 xd0; p = 0 xd0;/ /* * tcon tcon * */ /sbitsbit tf1 = 0 x8f; tf1 = 0 x8f;sbitsbit tr1 = 0 x8e; tr
6、1 = 0 x8e;sbitsbit tf0 = 0 x8d; tf0 = 0 x8d;版權(quán)所有版權(quán)所有 http:/sbitsbit tr0 = 0 x8c; tr0 = 0 x8c;sbitsbit ie1 = 0 x8b; ie1 = 0 x8b;sbitsbit it1 = 0 x8a; it1 = 0 x8a;sbitsbit ie0 = 0 x89; ie0 = 0 x89;sbitsbit it0 = 0 x88; it0 = 0 x88;/ /* * ie ie * */ /sbitsbit ea = 0 xaf; ea = 0 xaf;sbitsbit es = 0 xac;
7、 es = 0 xac;sbitsbit et1 = 0 xab; et1 = 0 xab;sbitsbit ex1 = 0 xaa; ex1 = 0 xaa;sbitsbit et0 = 0 xa9; et0 = 0 xa9;sbitsbit ex0 = 0 xa8; ex0 = 0 xa8;/ /* * ip ip * */ / sbitsbit ps = 0 xbc; ps = 0 xbc;sbitsbit pt1 = 0 xbb; pt1 = 0 xbb;sbitsbit px1 = 0 xba; px1 = 0 xba;sbitsbit pt0 = 0 xb9; pt0 = 0 xb
8、9;sbitsbit px0 = 0 xb8; px0 = 0 xb8;/ /* * p3 p3 * */ /sbitsbit rd = 0 xb7; rd = 0 xb7;sbitsbit wr = 0 xb6; wr = 0 xb6;sbitsbit t1 = 0 xb5; t1 = 0 xb5;sbitsbit t0 = 0 xb4; t0 = 0 xb4;sbitsbit int1 = 0 xb3; int1 = 0 xb3;版權(quán)所有版權(quán)所有 http:/sbitsbit int0 = 0 xb2; int0 = 0 xb2;sbitsbit txd = 0 xb1; txd = 0
9、xb1;sbitsbit rxd = 0 xb0; rxd = 0 xb0;/ /* * scon scon * */ /sbitsbit sm0 = 0 x9f; sm0 = 0 x9f;sbitsbit sm1 = 0 x9e; sm1 = 0 x9e;sbitsbit sm2 = 0 x9d; sm2 = 0 x9d;sbitsbit ren = 0 x9c; ren = 0 x9c;sbitsbit tb8 = 0 x9b; tb8 = 0 x9b;sbitsbit rb8 = 0 x9a; rb8 = 0 x9a;sbitsbit ti = 0 x99; ti = 0 x99;sbi
10、tsbit ri = 0 x98; ri = 0 x98;# #endifendif版權(quán)所有版權(quán)所有 http:/ / /* *-reg1211.hreg1211.hheader file for ti msc1211 microcontroller.header file for ti msc1211 microcontroller.copyright (c) 1988-2003 copyright (c) 1988-2003 keilkeil elektronikelektronik gmbh and gmbh and keilkeil software, inc. software, i
11、nc.all rights reserved.all rights reserved.-* */ /# #ifndefifndef _reg1211_h_ _reg1211_h_#define _reg1211_h_#define _reg1211_h_/ /* * 8 8位寄存器位寄存器 * */ /sfrsfr p0 = 0 x80; /p0 p0 = 0 x80; /p0口寄存器口寄存器sfrsfr sp = 0 x81; / sp = 0 x81; /堆棧指針寄存器堆棧指針寄存器 sfrsfr dpl0 = 0 x82; / dpl0 = 0 x82; /數(shù)據(jù)指針數(shù)據(jù)指針0 0低字節(jié)低
12、字節(jié)sfrsfr dph0 = 0 x83; / dph0 = 0 x83; /數(shù)據(jù)指針數(shù)據(jù)指針0 0高字節(jié)高字節(jié)sfrsfr dpl1 = 0 x84; / dpl1 = 0 x84; /數(shù)據(jù)指針數(shù)據(jù)指針1 1低字節(jié)低字節(jié)sfrsfr dph1 = 0 x85; / dph1 = 0 x85; /數(shù)據(jù)指針數(shù)據(jù)指針1 1高字節(jié)高字節(jié)sfrsfr dps = 0 x86; / dps = 0 x86; /數(shù)據(jù)指針選擇寄存器數(shù)據(jù)指針選擇寄存器sfrsfr pcon = 0 x87; / pcon = 0 x87; /電源控制寄存器電源控制寄存器sfrsfr tcon = 0 x88; / tcon
13、 = 0 x88; /定時定時/ /計數(shù)控制寄存器計數(shù)控制寄存器 sbitsbit tf1 = tcon7; / tf1 = tcon7; /定時器定時器1 1溢出中斷標(biāo)志溢出中斷標(biāo)志 sbitsbit tr1 = tcon6; / tr1 = tcon6; /定時器定時器1 1運(yùn)行控制位運(yùn)行控制位 sbitsbit tf0 = tcon5; / tf0 = tcon5; /定時器定時器0 0溢出中斷標(biāo)志溢出中斷標(biāo)志 sbitsbit tr0 = tcon4; / tr0 = tcon4; /定時器定時器0 0運(yùn)行控制位運(yùn)行控制位 sbitsbit ie1 = tcon3; / ie1 = t
14、con3; /外部中斷外部中斷1 1請求標(biāo)志請求標(biāo)志 sbitsbit it1 = tcon2; / it1 = tcon2; /選擇外部中斷請求選擇外部中斷請求1 1為邊沿觸發(fā)方式的控制位為邊沿觸發(fā)方式的控制位 sbitsbit ie0 = tcon1; / ie0 = tcon1; /外部中斷外部中斷0 0請求標(biāo)志請求標(biāo)志 sbitsbit it0 = tcon0; / it0 = tcon0; /選擇外部中斷請求選擇外部中斷請求0 0為邊沿觸發(fā)方式的控制位為邊沿觸發(fā)方式的控制位版權(quán)所有版權(quán)所有 http:/sfrsfr tmod = 0 x89; / tmod = 0 x89; /定時定
15、時/ /計數(shù)模式控制寄存器計數(shù)模式控制寄存器sfrsfr tl0 = 0 x8a; / tl0 = 0 x8a; /定時定時/ /計數(shù)器計數(shù)器0 0低字節(jié)低字節(jié)sfrsfr tl1 = 0 x8b; / tl1 = 0 x8b; /定時定時/ /計數(shù)器計數(shù)器1 1低字節(jié)低字節(jié)sfrsfr th0 = 0 x8c; / th0 = 0 x8c; /定時定時/ /計數(shù)器計數(shù)器0 0高字節(jié)高字節(jié)sfrsfr th1 = 0 x8d; / th1 = 0 x8d; /定時定時/ /計數(shù)器計數(shù)器1 1高字節(jié)高字節(jié)sfrsfr ckcon = 0 x8e; / ckcon = 0 x8e; /時鐘控制寄存
16、器時鐘控制寄存器sfrsfr mws = 0 x8f; / mws = 0 x8f; /存儲器寫選擇控制寄存器存儲器寫選擇控制寄存器sfrsfr p1 = 0 x90; /p1 p1 = 0 x90; /p1口寄存器口寄存器 sbitsbit t2ex = p11; / t2ex = p11; /定時器定時器/ /計數(shù)器計數(shù)器2 2的外部控制輸入的外部控制輸入 sbitsbit t2 = p10; / t2 = p10; /定時器定時器/ /計數(shù)器計數(shù)器2 2的外部輸入的外部輸入sfrsfr exif = 0 x91; / exif = 0 x91; /外部中斷標(biāo)志寄存器外部中斷標(biāo)志寄存器sf
17、rsfr mpage = 0 x92; / mpage = 0 x92; /存儲器分頁寄存器存儲器分頁寄存器sfrsfr caddr = 0 x93; / caddr = 0 x93; /配置地址寄存器配置地址寄存器sfrsfr cdata = 0 x94; / cdata = 0 x94; /配置數(shù)據(jù)寄存器配置數(shù)據(jù)寄存器sfrsfr mcon = 0 x95; / mcon = 0 x95; /存儲器控制寄存器存儲器控制寄存器sfrsfr scon0 = 0 x98; / scon0 = 0 x98; /串口串口0 0控制寄存器控制寄存器 sbitsbit sm0_0 = scon07; /
18、uart0 sm0_0 = scon07; /uart0工作方式設(shè)定工作方式設(shè)定 sbitsbit sm1_0 = scon06; /uart0 sm1_0 = scon06; /uart0工作方式設(shè)定工作方式設(shè)定 sbitsbit sm2_0 = scon05; /uart0 sm2_0 = scon05; /uart0的的sm2sm2設(shè)定設(shè)定 sbitsbit ren_0 = scon04; / ren_0 = scon04; /接收允許位接收允許位 sbitsbit tb8_0 = scon03; / tb8_0 = scon03; /發(fā)送數(shù)據(jù)的第九位發(fā)送數(shù)據(jù)的第九位 sbitsbit
19、rb8_0 = scon02; / rb8_0 = scon02; /接收數(shù)據(jù)的第九位接收數(shù)據(jù)的第九位 sbitsbit ti_0 = scon01; ti_0 = scon01; / /發(fā)送中斷標(biāo)志發(fā)送中斷標(biāo)志 sbitsbit ri_0 = scon00; ri_0 = scon00; /接收中斷標(biāo)志接收中斷標(biāo)志sfrsfr sbuf0 = 0 x99; sbuf0 = 0 x99; /串口串口0 0數(shù)據(jù)緩沖器數(shù)據(jù)緩沖器sfrsfr sbuf = 0 x99; sbuf = 0 x99; /串口數(shù)據(jù)緩沖器串口數(shù)據(jù)緩沖器版權(quán)所有版權(quán)所有 http:/sfrsfr spicon = 0 x9a
20、; spicon = 0 x9a; /spi/spi控制寄存器控制寄存器sfrsfr i2ccon = 0 x9a; i2ccon = 0 x9a; /i2c/i2c控制器控制器sfrsfr spidata = 0 x9b; spidata = 0 x9b; /spi/spi數(shù)據(jù)寄存器數(shù)據(jù)寄存器sfrsfr i2cdata = 0 x9b; i2cdata = 0 x9b; /i2c/i2c數(shù)據(jù)寄存器數(shù)據(jù)寄存器sfrsfr spircon = 0 x9c; spircon = 0 x9c; /spi/spi接收控制寄存器接收控制寄存器sfrsfr i2ccmen = 0 x9c; i2ccme
21、n = 0 x9c; /i2c /i2c控制寄存器控制寄存器sfrsfr spitcon = 0 x9d; spitcon = 0 x9d; /spi/spi發(fā)送控制寄存器發(fā)送控制寄存器sfrsfr i2cstat = 0 x9d; i2cstat = 0 x9d; /i2c/i2c狀態(tài)寄存器狀態(tài)寄存器sfrsfr spistart = 0 x9e; /spi spistart = 0 x9e; /spi緩沖器起始地址緩沖器起始地址sfrsfr spiend = 0 x9f; /spi spiend = 0 x9f; /spi緩沖器結(jié)束地址緩沖器結(jié)束地址sfrsfr p2 = 0 xa0; /
22、p2 p2 = 0 xa0; /p2口寄存器口寄存器sfrsfr pwmcon = 0 xa1; /pwm pwmcon = 0 xa1; /pwm控制寄存器控制寄存器sfrsfr pwmlow = 0 xa2; /pwm pwmlow = 0 xa2; /pwm低字節(jié)低字節(jié)sfrsfr tonelow = 0 xa2; / tonelow = 0 xa2; /音調(diào)低字節(jié)音調(diào)低字節(jié)sfrsfr pwmhi = 0 xa3; /pwm pwmhi = 0 xa3; /pwm高字節(jié)高字節(jié)sfrsfr tonehi = 0 xa3; / tonehi = 0 xa3; /音調(diào)高字節(jié)音調(diào)高字節(jié)sfrs
23、fr pai = 0 xa5; / pai = 0 xa5; /輔助中斷掛起寄存器輔助中斷掛起寄存器sfrsfr aie = 0 xa6; / aie = 0 xa6; /輔助中斷允許寄存器輔助中斷允許寄存器sfrsfr aistat = 0 xa7; / aistat = 0 xa7; /輔助中斷狀態(tài)寄存器輔助中斷狀態(tài)寄存器sfrsfr ie = 0 xa8; / ie = 0 xa8; /中斷允許寄存器中斷允許寄存器 sbitsbit ea = ie7; / ea = ie7; /總中斷允許位總中斷允許位 sbitsbit es = ie4; es = ie4; /串行中斷允許位串行中斷允
24、許位 sbitsbit et1 = ie3; et1 = ie3; /定時器定時器1 1溢出中斷允許位溢出中斷允許位 sbitsbit ex1 = ie2; ex1 = ie2; /外部中斷外部中斷1 1允許位允許位 sbitsbit et0 = ie1; et0 = ie1; /定時器定時器0 0溢出中斷允許位溢出中斷允許位 sbitsbit ex0 = ie0; ex0 = ie0; /外部中斷外部中斷0 0允許位允許位版權(quán)所有版權(quán)所有 http:/sfrsfr bpcon = 0 xa9; / bpcon = 0 xa9; /斷點(diǎn)控制寄存器斷點(diǎn)控制寄存器sfrsfr bpl = 0 xa
25、a; / bpl = 0 xaa; /斷點(diǎn)低字節(jié)地址斷點(diǎn)低字節(jié)地址sfrsfr bph = 0 xab; / bph = 0 xab; /斷點(diǎn)高字節(jié)地址斷點(diǎn)高字節(jié)地址sfrsfr p0ddrl = 0 xac; /p0 p0ddrl = 0 xac; /p0口數(shù)據(jù)流向寄存器低字節(jié)口數(shù)據(jù)流向寄存器低字節(jié)sfrsfr p0ddrh = 0 xad; p0ddrh = 0 xad; /p0/p0口數(shù)據(jù)流向寄存器高字節(jié)口數(shù)據(jù)流向寄存器高字節(jié)sfrsfr p1ddrl = 0 xae; /p1 p1ddrl = 0 xae; /p1口數(shù)據(jù)流向寄存器低字節(jié)口數(shù)據(jù)流向寄存器低字節(jié)sfrsfr p1ddrh
26、= 0 xaf; /p1 p1ddrh = 0 xaf; /p1口數(shù)據(jù)流向寄存器高字節(jié)口數(shù)據(jù)流向寄存器高字節(jié)sfrsfr p3 = 0 xb0; /p3 p3 = 0 xb0; /p3口寄存器口寄存器 sbitsbit rd = p37; rd = p37; / /外部數(shù)據(jù)存儲器讀選通外部數(shù)據(jù)存儲器讀選通 sbitsbit wr = p36; wr = p36; / /外部數(shù)據(jù)存儲器寫選通外部數(shù)據(jù)存儲器寫選通 sbitsbit t1 = p35; t1 = p35; /定時器定時器1 1外部輸入外部輸入 sbitsbit t0 = p34; / t0 = p34; /定時器定時器0 0外部輸入
27、外部輸入 sbitsbit int1 = p33; / int1 = p33; /外部中斷外部中斷1 1 sbitsbit int0 = p32; / int0 = p32; /外部中斷外部中斷0 0 sbitsbit txd = p31; / txd = p31; /串行輸入通道串行輸入通道 sbitsbit rxd = p30; / rxd = p30; /串行輸出通道串行輸出通道sfrsfr p2ddrl = 0 xb1; /p2 p2ddrl = 0 xb1; /p2口數(shù)據(jù)流向寄存器低字節(jié)口數(shù)據(jù)流向寄存器低字節(jié)sfrsfr p2ddrh = 0 xb2; /p2 p2ddrh = 0
28、xb2; /p2口數(shù)據(jù)流向寄存器高字節(jié)口數(shù)據(jù)流向寄存器高字節(jié)sfrsfr p3ddrl = 0 xb3; /p3 p3ddrl = 0 xb3; /p3口數(shù)據(jù)流向寄存器低字節(jié)口數(shù)據(jù)流向寄存器低字節(jié)sfrsfr p3ddrh = 0 xb4; /p3 p3ddrh = 0 xb4; /p3口數(shù)據(jù)流向寄存器高字節(jié)口數(shù)據(jù)流向寄存器高字節(jié)sfrsfr dacl = 0 xb5; /dac dacl = 0 xb5; /dac數(shù)據(jù)低字節(jié)數(shù)據(jù)低字節(jié)sfrsfr dach = 0 xb6; /dac dach = 0 xb6; /dac數(shù)據(jù)高字節(jié)數(shù)據(jù)高字節(jié)sfrsfr daccon = 0 xb7; /da
29、c daccon = 0 xb7; /dac控制寄存器控制寄存器 / /實(shí)際應(yīng)為實(shí)際應(yīng)為dacseldacselsfrsfr ip = 0 xb8; / ip = 0 xb8; /中斷優(yōu)先級寄存器中斷優(yōu)先級寄存器 sbitsbit ps = ip4; / ps = ip4; /決定串行中斷優(yōu)先級決定串行中斷優(yōu)先級 sbitsbit pt1 = ip3; / pt1 = ip3; /決定定時器決定定時器1 1中斷優(yōu)先級中斷優(yōu)先級 sbitsbit px1 = ip2; / px1 = ip2; /決定外部中斷決定外部中斷1 1優(yōu)先級優(yōu)先級 sbitsbit pt0 = ip1; / pt0 =
30、ip1; /決定定時器決定定時器0 0中斷優(yōu)先級中斷優(yōu)先級 sbitsbit px0 = ip0; / px0 = ip0; /決定外部中斷決定外部中斷0 0優(yōu)先級優(yōu)先級版權(quán)所有版權(quán)所有 http:/sfrsfr scon1 = 0 xc0; / scon1 = 0 xc0; /串口串口1 1控制寄存器控制寄存器 sbitsbit sm0_1 = scon17; sm0_1 = scon17; /uart1/uart1工作方式設(shè)定工作方式設(shè)定 sbitsbit sm1_1 = scon16; /uart1 sm1_1 = scon16; /uart1工作方式設(shè)定工作方式設(shè)定 sbitsbit
31、sm2_1 = scon15; /uart1 sm2_1 = scon15; /uart1的的sm2sm2設(shè)定設(shè)定 sbitsbit ren_1 = scon14; / ren_1 = scon14; /接收允許位接收允許位 sbitsbit tb8_1 = scon13; / tb8_1 = scon13; /發(fā)送數(shù)據(jù)的第九位發(fā)送數(shù)據(jù)的第九位 sbitsbit rb8_1 = scon12; / rb8_1 = scon12; /接收數(shù)據(jù)的第九位接收數(shù)據(jù)的第九位 sbitsbit ti_1 = scon11; / ti_1 = scon11; /發(fā)送中斷標(biāo)志發(fā)送中斷標(biāo)志 sbitsbit r
32、i_1 = scon10; / ri_1 = scon10; /接收中斷標(biāo)志接收中斷標(biāo)志sfrsfr sbuf1 = 0 xc1; / sbuf1 = 0 xc1; /串口串口1 1數(shù)據(jù)緩沖器數(shù)據(jù)緩沖器sfrsfr ewu = 0 xc6; ewu = 0 xc6; /空閑模式喚醒允許寄存器空閑模式喚醒允許寄存器sfrsfr t2con = 0 xc8; t2con = 0 xc8; /定時器定時器2 2控制寄存器控制寄存器 sbitsbit tf2 = t2con7; tf2 = t2con7; /定時器定時器2 2溢出標(biāo)志位溢出標(biāo)志位 sbitsbit exf2 = t2con6; / e
33、xf2 = t2con6; /定時器定時器2 2外部中斷標(biāo)志位外部中斷標(biāo)志位 sbitsbit rclk = t2con5; / rclk = t2con5; /接收時鐘標(biāo)志位接收時鐘標(biāo)志位 sbitsbit tclk = t2con4; / tclk = t2con4; /發(fā)送時鐘標(biāo)志位發(fā)送時鐘標(biāo)志位 sbitsbit exen2 = t2con3; / exen2 = t2con3; /定時器定時器2 2捕捉捕捉/ /重載允許位重載允許位 sbitsbit tr2 = t2con2; / tr2 = t2con2; /定時器定時器2 2運(yùn)行控制位運(yùn)行控制位 sbitsbit c_t2 =
34、t2con1; /t2 c_t2 = t2con1; /t2定時定時/ /計數(shù)選擇位計數(shù)選擇位 sbitsbit cp_rl2 = t2con0; / cp_rl2 = t2con0; /捕捉捕捉/ /重載選擇位重載選擇位sfrsfr rcap2l = 0 xca; / rcap2l = 0 xca; /定時器定時器2 2捕捉控制寄存器低字節(jié)捕捉控制寄存器低字節(jié)sfrsfr rcap2h = 0 xcb; / rcap2h = 0 xcb; /定時器定時器2 2捕捉控制寄存器高字節(jié)捕捉控制寄存器高字節(jié)sfrsfr tl2 = 0 xcc; / tl2 = 0 xcc; /定時器定時器2 2的低
35、字節(jié)的低字節(jié)sfrsfr th2 = 0 xcd; / th2 = 0 xcd; /定時器定時器2 2的高字節(jié)的高字節(jié)版權(quán)所有版權(quán)所有 http:/sfrsfr psw = 0 xd0; / psw = 0 xd0; /程序狀態(tài)字寄存器程序狀態(tài)字寄存器 sbitsbit cy = psw7; cy = psw7; /進(jìn)位標(biāo)志位進(jìn)位標(biāo)志位 sbitsbit ac = psw6; / ac = psw6; /輔助進(jìn)位標(biāo)志位輔助進(jìn)位標(biāo)志位 sbitsbit f0 = psw5; / f0 = psw5; /用戶標(biāo)志位用戶標(biāo)志位 sbitsbit rs1 = psw4; / rs1 = psw4; /
36、工作寄存器組選擇控制位工作寄存器組選擇控制位 sbitsbit rs0 = psw3; / rs0 = psw3; /工作寄存器組選擇控制位工作寄存器組選擇控制位 sbitsbit ov = psw2; / ov = psw2; /溢出標(biāo)志位溢出標(biāo)志位 sbitsbit p = psw0; / p = psw0; /奇偶標(biāo)志位奇偶標(biāo)志位sfrsfr ocl = 0 xd1; /adc ocl = 0 xd1; /adc失調(diào)校準(zhǔn)寄存器低字節(jié)失調(diào)校準(zhǔn)寄存器低字節(jié)sfrsfr ocm = 0 xd2; ocm = 0 xd2; /adc/adc失調(diào)校準(zhǔn)寄存器中間字節(jié)失調(diào)校準(zhǔn)寄存器中間字節(jié)sfrsfr
37、 och = 0 xd3; och = 0 xd3; /adc/adc失調(diào)校準(zhǔn)寄存器高字節(jié)失調(diào)校準(zhǔn)寄存器高字節(jié)sfrsfr gcl = 0 xd4; gcl = 0 xd4; /adc/adc增益校準(zhǔn)寄存器低字節(jié)增益校準(zhǔn)寄存器低字節(jié)sfrsfr gcm = 0 xd5; gcm = 0 xd5; /adc/adc增益校準(zhǔn)寄存器中間字節(jié)增益校準(zhǔn)寄存器中間字節(jié)sfrsfr gch = 0 xd6; gch = 0 xd6; /adc/adc增益校準(zhǔn)寄存器高字節(jié)增益校準(zhǔn)寄存器高字節(jié)sfrsfr admux = 0 xd7; admux = 0 xd7; /adc/adc多路開關(guān)寄存器多路開關(guān)寄存器s
38、frsfr eicon = 0 xd8; / eicon = 0 xd8; /中斷允許控制寄存器中斷允許控制寄存器 sbitsbit smod1 = eicon7; smod1 = eicon7; /串口串口1 1模式模式 sbitsbit eai = eicon5; / eai = eicon5; /輔助中斷使能輔助中斷使能 sbitsbit ai = eicon4; / ai = eicon4; /輔助中斷標(biāo)志輔助中斷標(biāo)志 sbitsbit wdti = eicon3; / wdti = eicon3; /看門狗中斷標(biāo)志看門狗中斷標(biāo)志sfrsfr adresl = 0 xd9; /adc
39、adresl = 0 xd9; /adc轉(zhuǎn)換結(jié)果寄存器低字節(jié)轉(zhuǎn)換結(jié)果寄存器低字節(jié)sfrsfr adresm = 0 xda; adresm = 0 xda; /adc/adc轉(zhuǎn)換結(jié)果寄存器中間字節(jié)轉(zhuǎn)換結(jié)果寄存器中間字節(jié)sfrsfr adresh = 0 xdb; adresh = 0 xdb; /adc/adc轉(zhuǎn)換結(jié)果寄存器高字節(jié)轉(zhuǎn)換結(jié)果寄存器高字節(jié)sfrsfr adcon0 = 0 xdc; adcon0 = 0 xdc; /adc/adc控制寄存器控制寄存器0 0sfrsfr adcon1 = 0 xdd; adcon1 = 0 xdd; /adc/adc控制寄存器控制寄存器1 1sfrs
40、fr adcon2 = 0 xde; adcon2 = 0 xde; /adc/adc控制寄存器控制寄存器2 2sfrsfr adcon3 = 0 xdf; adcon3 = 0 xdf; /adc/adc控制寄存器控制寄存器3 3版權(quán)所有版權(quán)所有 http:/sfrsfr acc = 0 xe0; / acc = 0 xe0; /累加器累加器sfrsfr sscon = 0 xe1; sscon = 0 xe1; /求和求和/ /移位寄存器控制寄存器移位寄存器控制寄存器sfrsfr sumr0 = 0 xe2; sumr0 = 0 xe2; /求和寄存器求和寄存器0 0sfrsfr sumr
41、1 = 0 xe3; sumr1 = 0 xe3; /求和寄存器求和寄存器1 1sfrsfr sumr2 = 0 xe4; sumr2 = 0 xe4; /求和寄存器求和寄存器2 2sfrsfr sumr3 = 0 xe5; sumr3 = 0 xe5; /求和寄存器求和寄存器3 3sfrsfr odac = 0 xe6; odac = 0 xe6; /dac/dac失調(diào)寄存器失調(diào)寄存器sfrsfr lvdcon = 0 xe7; lvdcon = 0 xe7; /低電壓監(jiān)測控制寄存器低電壓監(jiān)測控制寄存器sfrsfr eie = 0 xe8; eie = 0 xe8; /擴(kuò)展中斷允許寄存器擴(kuò)展
42、中斷允許寄存器 sbitsbit ewdi = eie4; ewdi = eie4; / /看門夠中斷使能看門夠中斷使能 sbitsbit ex5 = eie3; / ex5 = eie3; /外部中斷外部中斷5 5使能使能 sbitsbit ex4 = eie2; / ex4 = eie2; /外部中斷外部中斷4 4使能使能 sbitsbit ex3 = eie1; / ex3 = eie1; /外部中斷外部中斷3 3使能使能 sbitsbit ex2 = eie0; / ex2 = eie0; /外部中斷外部中斷2 2使能使能sfrsfr hwpc0 = 0 xe9; hwpc0 = 0
43、xe9; /硬件配置寄存器硬件配置寄存器0 0sfrsfr hwpc1 = 0 xea; hwpc1 = 0 xea; /硬件配置寄存器硬件配置寄存器1 1sfrsfr fmcon = 0 xee; fmcon = 0 xee; /閃存控制寄存器閃存控制寄存器sfrsfr ftcon = 0 xef; ftcon = 0 xef; /閃存定時控制寄存器閃存定時控制寄存器sfrsfr b = 0 xf0; b = 0 xf0; /b /b 寄存器寄存器sfrsfr pdcon = 0 xf1; pdcon = 0 xf1; /掉電控制寄存器掉電控制寄存器sfrsfr pasel = 0 xf2;
44、 pasel = 0 xf2; /psen/ale/psen/ale控制寄存器控制寄存器sfrsfr aclk = 0 xf6; / aclk = 0 xf6; /模擬時鐘寄存器模擬時鐘寄存器sfrsfr srst = 0 xf7; / srst = 0 xf7; /系統(tǒng)復(fù)位寄存器系統(tǒng)復(fù)位寄存器版權(quán)所有版權(quán)所有 http:/sfrsfr eip = 0 xf8; / eip = 0 xf8; /擴(kuò)展中斷優(yōu)先級寄存器擴(kuò)展中斷優(yōu)先級寄存器sfrsfr secint = 0 xf9; / secint = 0 xf9; /秒定時器中斷寄存器秒定時器中斷寄存器sfrsfr msint = 0 xfa;
45、 msint = 0 xfa; /毫秒定時毫秒定時器中斷器中斷寄存器寄存器sfrsfr usec = 0 xfb; usec = 0 xfb; /微秒寄存器微秒寄存器sfrsfr msecl = 0 xfc; msecl = 0 xfc; /毫秒寄存器低字節(jié)毫秒寄存器低字節(jié)sfrsfr msech = 0 xfd; msech = 0 xfd; /毫秒寄存器高字節(jié)毫秒寄存器高字節(jié)sfrsfr hmsec = 0 xfe; hmsec = 0 xfe; /百毫秒寄存器百毫秒寄存器。/注:原文件中為注:原文件中為hmsechhmsech,應(yīng)修改為,應(yīng)修改為hmsechmsec,否則,編譯時會提示找
46、不到,否則,編譯時會提示找不到hmsechmsecsfrsfr wdtcon = 0 xff; wdtcon = 0 xff; /看門狗定時器寄存器看門狗定時器寄存器/ /* * 16 16位寄存器位寄存器 * */ /sfr16 pwm = 0 xa2; sfr16 pwm = 0 xa2; /pwm/pwm寄存器寄存器sfr16 p0ddr = 0 xac; /p0sfr16 p0ddr = 0 xac; /p0口數(shù)據(jù)流向寄存器口數(shù)據(jù)流向寄存器sfr16 p1ddr = 0 xae; /p1sfr16 p1ddr = 0 xae; /p1口數(shù)據(jù)流向寄存器口數(shù)據(jù)流向寄存器sfr16 p2dd
47、r = 0 xb1; /p2sfr16 p2ddr = 0 xb1; /p2口數(shù)據(jù)流向寄存器口數(shù)據(jù)流向寄存器sfr16 p3ddr = 0 xb3; /p3sfr16 p3ddr = 0 xb3; /p3口數(shù)據(jù)流向寄存器口數(shù)據(jù)流向寄存器sfr16 rcap2= 0 xca; /sfr16 rcap2= 0 xca; /定時定時器器捕捉寄存器捕捉寄存器sfr16 thl2 = 0 xcc; /sfr16 thl2 = 0 xcc; /定時器定時器2 2數(shù)據(jù)寄存器數(shù)據(jù)寄存器sfr16 decimation = 0 xde; sfr16 decimation = 0 xde; /adc /adc抽取
48、寄存器抽取寄存器sfr16 msec = 0 xfc; sfr16 msec = 0 xfc; / /毫秒寄存器毫秒寄存器# #endifendif版權(quán)所有版權(quán)所有 http:/ ;-;-; ti msc1210 processor declarations; ti msc1210 processor declarations; copyright (c) ; copyright (c) raisonanceraisonance sa, 1987-2002 sa, 1987-2002;-;-$nomod51$nomod51$save$save$nolist$nolist; byte regis
49、ters; byte registersp0 data 080h ;standard 8051p0 data 080h ;standard 8051sp data 081h ;standard 8051sp data 081h ;standard 8051dpl data 082h ;standard 8051dpl data 082h ;standard 8051dph data 083h ;standard 8051dph data 083h ;standard 8051dpl1 data 084hdpl1 data 084hdph1 data 085hdph1 data 085hdps
50、data 086hdps data 086hpcon data 087h ;standard 8051pcon data 087h ;standard 8051tcon data 088h ;standard 8051tcon data 088h ;standard 8051tmod data 089h ;standard 8051tmod data 089h ;standard 8051tl0 data 08ah ;standard 8051tl0 data 08ah ;standard 8051tl1 data 08bh ;standard 8051tl1 data 08bh ;stand
51、ard 8051th0 data 08ch ;standard 8051th0 data 08ch ;standard 8051th1 data 08dh ;standard 8051th1 data 08dh ;standard 8051ckcon data 08ehckcon data 08ehmws mws data 08fh data 08fhp1 data 090h ;standard 8051p1 data 090h ;standard 8051版權(quán)所有版權(quán)所有 http:/exif data 091hexif data 091hmpage data 092hmpage data
52、092hcaddr data 093hcaddr data 093hcdata data 094hcdata data 094hmcon data 095hmcon data 095hscon data 098h ;standard 8051scon data 098h ;standard 8051sbuf data 099h ;standard 8051sbuf data 099h ;standard 8051spicon data 09ahspicon data 09ahi2ccr data 09ahi2ccr data 09ahspidata data 09bhspidata data
53、09bhi2cdata data 09bhi2cdata data 09bhspircon data 09chspircon data 09chi2ccon data 09chi2ccon data 09chspitcon data 09dhspitcon data 09dhspistart data 09ehspistart data 09ehspiend data 09fhspiend data 09fhp2 data 0a0h ;standard 8051p2 data 0a0h ;standard 8051pwmcon data 0a1hpwmcon data 0a1hpwmlow d
54、ata 0a2hpwmlow data 0a2htonelow tonelow data data 0a2h0a2hpwmhi data 0a3hpwmhi data 0a3htonehi tonehi data 0a3hdata 0a3hpai data 0a5hpai data 0a5haie data 0a6haie data 0a6haistat data 0a7haistat data 0a7hie data 0a8h ;standard 8051ie data 0a8h ;standard 8051版權(quán)所有版權(quán)所有 http:/bpcon data 0a9hbpcon data 0
55、a9hbpl data 0aahbpl data 0aahbph data 0abhbph data 0abhp0ddrl data 0achp0ddrl data 0achp0ddrh data 0adhp0ddrh data 0adhp1ddrl data 0aehp1ddrl data 0aehp1ddrh data 0afhp1ddrh data 0afhp3 data 0b0h ;standard 8051p3 data 0b0h ;standard 8051p2ddrl data 0b1hp2ddrl data 0b1hp2ddrh data 0b2hp2ddrh data 0b2
56、hp3ddrl data 0b3hp3ddrl data 0b3hp3ddrh data 0b4hp3ddrh data 0b4hdacldacl datadata 0b5h0b5hdachdach datadata 0b6h0b6hdaccon daccon data 0b7hdata 0b7hip data 0b8h ;standard 8051ip data 0b8h ;standard 8051scon1 scon1 data 0c0hdata 0c0hsbuf1 sbuf1 data 0c1h data 0c1hewu data 0c6hewu data 0c6hsysclksysc
57、lk datadata 0c7h0c7ht2con t2con data 0c8h ;8052 registerdata 0c8h ;8052 registerrcap2l rcap2l data 0cah ;8052 registerdata 0cah ;8052 registerrcap2h rcap2h data 0cbh ;8052 registerdata 0cbh ;8052 registertl2 data 0cch ;8052 registertl2 data 0cch ;8052 registerth2 data 0cdh ;8052 registerth2 data 0cd
58、h ;8052 registerpsw data 0d0h ;standard 8051psw data 0d0h ;standard 8051版權(quán)所有版權(quán)所有 http:/ocl data 0d1hocl data 0d1hocm data 0d2hocm data 0d2hoch data 0d3hoch data 0d3hgcl data 0d4hgcl data 0d4hgcm data 0d5hgcm data 0d5hgch data 0d6hgch data 0d6hadmux admux data 0d7hdata 0d7heicon eicon data 0d8hdata 0
59、d8hadresl data 0d9hadresl data 0d9hadresm data 0dahadresm data 0dahadresh data 0dbhadresh data 0dbhadcon0 data 0dchadcon0 data 0dchadcon1 data 0ddhadcon1 data 0ddhadcon2 data 0dehadcon2 data 0dehadcon3 data 0dfhadcon3 data 0dfhacc data 0e0h ;standard 8051acc data 0e0h ;standard 8051sscon sscon data
60、0e1hdata 0e1hsumr0 sumr0 data 0e2hdata 0e2hsumr1 sumr1 data 0e3hdata 0e3hsumr2 sumr2 data 0e4hdata 0e4hsumr3 sumr3 data 0e5hdata 0e5hodac odac data 0e6hdata 0e6hlvdcon data 0e7hlvdcon data 0e7heie data 0e8heie data 0e8hhwpc0 hwpc0 data 0e9hdata 0e9hhwpc1 hwpc1 data 0eahdata 0eahhwid hwid data 0ebhda
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年采礦權(quán)轉(zhuǎn)讓合同范本
- 二手設(shè)備選購協(xié)議
- 個人短期用工合同范本
- 中外合資公司股東合同
- 上海租房租賃合同
- 2024年農(nóng)村家庭農(nóng)場土地使用權(quán)轉(zhuǎn)讓協(xié)議
- 工程材料供應(yīng)居間合同范本
- 公司運(yùn)作專項法律服務(wù)合同書
- 引進(jìn)博士人才協(xié)議書范本
- 2024年婚前協(xié)議與離婚協(xié)議書沖突
- 醫(yī)院給排水設(shè)計及施工要點(diǎn)分享
- QJ44型直流雙臂電橋使用說明書
- 帷幕灌漿孔原始記錄表
- 《臨床決策分析》課件.ppt
- 淚道沖洗PPT學(xué)習(xí)教案
- 新課程背景下初中語文教學(xué)的轉(zhuǎn)變與創(chuàng)新
- 咖啡種植標(biāo)準(zhǔn)化規(guī)程
- 上海大眾汽車商務(wù)禮儀培訓(xùn)PPT課件
- 理論力學(xué)習(xí)題集含答案
- 驅(qū)動壓在肺保護(hù)性通氣策略中的研究進(jìn)展(全文)
評論
0/150
提交評論