中文字幕无码不卡一区二区三区_少妇被又大又粗又爽毛片久久黑人_91精品国产在热久久无毒不卡_久久久久久亚洲综合网站

技術(shù)熱線: 4007-888-234
設(shè)計(jì)開(kāi)發(fā)

專注差異化嵌入式產(chǎn)品解決方案 給智能產(chǎn)品定制注入靈魂給予生命

開(kāi)發(fā)工具

提供開(kāi)發(fā)工具、應(yīng)用測(cè)試 完善的開(kāi)發(fā)代碼案例庫(kù)分享

技術(shù)支持

從全面的產(chǎn)品導(dǎo)入到強(qiáng)大技術(shù)支援服務(wù) 全程貼心伴隨服務(wù),創(chuàng)造無(wú)限潛能!

新品推廣

提供新的芯片及解決方案,提升客戶產(chǎn)品競(jìng)爭(zhēng)力

新聞中心

提供最新的單片機(jī)資訊,行業(yè)消息以及公司新聞動(dòng)態(tài)

PIC16F877擴(kuò)展6264的程序

更新時(shí)間: 2019-03-26
閱讀量:1812

# include # define unch unsigned char # define unint unsigned int # define OE RE0 # define WR RE1 # define GS RE2 //373鎖存器的片選端

//延時(shí)程序 void delay(void) { unint i; for(i = 0;i < 0xfff;i++) continue; } //RAM讀程序 void read(unch *data,unint address,unch num) { unint addressl,addressh; unint i; for(i = 0;i < num;i++,data++) { addressh = address % 256; addressl = address / 256; TRISE = 0x00; //設(shè)置RE端為輸出 TRISD = 0x00; TRISB = 0x00; GS = 1; //鎖存器的使能端 PORTD = addressl; //D口設(shè)置為地址低8PORTB = addressh; //A口設(shè)置為地址高5asm("nop"); asm("nop"); GS = 0; WR = 1; OE = 0; TRISD = 0xFF; *data = PORTD; //讀入數(shù)據(jù) asm("nop"); asm("nop"); OE = 1; address = address + 1; } } //RAM寫(xiě)程序 void write(unch *data, unint address, unint num) { unint addressl,addressh; unint i; for(i = 0;i < num; i++,data++) { addressh = address % 256; addressl = address / 256; TRISE = 0x00; //設(shè)置RE口為輸出 TRISD = 0x00; TRISB = 0x00; GS = 1; //鎖存器的使能端 PORTD = addressl; //D口設(shè)置為地址低8PORTA = addressh; //A口設(shè)置為地址低5asm("nop"); asm("nop"); GS = 0; //鎖存地址 WR = 0; PORTD = *data; asm("nop"); asm("nop"); WR = 1; address = address + 1; } }

main() { unch string[],str[5]={0x23,0x34,0x54,0x23,0x72}; write(str,0,5); TRISA = 0xFF; TRISB = 0xFF; TRISE = 0xFF; TRISD = 0xFF; read(string,0,5); while(1); }

 



平武县| 黄山市| 鄂托克旗| 西畴县| 绥棱县| 五寨县| 韶关市| 百色市| 桂林市| 临泉县| 前郭尔| 和平区| 崇州市| 兴安县| 台州市| 姚安县| 南京市| 来安县| 会昌县| 通海县| 无为县| 丹江口市| 满洲里市| 福鼎市| 高尔夫| 双流县| 伊川县| 确山县| 威海市| 繁峙县| 龙口市| 太谷县| 岑巩县| 烟台市| 丰都县| 措美县| 南川市| 乐亭县| 东丽区| 宜宾县| 彩票|