Communication protocols – for short protocols – form the basis for the opera- tion of computer networks and telecommunication systems. They are behavior conventions which describe how communication systems interact with each other in computer networks. Protocols Define the temporal order of the interactions and the formats of the data units exchanged. Communication protocols comprise a wide range of different functions and mechanisms, such as the sending and receiv- ing of data units, their coding/decoding, error control mechanisms, timer control, flow control, and many others.
標簽: Engineering Protocol
上傳時間: 2020-05-31
上傳用戶:shancjb
This book intends to prepare you to Define Unified Communications (UC) for yourself and then get it to work for you. Each vendor pulls together from its available products a package of features related to voice, data, messaging, and image communications. That’s UC for one vendor, but it’s unlikely to match exactly the UC from another vendor. You need a detailed specification to know what you’ll see installed.
標簽: Communications Unified VoIP and
上傳時間: 2020-06-01
上傳用戶:shancjb
A kinematically redundant manipulator is a serial robotic arm that has more independently driven joints than are necessary to Define the desired pose (position and orientation) of its end-effector. With this definition, any planar manipulator (a manipulator whose end-effector motion is restrained in a plane) with more than three joints is a redundant manipulator. Also, a manipulator whose end-effector can accept aspatialposeisaredundant manipulator ifithas morethan sixindependently driven joints. For example, the manipulator shown in Fig. 1.1 has two 7-DOF arms mounted on a torso with three degrees of freedom (DOFs). This provides 10 DOFs for each arm. Since the end-effector of each arm can have a spatial motion with six DOFs, the arms are redundant.
標簽: Autonomous Modeling Planning Robots Path
上傳時間: 2020-06-10
上傳用戶:shancjb
This book is intended to be a general introduction to neural networks for those with a computer architecture, circuits, or systems background. In the introduction (Chapter 1), we Define key vo- cabulary, recap the history and evolution of the techniques, and for make the case for additional hardware support in the field.
標簽: Deep_Learning_for_Computer_Archit ects
上傳時間: 2020-06-10
上傳用戶:shancjb
#include<stdio.h> #Define TREEMAX 100 typedef struct BT { char data; BT *lchild; BT *rchild; }BT; BT *CreateTree(); void Preorder(BT *T); void Postorder(BT *T); void Inorder(BT *T); void Leafnum(BT *T); void Nodenum(BT *T); int TreeDepth(BT *T); int count=0; void main() { BT *T=NULL; char ch1,ch2,a; ch1='y'; while(ch1=='y'||ch1=='y') { printf("\n"); printf("\n\t\t 二叉樹子系統"); printf("\n\t\t*****************************************"); printf("\n\t\t 1---------建二叉樹 "); printf("\n\t\t 2---------先序遍歷 "); printf("\n\t\t 3---------中序遍歷 "); printf("\n\t\t 4---------后序遍歷 "); printf("\n\t\t 5---------求葉子數 "); printf("\n\t\t 6---------求結點數 "); printf("\n\t\t 7---------求樹深度 "); printf("\n\t\t 0---------返 回 "); printf("\n\t\t*****************************************"); printf("\n\t\t 請選擇菜單號 (0--7)"); scanf("%c",&ch2); getchar(); printf("\n"); switch(ch2) { case'1': printf("\n\t\t請按先序序列輸入二叉樹的結點:\n"); printf("\n\t\t說明:輸入結點(‘0’代表后繼結點為空)后按回車。\n"); printf("\n\t\t請輸入根結點:"); T=CreateTree(); printf("\n\t\t二叉樹成功建立!\n");break; case'2': printf("\n\t\t該二叉樹的先序遍歷序列為:"); Preorder(T);break; case'3': printf("\n\t\t該二叉樹的中序遍歷序列為:"); Inorder(T);break; case'4': printf("\n\t\t該二叉樹的后序遍歷序列為:"); Postorder(T);break; case'5': count=0;Leafnum(T); printf("\n\t\t該二叉樹有%d個葉子。\n",count);break; case'6': count=0;Nodenum(T); printf("\n\t\t該二叉樹總共有%d個結點。\n",count);break; case'7': printf("\n\t\t該樹的深度為:%d",TreeDepth(T)); break; case'0': ch1='n';break; default: printf("\n\t\t***請注意:輸入有誤!***"); } if(ch2!='0') { printf("\n\n\t\t按【Enter】鍵繼續,按任意鍵返回主菜單!\n"); a=getchar(); if(a!='\xA') { getchar(); ch1='n'; } } } } BT *CreateTree() { BT *t; char x; scanf("%c",&x); getchar(); if(x=='0') t=NULL; else { t=new BT; t->data=x; printf("\n\t\t請輸入%c結點的左子結點:",t->data); t->lchild=CreateTree(); printf("\n\t\t請輸入%c結點的右子結點:",t->data); t->rchild=CreateTree(); } return t; } void Preorder(BT *T) { if(T) { printf("%3c",T->data); Preorder(T->lchild); Preorder(T->rchild); } } void Inorder(BT *T) { if(T) { Inorder(T->lchild); printf("%3c",T->data); Inorder(T->rchild); } } void Postorder(BT *T) { if(T) { Postorder(T->lchild); Postorder(T->rchild); printf("%3c",T->data); } } void Leafnum(BT *T) { if(T) { if(T->lchild==NULL&&T->rchild==NULL) count++; Leafnum(T->lchild); Leafnum(T->rchild); } } void Nodenum(BT *T) { if(T) { count++; Nodenum(T->lchild); Nodenum(T->rchild); } } int TreeDepth(BT *T) { int ldep,rdep; if(T==NULL) return 0; else { ldep=TreeDepth(T->lchild); rdep=TreeDepth(T->rchild); if(ldep>rdep) return ldep+1; else return rdep+1; } }
上傳時間: 2020-06-11
上傳用戶:ccccy
#include <stdio.h> #include <stdlib.h> #Define SMAX 100 typedef struct SPNode { int i,j,v; }SPNode; struct sparmatrix { int rows,cols,terms; SPNode data [SMAX]; }; sparmatrix CreateSparmatrix() { sparmatrix A; printf("\n\t\t請輸入稀疏矩陣的行數,列數和非零元素個數(用逗號隔開):"); scanf("%d,%d,%d",&A.cols,&A.terms); for(int n=0;n<=A.terms-1;n++) { printf("\n\t\t輸入非零元素值(格式:行號,列號,值):"); scanf("%d,%d,%d",&A.data[n].i,&A.data[n].j,&A.data[n].v); } return A; } void ShowSparmatrix(sparmatrix A) { int k; printf("\n\t\t"); for(int x=0;x<=A.rows-1;x++) { for(int y=0;y<=A.cols-1;y++) { k=0; for(int n=0;n<=A.terms-1;n++) { if((A.data[n].i-1==x)&&(A.data[n].j-1==y)) { printf("%8d",A.data[n].v); k=1; } } if(k==0) printf("%8d",k); } printf("\n\t\t"); } } void sumsparmatrix(sparmatrix A) { SPNode *p; p=(SPNode*)malloc(sizeof(SPNode)); p->v=0; int k; k=0; printf("\n\t\t"); for(int x=0;x<=A.rows-1;x++) { for(int y=0;y<=A.cols-1;y++) { for(int n=0;n<=A.terms;n++) { if((A.data[n].i==x)&&(A.data[n].j==y)&&(x==y)) { p->v=p->v+A.data[n].v; k=1; } } } printf("\n\t\t"); } if(k==1) printf("\n\t\t對角線元素的和::%d\n",p->v); else printf("\n\t\t對角線元素的和為::0"); } int main() { int ch=1,choice; struct sparmatrix A; A.terms=0; while(ch) { printf("\n"); printf("\n\t\t 稀疏矩陣的三元組系統 "); printf("\n\t\t*********************************"); printf("\n\t\t 1------------創建 "); printf("\n\t\t 2------------顯示 "); printf("\n\t\t 3------------求對角線元素和"); printf("\n\t\t 4------------返回 "); printf("\n\t\t*********************************"); printf("\n\t\t請選擇菜單號(0-3):"); scanf("%d",&choice); switch(choice) { case 1: A=CreateSparmatrix(); break; case 2: ShowSparmatrix(A); break; case 3: SumSparmatrix(A); break; default: system("cls"); printf("\n\t\t輸入錯誤!請重新輸入!\n"); break; } if (choice==1||choice==2||choice==3) { printf("\n\t\t"); system("pause"); system("cls"); } else system("cls"); } }
上傳時間: 2020-06-11
上傳用戶:ccccy
題目:基于51單片機的RS485從機系統設計 單片機接口資源配置: 1. 上電復位電路; 2. 晶振電路采用11.0592Mhz晶振; 3. 485接口電路(P3.7用于485芯片的收發控制,收發管腳接單片機的rxd和txd); 4. P2口通過外部跳線接相應的高低電平,配置從機地址為組號; 5. P3.6外接一發光二極管(注意串聯電阻進行限流); 6. P3.2外接一按鍵,斷開高電平,按下低電平; 7. 按鍵檢測采用外部中斷方式,下跳沿觸發; 8. 單片機定時器0以模式1(16位模式)工作,產生50ms的定時中斷,并在此基礎上設計一單片機內部時鐘(24小時制,能計數時、分、秒、50ms值); 9. 單片機串行通信采用模式1非多機通信方式,采用9600波特率以串行中斷方式進行數據的收發通信,主機地址為0xF0,廣播地址為0xFF。 系統功能需求: 1. 系統配置和自檢功能: l 從機上電后進行初始化,通過讀取P2口進行從機地址配置; l 發光二極管以每秒一次的頻率閃爍(亮0.5秒,滅0.5秒); l 檢測到一次按鍵按下操作后,熄滅發光二極管。 2. 數據接收和按鍵計時功能: l 從機接收主機程序(PC機上的串口調試程序)的按鍵允許命令幀并進行校驗; l 校驗正確并且目的地址是廣播地址或者本從機的地址,通過發光二極管長亮指示,并允許按鍵操作; l 按鍵按下后,盡可能準確記錄按鍵的動作時點(定時器的低8位、定時器的高8位、50ms值、秒、分、小時); l 按鍵操作只能響應一次,重復按鍵操作不響應; l 按鍵的動作時點記錄后,發光二極管以每秒一次的頻率閃爍(亮0.5秒,滅0.5秒)。 3. 數據發送功能: l 從機接收主機程序發來的時鐘數據搜索命令幀并進行校驗; l 如果校驗正確并且數據幀的目的地址是本從機的地址,從機將前面記錄的按鍵動作時點數據(定時器的低8位、定時器的高8位、50ms值、秒、分、小時)按附錄中的時鐘數據返回幀的幀格式回傳給主機; l 時鐘數據返回幀回傳結束后,熄滅發光二極管。 4. 校驗和生成和檢測功能: l 發送數據幀時能自動生成數據幀校驗和; l 每幀數據在發送幀尾前,發送一字節的當前幀數據的校驗和; l 接收數據幀時能檢測校驗和并判斷接收數據是否正確。 附錄:幀定義 校驗和的計算:除去幀頭和幀尾后將幀中的其他數據求和并取低8位; 幀長:不計幀頭、幀尾和校驗和字節。 按鍵允許命令幀: 幀頭 幀長 目的地址 源地址 命令字 校驗和 幀尾 AA 04 FF F0 01 F4 66 時鐘數據搜索命令幀: 幀頭 幀長 目的地址 源地址 命令字 保留字 校驗和 幀尾 AA 05 01 F0 03 00 F9 66 時鐘數據返回幀: 幀頭 幀長 目的地址 源地址 命令字 TL0 TH0 50ms 秒 分 時 校驗和 幀尾 AA 0A F0 01 07 01 B6 09 03 00 00 C5 66 幀結構頭文件frame.h(內容如下) //幀格式定義 #Define FRAME_HEAD 0xAA //幀頭 #Define FRAME_FOOT 0x66 //幀尾 #Define FRAME_LEN 0x00 //幀長 #Define FRAME_DST_ADR 0x01 //目的地址 #Define FRAME_SRC_ADR 0x02 //源地址 #Define FRAME_CMD 0x03 //命令字 #Define FRAME_DATA 0x04 //幀數據起始 //幀命令定義 #Define READY 0x01 //按鍵允許命令 #Define TIME_SERCH 0x03 //時鐘數據輪詢命令 #Define TIME_BACK 0x07 //時鐘數據返回命令 //地址定義 #Define BROAD_ADR 0xFF //廣播地址 #Define MASTER_ADR 0xF0 //主機地址
上傳時間: 2020-06-18
上傳用戶:umuo
lm75A溫度數字轉換器 FPGA讀寫實驗Verilog邏輯源碼Quartus工程文件+文檔資料,FPGA為CYCLONE4系列中的EP4CE6E22C8. 完整的工程文件,可以做為你的學習設計參考。LM75A 是一個使用了內置帶隙溫度傳感器和模數轉換技術的溫度數字轉換器。它也是一個溫度檢測器,可提供一個過熱檢測輸出。LM75A 包含許多數據寄存器:配置寄存器用來存儲器件的某些配置,如器件的工作模式、OS 工作模式、OS 極性和OS 故障隊列等(在功能描述一節中有詳細描述);溫度寄存器(Temp),用來存儲讀取的數字溫度;設定點寄存器(Tos & Thyst),用來存儲可編程的過熱關斷和滯后限制,器件通過2 線的串行I2C 總線接口與控制器通信。LM75A 還包含一個開漏輸出(OS),當溫度超過編程限制的值時該輸出有效。LM75A 有3 個可選的邏輯地址管腳,使得同一總線上可同時連接8個器件而不發生地址沖突。LM75A 可配置成不同的工作條件。它可設置成在正常工作模式下周期性地對環境溫度進行監控或進入關斷模式來將器件功耗降至最低。OS 輸出有2 種可選的工作模式:OS 比較器模式和OS 中斷模式。OS 輸出可選擇高電平或低電平有效。故障隊列和設定點限制可編程,為了激活OS 輸出,故障隊列定義了許多連續的故障。溫度寄存器通常存放著一個11 位的二進制數的補碼,用來實現0.125℃的精度。這個高精度在需要精確地測量溫度偏移或超出限制范圍的應用中非常有用。正常工作模式下,當器件上電時,OS 工作在比較器模式,溫度閾值為80℃,滯后75℃,這時,LM75A就可用作一個具有以上預定義溫度設定點的獨立的溫度控制器。module LM75_SEG_LED ( //input input sys_clk ,input sys_rst_n ,inout sda_port ,//output output wire seg_c1 ,output wire seg_c2 ,output wire seg_c3 ,output wire seg_c4 ,output reg seg_a ,output reg seg_b ,output reg seg_c ,output reg seg_e ,output reg seg_d ,output reg seg_f ,output reg seg_g ,output reg seg_h , output reg clk_sclk );//parameter Define parameter WIDTH = 8;parameter SIZE = 8;//reg Define reg [WIDTH-1:0] counter ;reg [9:0] counter_div ;reg clk_50k ;reg clk_200k ;reg sda ;reg enable ;
上傳時間: 2021-10-27
上傳用戶:
IIC接口E2PROM(AT24C64) 讀寫VERILOG 驅動源碼+仿真激勵文件:module i2c_dri #( parameter SLAVE_ADDR = 7'b1010000 , //EEPROM從機地址 parameter CLK_FREQ = 26'd50_000_000, //模塊輸入的時鐘頻率 parameter I2C_FREQ = 18'd250_000 //IIC_SCL的時鐘頻率 ) ( input clk , input rst_n , //i2c interface input i2c_exec , //I2C觸發執行信號 input bit_ctrl , //字地址位控制(16b/8b) input i2c_rh_wl , //I2C讀寫控制信號 input [15:0] i2c_addr , //I2C器件內地址 input [ 7:0] i2c_data_w , //I2C要寫的數據 output reg [ 7:0] i2c_data_r , //I2C讀出的數據 output reg i2c_done , //I2C一次操作完成 output reg i2c_ack , //I2C應答標志 0:應答 1:未應答 output reg scl , //I2C的SCL時鐘信號 inout sda , //I2C的SDA信號 //user interface output reg dri_clk //驅動I2C操作的驅動時鐘 );//localparam Definelocalparam st_idle = 8'b0000_0001; //空閑狀態localparam st_sladdr = 8'b0000_0010; //發送器件地址(slave address)localparam st_addr16 = 8'b0000_0100; //發送16位字地址localparam st_addr8 = 8'b0000_1000; //發送8位字地址localparam st_data_wr = 8'b0001_0000; //寫數據(8 bit)localparam st_addr_rd = 8'b0010_0000; //發送器件地址讀localparam st_data_rd = 8'b0100_0000; //讀數據(8 bit)localparam st_stop = 8'b1000_0000; //結束I2C操作//reg Definereg sda_dir ; //I2C數據(SDA)方向控制reg sda_out ; //SDA輸出信號reg st_done ; //狀態結束reg wr_flag ; //寫標志reg [ 6:0] cnt ; //計數reg [ 7:0] cur_state ; //狀態機當前狀態reg [ 7:0] next_state; //狀態機下一狀態reg [15:0] addr_t ; //地址reg [ 7:0] data_r ; //讀取的數據reg [ 7:0] data_wr_t ; //I2C需寫的數據的臨時寄存reg [ 9:0] clk_cnt ; //分頻時
標簽: iic 接口 e2prom at24c64 verilog 驅動 仿真
上傳時間: 2021-11-05
上傳用戶:
C語言各知識點詳細總結27頁C 語言知識要點復習資料 總體上必須清楚的: 1)程序結構是三種: 順序結構 、選擇結構(分支結構)、循環結構。 2)讀程序都要從 main()入口, 然后從最上面順序往下讀(碰到循環做循環,碰到選擇做選擇),有 且只有一個 main 函數。 3)計算機的數據在電腦中保存是以 二進制的形式. 數據存放的位置就是 他的地址. 4)bit 是位 是指為 0 或者 1。 byte 是指字節, 一個字節 = 八個位. 概念常考到的: 1、編譯預處理不是 C 語言的一部分,不占運行時間,不要加分號。C 語言編譯的程序稱為源程 序,它以 ASCII 數值存放在文本文件中。 2、Define PI 3.1415926; 這個寫法是錯誤的,一定不能出現分號。 3、每個 C 語言程序中 main 函數是有且只有一個。 4、在函數中不可以再定義函數。 5、算法:可以沒有輸入,但是一定要有輸出。 6、break 可用于循環結構和 switch 語句。 7、逗號運算符的級別最低,賦值的級別倒數第二。 第一章 C 語言的基礎知識 第一節、對 C 語言的基礎認識 1、C 語言編寫的程序稱為源程序,又稱為編
標簽: C語言
上傳時間: 2021-11-06
上傳用戶:kent