freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

嵌入式系統(tǒng)實訓(xùn)報告-文庫吧

2025-07-30 12:29 本頁面


【正文】 UART 發(fā)送 UART 接收 圖 2 五、程序代碼 include void Delay(unsigned int t) { unsigned int i。 while(t) { i=3000。while(i)。 } } void InitUART0(void) { PINSEL0 = (PINSEL0 amp。 0xfffffff0)| (0x010) | (0x012)。 U0LCR = 0x80。 U0DLM = 0。 U0DLL = 180。 U0LCR = 0x03。 } unsigned char UART0_RcvByte(void) { unsigned char rcv_data。 4 while((U0LSR amp。 0x01) == 0)。 rcv_data = U0RBR。 return(rcv_data)。 } int main(void) { unsigned char rcv_data。 PINSEL0 = PINSEL0 amp。 (~(3ul6))。 IO0DIR = IO0DIR | (1ul3)。 InitUART0()。 while(1) { rcv_data = UART0_RcvByte()39。039。 if(rcv_data==0) { IO0SET =1ul3。 IO0SET =1ul7。 IO1SET =1ul24。 IO1SET =1ul25。 } else { IO0CLR =1ul3。 IO0CLR =1ul7。 IO1CLR =1ul24。 IO1CLR =1ul25。 } } } 第三階段 中斷系統(tǒng)的使用 一、實訓(xùn) 目的 理解 LPC21XX 系列處理器的中斷系統(tǒng) 5 掌握中斷的概念和 LPC21XX 中斷系統(tǒng)的程序編寫方法 二、實訓(xùn)內(nèi)容 使用中斷的方法接收 UART 發(fā)送過來的數(shù)據(jù),然后再控制 LED 的亮和滅,當(dāng)收到 0 時,熄滅 LED,否則點亮。 PC 端使用的是串口調(diào)試助手。 三、實訓(xùn)設(shè)備 一組設(shè)備為:普通 PC 、 嵌入式系統(tǒng)實驗板 四、中斷的使用 中斷使用流程 步驟如圖 3所示。 中斷源使能相關(guān)中斷選擇中斷類型分配 IRQ 槽設(shè)置中斷服務(wù)程序地址使能中斷 圖 3 五、程序代碼 include unsigned int Getsome。 void InitUART0(void) { PINSEL0 = (PINSEL0 amp。 0xfffffff0)| (0x010) | (0x012)。 U0LCR = 0x80。 U0DLM = 0。 U0DLL = 180。 U0LCR = 0x03。 U0IER = U0IER amp。 0xfe | 0x01。 } void InitVIC(void) 6 { VICIntSelect = VICIntSelect amp。 (~(1ul6))。 VICVectCntl2 = 0x20 | 0x06。 VICVectAddr2 = (unsigned int)UART0_R
點擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1