資料介紹
描述
介紹
前段時間,我在尋找一種易于理解的 VHDL UART 設計,但令人驚訝的是我找不到。也許我搜索得不夠好,但無論如何,我認為這將是我的技術愛好博客的一個很好的起點。所以,這是我的第一個項目,請歡迎使用 Basys 3 板的 VHDL UART 接口。
這種設計允許將位從電路板傳輸到計算機終端,并從終端接收位到電路板。您可以通過按下板上的按鈕將數據從板傳輸到終端。可以使用用戶開關設置發送位,并且可以在用戶 LED 上檢查接收位。
UART接口總結
如果您是 UART 的完全初學者,我建議您在此處查看此 wiki 頁面。
由于 UART 接口是串行接口,因此發送器會逐位發送數據。同時,接收器必須捕獲每個位并將其轉換為并行數據。該標準的另一個重要特征是波特率,它定義了 UART 每秒可以傳輸多少位。該接口允許許多不同的波特率,但在這個項目中我使用 115200 波特。
讓我們看看這個項目中使用的時間框架:
![poYBAGN6W8GAdQauAAA_xRoJfFM383.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6W8GAdQauAAA_xRoJfFM383.png)
我使用了最簡單的 UART 版本,如下所述:
- 起始位 ('0')
- 8 個數據位
- 無奇偶校驗位
- 一位停止位 ('1')
項目文件
這是 Vivado 中的項目樹:
![pYYBAGN6W8OAU4ngAAC3z4zzsWc392.png](https://file.elecfans.com/web2/M00/7D/16/pYYBAGN6W8OAU4ngAAC3z4zzsWc392.png)
-
UART_controller.vhd
- 將設計與外界聯系起來的頂級文件 -
button_debounce.vhd
- 將發射按鈕連接到項目的其余部分,并防止每次按下多次啟動 -
UART.vhd
- 將 tx 和 rx 文件組合在一起 -
UART_tx.vhd
- 包含所有發送器邏輯 -
UART_rx.vhd
- 包含所有接收器邏輯 -
constrains.xdc
- 包含引腳連接和主時鐘頻率 -
UART_controller_tb.vhd
- 這是設計的測試平臺
項目的主要部分位于UART_tx.vhd
和UART_rx.vhd
文件中。這些文件及其邏輯將在下一節中詳細討論。
如果您更喜歡先構建一個項目并對芯片進行編程,您可以跳到創建項目部分并在閱讀其余的理論部分之前先玩一下電路板。
發射機
是UART_tx.vhd
一個傳輸模塊。這是框圖:
![poYBAGN6W8eAINNoAADHsxRpjeQ547.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6W8eAINNoAADHsxRpjeQ547.png)
每個藍色塊代表UART_tx.vhd
文件中的一個進程。
baud_rate_clk_generator通過在計數器計數主時鐘的滴答時設置信號來生成 UART 波特率時鐘。該常數反映了主時鐘與波特率之間的比率。baud_rate_clk
BAUD_CLK_TICKS
BAUD_CLK_TICKS
tx_start_detector在主時鐘頻率上工作并捕捉tx_start
信號中的短脈沖(一個時鐘周期長)并將其保留在UART_tx_FSM
. tx_start_detector
需要,因為UART_tx_FSM
工作在波特率頻率上,但button_debounce
模塊每按一下按鈕就會產生一個主時鐘周期長脈沖。start_detected
保留發生此類事件的信息。的第二個目的tx_start_detector
是保護傳輸數據。stored_data
保持傳輸過程中保存的傳輸數據。
data_index_counter是一個從 0 到 7 的簡單計數器,用于處理波特率頻率。它用于執行并行數據(stored_data
)和串行輸出(tx_data_out
)之間的轉換。該data_index
信號用于UART_tx_FSM
遍歷stored_data
向量并一一發送比特。
UART_tx_FSM代表一個有限狀態機,它有四種狀態(IDLE、START、DATA、STOP)。這是UART_tx_FSM
塊的狀態圖:
![pYYBAGN6W8qAWZ_AAAFNs_vFE2w282.png](https://file.elecfans.com/web2/M00/7D/16/pYYBAGN6W8qAWZ_AAAFNs_vFE2w282.png)
文件代碼UART_tx.vhd
:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity UART_tx is
generic(
BAUD_CLK_TICKS: integer := 868); -- clk/baud_rate (100 000 000 / 115 200 = 868.0555)
port(
clk : in std_logic;
reset : in std_logic;
tx_start : in std_logic;
tx_data_in : in std_logic_vector (7 downto 0);
tx_data_out : out std_logic
);
end UART_tx;
architecture Behavioral of UART_tx is
type tx_states_t is (IDLE, START, DATA, STOP);
signal tx_state : tx_states_t := IDLE;
signal baud_rate_clk : std_logic:= '0';
signal data_index : integer range 0 to 7 := 0;
signal data_index_reset : std_logic := '1';
signal stored_data : std_logic_vector(7 downto 0) := (others=>'0');
signal start_detected : std_logic := '0';
signal start_reset : std_logic := '0';
begin
-- The baud_rate_clk_generator process generates the UART baud rate clock by
-- setting the baud_rate_clk signal when the counter counts BAUD_CLK_TICKS
-- ticks of the master clk. The BAUD_CLK_TICKS constant is specified in
-- the package and reflects the ratio between the master clk and the baud rate.
baud_rate_clk_generator: process(clk)
variable baud_count: integer range 0 to (BAUD_CLK_TICKS - 1) := (BAUD_CLK_TICKS - 1);
begin
if rising_edge(clk) then
if (reset = '1') then
baud_rate_clk <= '0';
baud_count := (BAUD_CLK_TICKS - 1);
else
if (baud_count = 0) then
baud_rate_clk <= '1';
baud_count := (BAUD_CLK_TICKS - 1);
else
baud_rate_clk <= '0';
baud_count := baud_count - 1;
end if;
end if;
end if;
end process baud_rate_clk_generator;
-- The tx_start_detector process works on the master clk frequency and catches
-- short (one clk cycle long) impulses in the tx_start signal and keeps it for
-- the UART_tx_FSM. tx_start_detector is needed because the UART_tx_FSM works on
-- the baud rate frequency, but the button_debounce module generates one master clk
-- cycle long impulse per one button push. start_detected keeps the information that
-- such event has occurred.
-- The second purpose of tx_start_detector is to secure the transmitting data.
-- stored_data keeps the transmitting data saved during the transmission.
tx_start_detector: process(clk)
begin
if rising_edge(clk) then
if (reset ='1') or (start_reset = '1') then
start_detected <= '0';
else
if (tx_start = '1') and (start_detected = '0') then
start_detected <= '1';
stored_data <= tx_data_in;
end if;
end if;
end if;
end process tx_start_detector;
-- The data_index_counter process is a simple counter from 0 to 7 working on the baud
-- rate frequency. It is used to perform transformation between the parallel
-- data (stored_data) and the serial output (tx_data_out).
-- The data_index signal is used in UART_tx_FSM to go over the stored_data vector
-- and send the bits one by one.
data_index_counter: process(clk)
begin
if rising_edge(clk) then
if (reset = '1') or (data_index_reset = '1') then
data_index <= 0;
elsif (baud_rate_clk = '1') then
data_index <= data_index + 1;
end if;
end if;
end process data_index_counter;
-- The UART_FSM_tx process represents a Finite State Machine which has
-- four states (IDLE, START, DATA, STOP). See inline comments for more details.
UART_tx_FSM: process(clk)
begin
if rising_edge(clk) then
if (reset = '1') then
tx_state <= IDLE;
data_index_reset <= '1'; -- keep data_index_counter on hold
start_reset <= '1'; -- keep tx_start_detector on hold
tx_data_out <= '1'; -- keep tx line set along the standard
else
if (baud_rate_clk = '1') then -- the FSM works on the baud rate frequency
case tx_state is
when IDLE =>
data_index_reset <= '1'; -- keep data_index_counter on hold
start_reset <= '0'; -- enable tx_start_detector to wait for starting impulses
tx_data_out <= '1'; -- keep tx line set along the standard
if (start_detected = '1') then
tx_state <= START;
end if;
when START =>
data_index_reset <= '0'; -- enable data_index_counter for DATA state
tx_data_out <= '0'; -- send '0' as a start bit
tx_state <= DATA;
when DATA =>
tx_data_out <= stored_data(data_index); -- send one bit per one baud clock cycle 8 times
if (data_index = 7) then
data_index_reset <= '1'; -- disable data_index_counter when it has reached 8
tx_state <= STOP;
end if;
when STOP =>
tx_data_out <= '1'; -- send '1' as a stop bit
start_reset <= '1'; -- prepare tx_start_detector to be ready detecting the next impuls in IDLE
tx_state <= IDLE;
when others =>
tx_state <= IDLE;
end case;
end if;
end if;
end if;
end process UART_tx_FSM;
end Behavioral;
接收者
是UART_rx.vhd
接收模塊。這是框圖:
![pYYBAGN6W8yAKiwwAACaFmiazkU946.png](https://file.elecfans.com/web2/M00/7D/16/pYYBAGN6W8yAKiwwAACaFmiazkU946.png)
與這里相反UART_tx
,我在 FSM 中內置了計數器(通過過程中的變量,參見代碼)。我這樣做只是為了演示在創建帶有計數器的 FSM 時的不同方法。第一種方式(tx)在硬件上更快,但第二種方式更容易在 VHDL 中實現。
baud_rate_x16_clk_generator生成一個過采樣時鐘。該baud_rate_x16_clk
信號比波特率時鐘快 16 倍。需要進行過采樣以將捕獲點置于接收位持續時間的中間。該BAUD_X16_CLK_TICKS
常數反映了主時鐘與 x16 波特率之間的比率。
UART_rx_FSM代表一個有限狀態機,它有四種狀態(IDLE、START、DATA、STOP)。這是UART_rx_FSM
塊的狀態圖:
![poYBAGN6W8-AR8EVAAHXyWhvWBQ926.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6W8-AR8EVAAHXyWhvWBQ926.png)
位持續時間計數器工作baud_rate_x16_clk
這是UART_rx.vhd
文件的代碼:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity UART_rx is
generic(
BAUD_X16_CLK_TICKS: integer := 54); -- (clk / baud_rate) / 16 => (100 000 000 / 115 200) / 16 = 54.25
port(
clk : in std_logic;
reset : in std_logic;
rx_data_in : in std_logic;
rx_data_out : out std_logic_vector (7 downto 0)
);
end UART_rx;
architecture Behavioral of UART_rx is
type rx_states_t is (IDLE, START, DATA, STOP);
signal rx_state: rx_states_t := IDLE;
signal baud_rate_x16_clk : std_logic := '0';
signal rx_stored_data : std_logic_vector(7 downto 0) := (others => '0');
begin
-- The baud_rate_x16_clk_generator process generates an oversampled clock.
-- The baud_rate_x16_clk signal is 16 times faster than the baud rate clock.
-- Oversampling is needed to put the capture point at the middle of duration of
-- the receiving bit.
-- The BAUD_X16_CLK_TICKS constant reflects the ratio between the master clk
-- and the x16 baud rate.
baud_rate_x16_clk_generator: process(clk)
variable baud_x16_count: integer range 0 to (BAUD_X16_CLK_TICKS - 1) := (BAUD_X16_CLK_TICKS - 1);
begin
if rising_edge(clk) then
if (reset = '1') then
baud_rate_x16_clk <= '0';
baud_x16_count := (BAUD_X16_CLK_TICKS - 1);
else
if (baud_x16_count = 0) then
baud_rate_x16_clk <= '1';
baud_x16_count := (BAUD_X16_CLK_TICKS - 1);
else
baud_rate_x16_clk <= '0';
baud_x16_count := baud_x16_count - 1;
end if;
end if;
end if;
end process baud_rate_x16_clk_generator;
-- The UART_rx_FSM process represents a Finite State Machine which has
-- four states (IDLE, START, DATA, STOP). See inline comments for more details.
UART_rx_FSM: process(clk)
variable bit_duration_count : integer range 0 to 15 := 0;
variable bit_count : integer range 0 to 7 := 0;
begin
if rising_edge(clk) then
if (reset = '1') then
rx_state <= IDLE;
rx_stored_data <= (others => '0');
rx_data_out <= (others => '0');
bit_duration_count := 0;
bit_count := 0;
else
if (baud_rate_x16_clk = '1') then -- the FSM works 16 times faster the baud rate frequency
case rx_state is
when IDLE =>
rx_stored_data <= (others => '0'); -- clean the received data register
bit_duration_count := 0; -- reset counters
bit_count := 0;
if (rx_data_in = '0') then -- if the start bit received
rx_state <= START; -- transit to the START state
end if;
when START =>
if (rx_data_in = '0') then -- verify that the start bit is preset
if (bit_duration_count = 7) then -- wait a half of the baud rate cycle
rx_state <= DATA; -- (it puts the capture point at the middle of duration of the receiving bit)
bit_duration_count := 0;
else
bit_duration_count := bit_duration_count + 1;
end if;
else
rx_state <= IDLE; -- the start bit is not preset (false alarm)
end if;
when DATA =>
if (bit_duration_count = 15) then -- wait for "one" baud rate cycle (not strictly one, about one)
rx_stored_data(bit_count) <= rx_data_in; -- fill in the receiving register one received bit.
bit_duration_count := 0;
if (bit_count = 7) then -- when all 8 bit received, go to the STOP state
rx_state <= STOP;
bit_duration_count := 0;
else
bit_count := bit_count + 1;
end if;
else
bit_duration_count := bit_duration_count + 1;
end if;
when STOP =>
if (bit_duration_count = 15) then -- wait for "one" baud rate cycle
rx_data_out <= rx_stored_data; -- transer the received data to the outside world
rx_state <= IDLE;
else
bit_duration_count := bit_duration_count + 1;
end if;
when others =>
rx_state <= IDLE;
end case;
end if;
end if;
end if;
end process UART_rx_FSM;
end Behavioral;
按鈕控制器
為了從 Basys 3 板向計算機終端發送一個位,我們需要設置板開關并按下按鈕。此時我們需要確保發送位。為此,button_debounce.vhd
文件來了。
這是模塊的框圖:
![pYYBAGN6W9GAM4BbAADCVsrNJNk050.png](https://file.elecfans.com/web2/M00/7D/16/pYYBAGN6W9GAM4BbAADCVsrNJNk050.png)
如果輸入發生變化,則flipflop_1
和flipflop_2
信號會有所不同。button_in
差異觸發pause_counter
將button_in
信號從觸發器 2 傳遞到觸發器 3,但在COUNTER_SIZE
主時鐘周期之后。這允許button_in
信號在通過之前穩定在某個狀態。
和信號flipflop_3
有flipflop_4
一個主時鐘周期延遲。需要延遲來在button_out
輸出端創建一個短(一個主時鐘周期長)脈沖。完成pause_counter
后,flipflop_3
信號獲取button_in
信息。那一刻flipflop_4
還沒有改變。這會在button_out
一個主時鐘周期的輸出上創建“1”,僅當flipflop_3
為“1”時(按鈕已被按下,未釋放)。
這是模塊的代碼:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity button_debounce is
generic (
COUNTER_SIZE : integer := 10_000
);
port ( clk : in std_logic;
reset : in std_logic;
button_in : in std_logic;
button_out : out std_logic);
end button_debounce;
architecture Behavioral of button_debounce is
signal flipflop_1 : std_logic := '0'; -- output of flip-flop 1
signal flipflop_2 : std_logic := '0'; -- output of flip-flop 2
signal flipflop_3 : std_logic := '0'; -- output of flip-flop 3
signal flipflop_4 : std_logic := '0'; -- output of flip-flop 4
signal count_start : std_logic := '0';
begin
-- The input_flipflops process creates two serial flip-flops (flip-flop 1 and
-- flip-flop 2). The signal from button_in passes them one by one. If flip_flop_1
-- and flip_flop_2 are different, it means the button has been activated, and
-- count_start becomes '1' for one master clock cycle.
input_flipflops: process(clk)
begin
if rising_edge(clk) then
if (reset = '1') then
flipflop_1 <= '0';
flipflop_2 <= '0';
else
flipflop_1 <= button_in;
flipflop_2 <= flipflop_1;
end if;
end if;
end process input_flipflops;
-- The count_start signal triggers the pause_counter process to start counting
count_start <= flipflop_1 xor flipflop_2;
-- The pause_counter process passes the button_in signal farther from flip-flop 2
-- to flip-flop 3, but after COUNTER_SIZE master clock cycles. This allows
-- the button_in signal to stabilize in a certain state before being passed to the output.
pause_counter: process(clk)
variable count: integer range 0 to COUNTER_SIZE := 0;
begin
if rising_edge(clk) then
if (reset = '1') then
count := 0;
flipflop_3 <= '0';
else
if (count_start = '1') then
count := 0;
elsif (count < COUNTER_SIZE) then
count := count + 1;
else
flipflop_3 <= flipflop_2;
end if;
end if;
end if;
end process pause_counter;
-- the purpose of the output_flipflop process is creating another flip-flop (flip-flop 4),
-- which creates a delay between the flipflop_3 and flipflop_4 signals. The delay is
-- one master clock cycle long.
output_flipflop: process(clk)
begin
if rising_edge(clk) then
if (reset = '1') then
flipflop_4 <= '0';
else
flipflop_4 <= flipflop_3;
end if;
end if;
end process output_flipflop;
-- The delay is needed to create one short (one master clock cycle long) impuls
-- at the button_out output. When pause_counter has finished, the flipflop_3 signal gets
-- the button_in information. At the moment flipflop_4 hasn't changed yet.
-- This creates '1' at the button_out output for one master clock cycle, only if
-- flipflop_3 is '1' (The button has been pressed, not released).
with flipflop_3 select
button_out <= flipflop_3 xor flipflop_4 when '1',
'0' when others;
end Behavioral;
?
創建項目
在開始之前,請確保您在 Vivado 文件夾中有電路板文件。為此,請遵循本指南。
另外,如果你想逐步創建項目,你需要從代碼部分下載8個項目文件。
如果您不想逐步創建項目,可以從 GitHub 存儲庫(代碼部分)下載已完成的項目并跳轉到設計仿真部分。
逐步創建項目:
第 1 步- 打開 Vivado 并單擊“創建項目”
![poYBAGN6W9eAHa5yAACgNdb3kGY144.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6W9eAHa5yAACgNdb3kGY144.png)
![poYBAGN6W9mAfihsAACTtpzAEyU694.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6W9mAfihsAACTtpzAEyU694.png)
第 2 步- 為項目命名
![pYYBAGN6W9yAJL8GAACVmxtrf08062.png](https://file.elecfans.com/web2/M00/7D/16/pYYBAGN6W9yAJL8GAACVmxtrf08062.png)
第 3 步- 選擇“RTL 項目”并留下勾號,稍后我們將添加文件
![pYYBAGN6W96AFXEjAAC_oBLsgac561.png](https://file.elecfans.com/web2/M00/7D/16/pYYBAGN6W96AFXEjAAC_oBLsgac561.png)
第 4 步- 選擇電路板
![poYBAGN6W-KAOIQGAAC_P56hCcU126.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6W-KAOIQGAAC_P56hCcU126.png)
點擊完成
![poYBAGN6W-WAVnuRAACXdbgzdxA659.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6W-WAVnuRAACXdbgzdxA659.png)
您將看到空項目。
第 5 步- 單擊“+”添加源文件
![poYBAGN6W-uAI7MwAAEGpSTEekc878.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6W-uAI7MwAAEGpSTEekc878.png)
選擇“添加或創建設計源”
![pYYBAGN6W-2AW4L8AAB1AwPnh9M979.png](https://file.elecfans.com/web2/M00/7D/16/pYYBAGN6W-2AW4L8AAB1AwPnh9M979.png)
點擊“添加文件”
![pYYBAGN6W_KAa0aYAACbG147tdU227.png](https://file.elecfans.com/web2/M00/7D/16/pYYBAGN6W_KAa0aYAACbG147tdU227.png)
如圖選擇5個文件
![poYBAGN6W_SAd0RHAAERIHioiWw115.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6W_SAd0RHAAERIHioiWw115.png)
點擊“完成”
![poYBAGN6W_eAGDlbAAD8i9KAC9M249.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6W_eAGDlbAAD8i9KAC9M249.png)
第 6 步- 使用“添加或創建約束”和constraints.xdc
文件重復第 5 步。
第 7 步- 使用“添加或創建模擬源”UART_controller_tb.vhd
和UART_controller_tb_behav.wcfg
文件重復第 5 步。
你已經完成了這些步驟,你應該看到這個:
![pYYBAGN6W8OAU4ngAAC3z4zzsWc392.png](https://file.elecfans.com/web2/M00/7D/16/pYYBAGN6W8OAU4ngAAC3z4zzsWc392.png)
設計模擬
為了開始模擬,您需要走這條路:
Flow Navigator => SIMULATION => 運行模擬 => 運行行為模擬
在模擬窗口中,您需要如圖所示設置模擬時間,然后單擊帶有(T)子符號的“運行”按鈕。
![poYBAGN6W_uAbnaIAAAlEIyXNEA620.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6W_uAbnaIAAAlEIyXNEA620.png)
您應該能夠看到如下圖所示的模擬結果。您可以使用設置并選擇其他信號以更好地了解設計。
![poYBAGN6XAGALDVGAAZu2zg8v4M835.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6XAGALDVGAAZu2zg8v4M835.png)
綜合、實現、比特流
完成模擬后,您可能需要構建項目。為此,您需要遵循以下路徑:
Flow Navigator => SYNTHESIS => 運行綜合
您將看到此窗口,單擊“確定”。
![poYBAGN6XAiAMQuUAABPc4CfwjQ351.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6XAiAMQuUAABPc4CfwjQ351.png)
綜合完成后,您可以直接從此窗口開始實施:
![poYBAGN6XEOASXKJAAA7XH4RhgY213.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6XEOASXKJAAA7XH4RhgY213.png)
生成比特流的方式相同:
![pYYBAGN6XEmAHcO5AAA-IH6X9Ak041.png](https://file.elecfans.com/web2/M00/7D/17/pYYBAGN6XEmAHcO5AAA-IH6X9Ak041.png)
當比特流準備好后,您需要通過 USB 電纜將 Basys3 開發板連接到我們的計算機并打開開發板。之后,您需要打開硬件管理器:
![poYBAGN6XEuATE8gAABKEYitL9w705.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6XEuATE8gAABKEYitL9w705.png)
單擊“打開目標”并選擇“自動連接”。
![poYBAGN6XE6AcYJfAABJEhGeo6c549.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6XE6AcYJfAABJEhGeo6c549.png)
右鍵單擊零件編號并選擇“編程設備”。
![pYYBAGN6XFWAP3koAAEt5en1X9k471.png](https://file.elecfans.com/web2/M00/7D/17/pYYBAGN6XFWAP3koAAEt5en1X9k471.png)
您將看到下面的窗口,只需單擊“程序”。
![poYBAGN6XFiACW4IAABxSZ7gJQE651.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6XFiACW4IAABxSZ7gJQE651.png)
必須對芯片進行編程。最后一步是設置計算機終端。
Tera 術語設置
打開 Tera Term 并選擇“Serial”(在我的例子中是 COM4,但它可以是任何端口號)并單擊 OK。
![pYYBAGN6XFuAG1GuAACznQwBy44052.png](https://file.elecfans.com/web2/M00/7D/17/pYYBAGN6XFuAG1GuAACznQwBy44052.png)
轉到設置 => 串行端口...您將看到此窗口,如圖所示設置
![pYYBAGN6XF2ANFX3AACid8ND4gQ725.png](https://file.elecfans.com/web2/M00/7D/17/pYYBAGN6XF2ANFX3AACid8ND4gQ725.png)
轉到 Setup => Terminal... 并勾選“Local echo”,它可以讓您查看您正在輸入的內容。
![poYBAGN6XGCACTuPAADgPk7TF14564.png](https://file.elecfans.com/web2/M00/7C/89/poYBAGN6XGCACTuPAADgPk7TF14564.png)
完畢!
怎么玩
為了查看您在鍵盤上按下的鍵的二進制表示,您需要檢查板上的前 8 個 LED。
要將字節發送到終端,您需要使用前 8 個開關設置字節并按下中央按鈕 (U18)。您將看到您在板上設置的字節的 ASCII 表示。
要重置設計,您需要按下頂部按鈕 (T18)。
結論
這個項目遠不是一個完成的專業項目,因為它沒有很多重要的組件,例如:檢查停止位、奇偶校驗位、元穩定性防止、引腳緩沖區等。我想專注于主要設計:發送器和接收器的邏輯。
我希望這個項目是有幫助和有用的。
- verilog設計之基于basys3實現的簡易分秒數字鐘 0次下載
- 基于FPGA的波特率連續可調UART接口 10次下載
- Basys 3 Power Tree
- Basys 3 FPGA開發板的數據手冊免費下載 31次下載
- BASYS 3開發板的電路原理圖免費下載 28次下載
- BASYS 3 FPGA板參考手冊資料免費下載 8次下載
- 基于Vivado 的Basys3開發板的解碼教程 66次下載
- Digilent公司basys2開發板的全套開發例程 256次下載
- Xilinx 公司BASYs開發板自帶的Demo程序 11次下載
- Xilinx 的Basys板VGA顯示圖片原碼 45次下載
- 通用異步串行接口的VHDL實用化設計
- 通用異步串行接口的VHDL實用化設計
- UART參考設計,帶16byte緩沖 VHDL代碼 xapp
- UART 4 UART參考設計,Xilinx提供VHDL代碼
- 介紹Xilinx CPLD中配置UART的VHDL和Veri
- 嵌入式系統串口UART接口為啥沒有數據輸出 1004次閱讀
- 如何配置MAX78615+LMU用于UART通信 957次閱讀
- 如何使用Basys3板創建一個簡單的示波器 8181次閱讀
- 微雪電子AIO-3128C主板UART使用介紹 2198次閱讀
- AIO-3288C開發板UART串口簡介 1535次閱讀
- Firefly-RK3128開發板UART接口介紹 3401次閱讀
- digilentUSB轉UART接口介紹 2322次閱讀
- Firefly-RK3288開發板介紹 3014次閱讀
- digilent Artix-7 FPGA訓練板介紹 2256次閱讀
- Firefly關于UART接口使用介紹 2912次閱讀
- digilent Spartan-3E FPGA訓練板介紹 2935次閱讀
- 實現了接口功能和性能驗證自動化的UART&SPI接口驗證工具設計 3379次閱讀
- 電視uart接口干什么的 1.2w次閱讀
- vhdl數碼管中的倒計時程序介紹 8448次閱讀
- uart接口介紹和認識 2.3w次閱讀
下載排行
本周
- 1山景DSP芯片AP8248A2數據手冊
- 1.06 MB | 532次下載 | 免費
- 2RK3399完整板原理圖(支持平板,盒子VR)
- 3.28 MB | 339次下載 | 免費
- 3TC358743XBG評估板參考手冊
- 1.36 MB | 330次下載 | 免費
- 4DFM軟件使用教程
- 0.84 MB | 295次下載 | 免費
- 5元宇宙深度解析—未來的未來-風口還是泡沫
- 6.40 MB | 227次下載 | 免費
- 6迪文DGUS開發指南
- 31.67 MB | 194次下載 | 免費
- 7元宇宙底層硬件系列報告
- 13.42 MB | 182次下載 | 免費
- 8FP5207XR-G1中文應用手冊
- 1.09 MB | 178次下載 | 免費
本月
- 1OrCAD10.5下載OrCAD10.5中文版軟件
- 0.00 MB | 234315次下載 | 免費
- 2555集成電路應用800例(新編版)
- 0.00 MB | 33566次下載 | 免費
- 3接口電路圖大全
- 未知 | 30323次下載 | 免費
- 4開關電源設計實例指南
- 未知 | 21549次下載 | 免費
- 5電氣工程師手冊免費下載(新編第二版pdf電子書)
- 0.00 MB | 15349次下載 | 免費
- 6數字電路基礎pdf(下載)
- 未知 | 13750次下載 | 免費
- 7電子制作實例集錦 下載
- 未知 | 8113次下載 | 免費
- 8《LED驅動電路設計》 溫德爾著
- 0.00 MB | 6656次下載 | 免費
總榜
- 1matlab軟件下載入口
- 未知 | 935054次下載 | 免費
- 2protel99se軟件下載(可英文版轉中文版)
- 78.1 MB | 537798次下載 | 免費
- 3MATLAB 7.1 下載 (含軟件介紹)
- 未知 | 420027次下載 | 免費
- 4OrCAD10.5下載OrCAD10.5中文版軟件
- 0.00 MB | 234315次下載 | 免費
- 5Altium DXP2002下載入口
- 未知 | 233046次下載 | 免費
- 6電路仿真軟件multisim 10.0免費下載
- 340992 | 191187次下載 | 免費
- 7十天學會AVR單片機與C語言視頻教程 下載
- 158M | 183279次下載 | 免費
- 8proe5.0野火版下載(中文版免費下載)
- 未知 | 138040次下載 | 免費
評論