本模塊的功能是驗證實現(xiàn)和PC機進行基本的串口通信的功能。需要在
PC機上安裝一個串口調(diào)試工具來驗證程序的功能。
程序?qū)崿F(xiàn)了一個收發(fā)一幀10個bit(即無奇偶校驗位)的串口控
制器,10個bit是1位起始位,8個數(shù)據(jù)位,1個結(jié)束
位。串口的波特律由程序中定義的div_par參數(shù)決定,更改該參數(shù)可以實
現(xiàn)相應(yīng)的波特率。程序當前設(shè)定的div_par 的值是0x104,對應(yīng)的波特率是
9600。用一個8倍波特率的時鐘將發(fā)送或接受每一位bit的周期時間
劃分為8個時隙以使通信同步.
程序的工作過程是:串口處于全雙工工作狀態(tài),按動key2,CPLD向PC發(fā)送皐elcome"
字符串(串口調(diào)試工具設(shè)成按ASCII碼接受方式);PC可隨時向CPLD發(fā)送0-F的十六進制
數(shù)據(jù),CPLD接受后顯示在7段數(shù)碼管上。
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
ENTITY UART IS
?? PORT (
????? clk???????????????????? : IN std_logic;??
????? rst???????????????????? : IN std_logic;??
????? rxd???????????????????? : IN std_logic;?? 串行數(shù)據(jù)接收端
????? txd???????????????????? : OUT std_logic; 串行數(shù)據(jù)發(fā)送端?
????? en????????????????????? : OUT std_logic_vector(7 downto 0); 數(shù)碼管使能
????? seg_data??????????????? : OUT std_logic_vector(7 DOWNTO 0); 數(shù)碼管數(shù)據(jù)?
????? key_input?????????????? : IN std_logic? 按鍵輸入
????? );
END UART;
ARCHITECTURE arch OF UART IS
?? //////////////////inner reg////////////////////
?? SIGNAL div_reg????????????????? :? std_logic_vector(15 DOWNTO 0);分頻計數(shù)器,分頻值由波特率決定。分頻后得到頻率8倍波特率的時鐘??
?? SIGNAL div8_tras_reg??????????? :? std_logic_vector(2 DOWNTO 0);該寄存器的計數(shù)值對應(yīng)發(fā)送時當前位于的時隙數(shù)??
?? SIGNAL div8_rec_reg???????????? :? std_logic_vector(2 DOWNTO 0);? 寄存器的計數(shù)值對應(yīng)接收時當前位于的時隙數(shù)
?? SIGNAL state_tras?????????????? :? std_logic_vector(3 DOWNTO 0);? 發(fā)送狀態(tài)寄存器
?? SIGNAL state_rec??????????????? :? std_logic_vector(3 DOWNTO 0); 接受狀態(tài)寄存器
?? SIGNAL clkbaud_tras???????????? :? std_logic; 以波特率為頻率的發(fā)送使能信號?
?? SIGNAL clkbaud_rec????????????? :? std_logic; 以波特率為頻率的接受使能信號?
?? SIGNAL clkbaud8x??????????????? :? std_logic; 以8倍波特率為頻率的時鐘,它的作用是將發(fā)送或接受一個bit的時鐘周期分為8個時隙?
?? SIGNAL recstart???????????????? :? std_logic; 開始發(fā)送標志
?? SIGNAL recstart_tmp???????????? :? std_logic; 開始接受標志?
?? SIGNAL trasstart??????????????? :? std_logic;??
?? SIGNAL rxd_reg1???????????????? :? std_logic; 接收寄存器1?
?? SIGNAL rxd_reg2???????????????? :? std_logic; 接收寄存器2,因為接收數(shù)據(jù)為異步信號,故用兩級緩存?
?? SIGNAL txd_reg????????????????? :? std_logic; 發(fā)送寄存器?
?? SIGNAL rxd_buf????????????????? :? std_logic_vector(7 DOWNTO 0);接受數(shù)據(jù)緩存??
?? SIGNAL txd_buf????????????????? :? std_logic_vector(7 DOWNTO 0);發(fā)送數(shù)據(jù)緩存??
?? SIGNAL send_state?????????????? :? std_logic_vector(2 DOWNTO 0);每次按鍵給PC發(fā)送"Welcome"字符串,這是發(fā)送狀態(tài)寄存器??
?? SIGNAL cnt_delay??????????????? :? std_logic_vector(19 DOWNTO 0);延時去抖計數(shù)器??
?? SIGNAL start_delaycnt?????????? :? std_logic;? 開始延時計數(shù)標志
?? SIGNAL key_entry1?????????????? :? std_logic;? 確定有鍵按下曛?
?? SIGNAL key_entry2?????????????? :? std_logic;? 確定有鍵按下標志
?? //////////////////////////////////////////////
?? CONSTANT? div_par?????????????? :? std_logic_vector(15 DOWNTO 0) := "0000000100000100";
?? 分頻參數(shù),其值由對應(yīng)的波特率計算而得,按此參數(shù)分頻的時鐘頻率是波倍特率的8倍,此處值對應(yīng)9600的波特率,即分頻出的時鐘頻率是9600*8????
?? SIGNAL txd_xhdl3??????????????? :? std_logic;??
BEGIN
?? en <="01010101" ;7段數(shù)碼管使能信號賦值
?? txd <= txd_xhdl3;??
?? txd_xhdl3 <= txd_reg ;
?? PROCESS(clk,rst)
?? BEGIN
??????
????? IF (NOT rst = ’1’) THEN
???????? cnt_delay <= "00000000000000000000";???
???????? start_delaycnt <= ’0’;???
????? ELSIF(clk’EVENT AND clk=’1’)THEN
???????? IF (start_delaycnt = ’1’) THEN
??????????? IF (cnt_delay /= "11000011010100000000") THEN
?????????????? cnt_delay <= cnt_delay + "00000000000000000001";???
??????????? ELSE
?????????????? cnt_delay <= "00000000000000000000";???
?????????????? start_delaycnt <= ’0’;???
??????????? END IF;
???????? ELSE
??????????? IF ((NOT key_input=’1’) AND (cnt_delay = "00000000000000000000")) THEN
?????????????? start_delaycnt <= ’1’;???
??????????? END IF;
???????? END IF;
????? END IF;
?? END PROCESS;
?? PROCESS(clk,rst)
?? BEGIN
??????
????? IF (NOT rst = ’1’) THEN
???????? key_entry1 <= ’0’;???
????? ELSIF(clk’EVENT AND clk=’1’)THEN
???????? IF (key_entry2 = ’1’) THEN
??????????? key_entry1 <= ’0’;???
???????? ELSE
??????????? IF (cnt_delay = "11000011010100000000") THEN
?????????????? IF (NOT key_input = ’1’) THEN
????????????????? key_entry1 <= ’1’;???
?????????????? END IF;
??????????? END IF;
???????? END IF;
????? END IF;
?? END PROCESS;
?? PROCESS(clk,rst)
?? BEGIN
??????
????? IF (NOT rst = ’1’) THEN
???????? div_reg <= "0000000000000000";???
????? ELSIF(clk’EVENT AND clk=’1’)THEN
???????? IF (div_reg = div_par - "0000000000000001") THEN
??????????? div_reg <= "0000000000000000";???
???????? ELSE
??????????? div_reg <= div_reg + "0000000000000001";???
???????? END IF;
????? END IF;
?? END PROCESS;
?? PROCESS(clk,rst)? 分頻得到8倍波特率的時鐘
?? BEGIN
??????
????? IF (NOT rst = ’1’) THEN
???????? clkbaud8x <= ’0’;???
????? ELSIF(clk’EVENT AND clk=’1’)THEN
???????? IF (div_reg = div_par - "0000000000000001") THEN
??????????? clkbaud8x <= NOT clkbaud8x;???
???????? END IF;
????? END IF;
?? END PROCESS;
?? PROCESS(clkbaud8x,rst)
?? BEGIN
????? IF (NOT rst = ’1’) THEN
???????? div8_rec_reg <= "000";???
????? ELSE IF(clkbaud8x’EVENT AND clkbaud8x = ’1’) THEN
???????? IF (recstart = ’1’) THEN? 接收開始標志
??????????? div8_rec_reg <= div8_rec_reg + "001";接收開始后,時隙數(shù)在8倍波特率的時鐘下加1循環(huán)???
???????? END IF;
??? END IF;
????? END IF;
?? END PROCESS;
?? PROCESS(clkbaud8x,rst)
?? BEGIN
????? IF (NOT rst = ’1’) THEN
???????? div8_tras_reg <= "000";???
????? ELSE IF(clkbaud8x’EVENT AND clkbaud8x = ’1’) THEN
???????? IF (trasstart = ’1’) THEN
??????????? div8_tras_reg <= div8_tras_reg + "001";發(fā)送開始后,時隙數(shù)在8倍波特率的時鐘下加1循環(huán)???
???????? END IF;
??? END IF;
????? END IF;
?? END PROCESS;
?? PROCESS(div8_rec_reg)
?? BEGIN
????? IF (div8_rec_reg = "111") THEN
???????? clkbaud_rec <= ’1’; -在第7個時隙,接收??
????? ELSE
???????? clkbaud_rec <= ’0’;???
????? END IF;
?? END PROCESS;
?? PROCESS(div8_tras_reg)
?? BEGIN
????? IF (div8_tras_reg = "111") THEN
???????? clkbaud_tras <= ’1’;? 在第7個時隙,發(fā)送使能信號有效,將數(shù)據(jù)發(fā)出?
????? ELSE
???????? clkbaud_tras <= ’0’;???
????? END IF;
?? END PROCESS;
?? PROCESS(clkbaud8x,rst)
?? BEGIN
????? IF (NOT rst = ’1’) THEN
???????? txd_reg <= ’1’;???
???????? trasstart <= ’0’;???
???????? txd_buf <= "00000000";???
???????? state_tras <= "0000";???
???????? send_state <= "000";???
???????? key_entry2 <= ’0’;???
????? ELSE IF(clkbaud8x’EVENT AND clkbaud8x = ’1’) THEN
???????? IF (NOT key_entry2 = ’1’) THEN
??????????? IF (key_entry1 = ’1’) THEN
?????????????? key_entry2 <= ’1’;???
?????????????? txd_buf <= "01110111";?? "w"
??????????? END IF;
???????? ELSE
??????????? CASE state_tras IS
?????????????? WHEN "0000" =>? 發(fā)送起始位
??????????????????????? IF ((NOT trasstart=’1’) AND (send_state < "111") ) THEN
?????????????????????????? trasstart <= ’1’;???
??????????????????????? ELSE
?????????????????????????? IF (send_state < "111") THEN
????????????????????????????? IF (clkbaud_tras = ’1’) THEN
???????????????????????????????? txd_reg <= ’0’;???
???????????????????????????????? state_tras <= state_tras + "0001";???
????????????????????????????? END IF;
?????????????????????????? ELSE
????????????????????????????? key_entry2 <= ’0’;???
????????????????????????????? state_tras <= "0000";???
?????????????????????????? END IF;
??????????????????????? END IF;
?????????????? WHEN "0001" => 發(fā)送第1位
??????????????????????? IF (clkbaud_tras = ’1’) THEN
?????????????????????????? txd_reg <= txd_buf(0);???
?????????????????????????? txd_buf(6 DOWNTO 0) <= txd_buf(7 DOWNTO 1);???
?????????????????????????? state_tras <= state_tras + "0001";???
??????????????????????? END IF;
?????????????? WHEN "0010" =>? 發(fā)送第2位
??????????????????????? IF (clkbaud_tras = ’1’) THEN
?????????????????????????? txd_reg <= txd_buf(0);???
?????????????????????????? txd_buf(6 DOWNTO 0) <= txd_buf(7 DOWNTO 1);???
?????????????????????????? state_tras <= state_tras + "0001";???
??????????????????????? END IF;
?????????????? WHEN "0011" =>? 發(fā)送第3位
??????????????????????? IF (clkbaud_tras = ’1’) THEN
?????????????????????????? txd_reg <= txd_buf(0);???
?????????????????????????? txd_buf(6 DOWNTO 0) <= txd_buf(7 DOWNTO 1);???
?????????????????????????? state_tras <= state_tras + "0001";???
??????????????????????? END IF;
?????????????? WHEN "0100" => 發(fā)送第4位
??????????????????????? IF (clkbaud_tras = ’1’) THEN
?????????????????????????? txd_reg <= txd_buf(0);???
?????????????????????????? txd_buf(6 DOWNTO 0) <= txd_buf(7 DOWNTO 1);???
?????????????????????????? state_tras <= state_tras + "0001";???
??????????????????????? END IF;
?????????????? WHEN "0101" => 發(fā)送第5位
??????????????????????? IF (clkbaud_tras = ’1’) THEN
?????????????????????????? txd_reg <= txd_buf(0);???
?????????????????????????? txd_buf(6 DOWNTO 0) <= txd_buf(7 DOWNTO 1);???
?????????????????????????? state_tras <= state_tras + "0001";???
??????????????????????? END IF;
?????????????? WHEN "0110" => 發(fā)送第6位
??????????????????????? IF (clkbaud_tras = ’1’) THEN
?????????????????????????? txd_reg <= txd_buf(0);???
?????????????????????????? txd_buf(6 DOWNTO 0) <= txd_buf(7 DOWNTO 1);???
?????????????????????????? state_tras <= state_tras + "0001";???
??????????????????????? END IF;
?????????????? WHEN "0111" => 發(fā)送第7位
??????????????????????? IF (clkbaud_tras = ’1’) THEN
?????????????????????????? txd_reg <= txd_buf(0);???
?????????????????????????? txd_buf(6 DOWNTO 0) <= txd_buf(7 DOWNTO 1);???
?????????????????????????? state_tras <= state_tras + "0001";???
??????????????????????? END IF;
?????????????? WHEN "1000" =>? 發(fā)送第8位
??????????????????????? IF (clkbaud_tras = ’1’) THEN
?????????????????????????? txd_reg <= txd_buf(0);???
?????????????????????????? txd_buf(6 DOWNTO 0) <= txd_buf(7 DOWNTO 1);???
?????????????????????????? state_tras <= state_tras + "0001";???
??????????????????????? END IF;
?????????????? WHEN "1001" =>? 發(fā)送停止位
??????????????????????? IF (clkbaud_tras = ’1’) THEN
?????????????????????????? txd_reg <= ’1’;???
?????????????????????????? txd_buf <= "01010101";???
?????????????????????????? state_tras <= state_tras + "0001";???
??????????????????????? END IF;
?????????????? WHEN "1111" =>
??????????????????????? IF (clkbaud_tras = ’1’) THEN
?????????????????????????? state_tras <= state_tras + "0001";???
?????????????????????????? send_state <= send_state + "001";???
?????????????????????????? trasstart <= ’0’;???
?????????????????????????? CASE send_state IS
????????????????????????????? WHEN "000" =>
?????????????????????????????????????? txd_buf <= "01100101"; "e"??
????????????????????????????? WHEN "001" =>
?????????????????????????????????????? txd_buf <= "01101100"; "l"??
????????????????????????????? WHEN "010" =>
?????????????????????????????????????? txd_buf <= "01100011";? "c"?
????????????????????????????? WHEN "011" =>
?????????????????????????????????????? txd_buf <= "01101111"; "o"?
????????????????????????????? WHEN "100" =>
?????????????????????????????????????? txd_buf <= "01101101";? "m"?
????????????????????????????? WHEN "101" =>
?????????????????????????????????????? txd_buf <= "01100101"; "e"??
????????????????????????????? WHEN OTHERS? =>
?????????????????????????????????????? txd_buf <= "00000000";?
?????????????????????????????
?????????????????????????? END CASE;
??????????????????????? END IF;
?????????????? WHEN OTHERS? =>
??????????????????????? IF (clkbaud_tras = ’1’) THEN
?????????????????????????? state_tras <= state_tras + "0001";???
?????????????????????????? trasstart <= ’1’;???
??????????????????????? END IF;
??????????????
??????????? END CASE;
???????? END IF;
????? END IF;
?END IF;
?? END PROCESS;
?? PROCESS(clkbaud8x,rst)? 接受PC機的數(shù)據(jù)
?? BEGIN
????? IF (NOT rst = ’1’) THEN
???????? rxd_reg1 <= ’0’;???
???????? rxd_reg2 <= ’0’;???
???????? rxd_buf <= "00000000";???
???????? state_rec <= "0000";???
???????? recstart <= ’0’;???
???????? recstart_tmp <= ’0’;???
????? ELSE IF(clkbaud8x’EVENT AND clkbaud8x = ’1’) THEN
???????? rxd_reg1 <= rxd;???
???????? rxd_reg2 <= rxd_reg1;???
???????? IF (state_rec = "0000") THEN
??????????? IF (recstart_tmp = ’1’) THEN
?????????????? recstart <= ’1’;???
?????????????? recstart_tmp <= ’0’;???
?????????????? state_rec <= state_rec + "0001";???
??????????? ELSE
?????????????? IF ((NOT rxd_reg1 AND rxd_reg2) = ’1’) THEN 檢測到起始位的下降沿,進入接受狀態(tài)
????????????????? recstart_tmp <= ’1’;???
?????????????? END IF;
??????????? END IF;
???????? ELSE
??????????? IF (state_rec >= "0001" AND state_rec<="1000") THEN
?????????????? IF (clkbaud_rec = ’1’) THEN
????????????????? rxd_buf(7) <= rxd_reg2;???
????????????????? rxd_buf(6 DOWNTO 0) <= rxd_buf(7 DOWNTO 1);???
????????????????? state_rec <= state_rec + "0001";???
?????????????? END IF;
??????????? ELSE
?????????????? IF (state_rec = "1001") THEN
????????????????? IF (clkbaud_rec = ’1’) THEN
???????????????????? state_rec <= "0000";???
???????????????????? recstart <= ’0’;???
????????????????? END IF;
?????????????? END IF;
??????????? END IF;
???????? END IF;
????? END IF;
?END IF;
?? END PROCESS;
?? PROCESS(rxd_buf)?? 將接受的數(shù)據(jù)用數(shù)碼管顯示出來
?? BEGIN
????? CASE rxd_buf IS
???????? WHEN "00110000" =>
????????????????? seg_data <= "00000011"; 0??
???????? WHEN "00110001" =>
????????????????? seg_data <= "10011111"; 1?
???????? WHEN "00110010" =>
????????????????? seg_data <= "00100101"; 2?
???????? WHEN "00110011" =>
????????????????? seg_data <= "00001101"; 3??????
???????? WHEN "00110100" =>
????????????????? seg_data <= "10011001"; 4??
&nbs p;??????? WHEN "00110101" =>
????????????????? seg_data <= "01001001"; 5?
???????? WHEN "00110110" =>
????????????????? seg_data <= "01000001"; 6??
???????? WHEN "00110111" =>
????????????????? seg_data <= "00011111"; 7??
???????? WHEN "00111000" =>
????????????????? seg_data <= "00000001"; 8???
???????? WHEN "00111001" =>
????????????????? seg_data <= "00001001"; 9??
???????? WHEN "01000001" =>
????????????????? seg_data <= "00010001"; A??
???????? WHEN "01000010" =>
????????????????? seg_data <= "11000001"; B??
???????? WHEN "01000011" =>
????????????????? seg_data <= "01100011"; C??
???????? WHEN "01000100" =>
????????????????? seg_data <= "10000101"; D?
???????? WHEN "01000101" =>
????????????????? seg_data <= "01100001"; E??
???????? WHEN "01000110" =>
????????????????? seg_data <= "01110001"; F???
???????? WHEN OTHERS? =>
????????????????? seg_data <= "11111111";??????????
????? END CASE;
?? END PROCESS;
END arch;
VHDL設(shè)計的串口通信程序
- vhdl(127605)
- 串口通信(54799)
相關(guān)推薦
基于Linux環(huán)境下串口通信的應(yīng)用設(shè)計
本文介紹了Linux環(huán)境下串口通信的設(shè)計方法和步驟,并介紹了ARM9微處理器s3c2440在Linux下和C8051Fxxx系列單片機進行串行通信的設(shè)計方法,給出了硬件連接和通信程序流程圖。該方法
2014-05-24 10:50:472623
VHDL串口程序怎么寫???具體要求就是這樣~!
VHDL串口程序怎么寫啊?具體要求就是這樣~!http://zhidao.baidu.com/question/547288797?quesup2&oldq=1
2013-05-24 21:16:33
基于EPM240T100的串口通信
CPLD串口通信模塊硬件設(shè)計 二、VHDL程序模塊設(shè)計及描述使用VHDL 對CPLD 進行編程,設(shè)計3 個模塊,波特率發(fā)生模塊,接收器,發(fā)送器。1. 波特率發(fā)生模塊波特率發(fā)生器實際是一個分頻器,如前所述
2013-11-13 11:01:30
多線程在VC++串口通信程序中的應(yīng)用
本文通過一機房監(jiān)控系統(tǒng)程序中串口通信對多線程的應(yīng)用來介紹Windows 9X/NT操作系統(tǒng)中多線程的應(yīng)用和VC++對多線程的支持。關(guān)健詞: 多線程,串口通信在現(xiàn)代的各種實時監(jiān)控系
2009-09-03 11:45:2927
VHDL 語言程序的元素
VHDL 語言程序的元素:本章主要內(nèi)容:VHDL語言的對象VHDL語言的數(shù)據(jù)類型VHDL語言的運算符VHDL語言的標識符VHDL語言的詞法單元
2009-09-28 14:32:2141
用VHDL設(shè)計專用串行通信芯片
用VHDL設(shè)計專用串行通信芯片
一種專用串行同步通信芯片(該芯片內(nèi)部結(jié)構(gòu)和操作方式以INS8250為參考)的VHDL設(shè)計及CPLD實現(xiàn),著重介紹了用VHDL及CPLD設(shè)計專用通信芯片的
2009-10-12 19:07:481701
基于Visual C#的串口通信程序設(shè)計
利用SerialPort組件,對實現(xiàn)串口讀寫數(shù)據(jù)及簡單數(shù)據(jù)處理的方法作了探討,通過 SerialPort組件屬性、方法,可以方便靈活地寫出串口通信程序,生成的軟件界面友好、操作使用方便。實踐證明
2011-10-19 15:12:57153
ARM基礎(chǔ)應(yīng)用實驗_串口通信
ARM嵌入式應(yīng)用程序架構(gòu)設(shè)計實例精講--ARM基礎(chǔ)應(yīng)用實驗01串口通信
2016-07-08 11:08:190
VHDL程序結(jié)構(gòu)
VHDL程序實體--EDA資料,設(shè)計實體是VHDL語言設(shè)計的基本單元,簡單的可以是一個與門,復(fù)雜的可以是一個微處理器或一個數(shù)字系統(tǒng),其結(jié)構(gòu)基本是一致的,都是由實體說明和結(jié)構(gòu)體兩部分組成。實體說明
2016-11-21 15:40:340
上位機串口通信數(shù)據(jù)接收事件程序
上位機 串口 通信主要介紹通信串口的初始化和串口緩沖區(qū)數(shù)據(jù)的讀取,因為此處只是作為指令來讀取,數(shù)據(jù)量小,所以緩沖區(qū)數(shù)據(jù)的讀取為有數(shù)據(jù)接收便觸發(fā)串口的數(shù)據(jù)接收事件。
2018-03-13 15:08:003761
串口通信的原理,IO口模擬UART串口通信
UART串口波特率,常用的值是300、600、1200、2400、4800、9600、14400、19200、28800、38400、57600、115200等速率。IO口模擬UART串行通信程序是一個簡單的演示程序,我們使用串口調(diào)試助手下發(fā)一個數(shù)據(jù),數(shù)據(jù)加1后,再自動返回。
2018-05-04 15:26:1620961
串口通信的原理及USB轉(zhuǎn)串口通信
IO口模擬串口通信,讓大家了解了串口通信的本質(zhì),但是我們的單片機程序卻需要不停的檢測掃描單片機IO口收到的數(shù)據(jù),大量占用了單片機的運行時間。這時候就會有聰明人想了,其實我們并不是很關(guān)心通信的過程,我們只需要一個通信的結(jié)果,最終得到接收到的數(shù)據(jù)就行了。
2018-05-07 15:54:2295602
STM32的三種串口通信協(xié)議介紹
本文首先介紹了STM32串口硬件電路及串口編程,其次介紹了STM32的三種串口通信協(xié)議,最后介紹了STM32串口通信程序設(shè)計要點。
2018-05-25 09:33:2137250
MATLAB串口調(diào)試助手應(yīng)用程序和基于MATLAB開發(fā)USB的串口通信源代碼
本文檔的主要內(nèi)容詳細介紹的是MATLAB串口調(diào)試助手應(yīng)用程序和基于MATLAB開發(fā)USB的串口通信源代碼。
2018-11-05 08:00:0094
寫串口通信程序會遇到那些坑
因為我們向HC6800燒程序都是使用圖1所示的軟件,所以我想當然地認為可以直接通過HC6800上的U轉(zhuǎn)串進行串口通信,而我的同學(xué)信誓旦旦地告訴我可以??拥2⑶疫@個軟件好像也在提示可以用直接
2019-05-23 17:59:001
vhdl語言怎么仿真_vhdl語言的基本結(jié)構(gòu)
在VHDL程序中,實體(ENTITY)和結(jié)構(gòu)體(ARCHITECTURE)這兩個基本結(jié)構(gòu)是必須的,他們可以構(gòu)成最簡單的VHDL程序。通常,最簡單的VHDL程序結(jié)構(gòu)中還包含另一個最重要的部分,即庫(LIBRARY)和程序包(PACKAGE)。
2020-04-23 15:43:384224
PC與串口通信的keil程序和電路圖合集免費下載
本文檔的主要內(nèi)容詳細介紹的是PC與串口通信的keil程序和電路圖合集免費下載包括了:簡單的接收程序,簡單的發(fā)送程序,多個數(shù)據(jù)的接收程序,多個數(shù)據(jù)的發(fā)送程序,雙機通信,雙機通信(握手)
2020-05-22 14:18:4316
如何使用VHDL實現(xiàn)串口通信的設(shè)計
串口是計算機上一種非常通用設(shè)備通信的協(xié)議,其特點是通信線路簡單,成本低,特別適用于遠距離通信,因此有較為廣泛的應(yīng)用。為了深入了解串口,本課程設(shè)計基于VHDL 語言,利用FPGA 開發(fā)板實現(xiàn)了板間串口
2020-10-15 17:35:5524
STM32實現(xiàn)串口通信
STM32實現(xiàn)串口通信一、串口通信與USART1. 串口通信2. USRAT二、程序實現(xiàn)三、運行結(jié)果四、總結(jié)五、參考一、串口通信與USART1. 串口通信RS-232標準: 主要規(guī)定了信號的用途
2021-12-16 16:57:3416
單片機串口通信原理和控制程序
文章目錄單片機串口通信原理和控制程序單片機串口通信原理和控制程序我們前邊學(xué)串口通信的時候,比較注重的是串口底層時序上的操作過程,所以例程都是簡單的收發(fā)字符或者字符串。在實際應(yīng)用中,往往串口還要和電腦
2021-12-17 18:31:3311
單片機串口通信的接收與發(fā)送程序
單片機串口通信的接收與發(fā)送程序 一、引言 單片機串口通信是一種常見的通信方式,廣泛應(yīng)用于各種嵌入式系統(tǒng)和工業(yè)控制領(lǐng)域。通過串口通信,單片機可以與其他設(shè)備或計算機進行數(shù)據(jù)交換,實現(xiàn)遠程監(jiān)控、故障診斷
2023-12-19 13:57:41588
評論
查看更多