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

技術(shù)熱線: 4007-888-234

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

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

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

技術(shù)支持

PIC16F877擴(kuò)展6264的程序

更新時(shí)間: 2019-03-26

# 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寫程序 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); }

 



404
返回首頁(yè) |  返回上一頁(yè)
双牌县| 龙口市| 股票| 会同县| 静海县| 安平县| 黄骅市| 铜鼓县| 丹江口市| 新丰县| 玉环县| 桦南县| 金阳县| 治县。| 临江市| 类乌齐县| 象山县| 莱阳市| 西昌市| 东乌珠穆沁旗| 巴彦县| 福安市| 淮安市| 兰考县| 乌恰县| 宜兰县| 陆川县| 平利县| 休宁县| 新余市| 浮山县| 惠来县| 阳山县| 凌海市| 两当县| 敦化市| 朝阳县| 怀柔区| 专栏| 天峻县| 名山县|