亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? left_right_leds.vhd

?? Xilix spartan 3E 旋轉編碼器接口,脈沖方向識別,AB脈沖濾波 Rotary Encoder Interface Demonstrates how to use the rotar
?? VHD
字號:
--
-- Reference design - Rotary encoder and simple LEDs on Spartan-3E Starter Kit (Revision C)
--
-- Ken Chapman - Xilinx Ltd - November 2005
-- Revised 20th February 2006
--
-- This design demonstrates how to interface to the rotary encoder and simple LEDs.
--    At the start, only one LED is on. 
--    Turning the rotary encoder to the left or right will cause
--    the LED which is on to appear to also move in the corresponding direction.
--    Pressing the rotary encoder will invert all LEDs so that only one is off.
--
-- The design also uses the 50MHz oscillator provided on the board.
--
-- Instructional value
--   Basic VHDL including definition of inputs and outputs.
--   UCF (User Constraints File) constraints to define pin assignments to match board.
--   UCF constraints to apply pull-up and pull-down resistors to input pins.
--   Detecting rotary movement.
--   Synchronous design.
--
------------------------------------------------------------------------------------
--
-- NOTICE:
--
-- Copyright Xilinx, Inc. 2006.   This code may be contain portions patented by other 
-- third parties.  By providing this core as one possible implementation of a standard,
-- Xilinx is making no representation that the provided implementation of this standard 
-- is free from any claims of infringement by any third party.  Xilinx expressly 
-- disclaims any warranty with respect to the adequacy of the implementation, including 
-- but not limited to any warranty or representation that the implementation is free 
-- from claims of any third party.  Furthermore, Xilinx is providing this core as a 
-- courtesy to you and suggests that you contact all third parties to obtain the 
-- necessary rights to use this implementation.
--
------------------------------------------------------------------------------------
--
-- Library declarations
--
-- Standard IEEE libraries
--
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
--
------------------------------------------------------------------------------------
--
--
entity left_right_leds is
    Port (             led : out std_logic_vector(7 downto 0);
                  rotary_a : in std_logic;
                  rotary_b : in std_logic;
              rotary_press : in std_logic;
                       clk : in std_logic);
    end left_right_leds;
--
------------------------------------------------------------------------------------
--
-- Start of test architecture
--
architecture Behavioral of left_right_leds is
--
------------------------------------------------------------------------------------
--
-- Signals used to interface to rotary encoder
--
signal      rotary_a_in : std_logic;
signal      rotary_b_in : std_logic;
signal  rotary_press_in : std_logic;
signal        rotary_in : std_logic_vector(1 downto 0);
signal        rotary_q1 : std_logic;
signal        rotary_q2 : std_logic;
signal  delay_rotary_q1 : std_logic;
signal     rotary_event : std_logic;
signal      rotary_left : std_logic;
--
-- Signals used to drive LEDs
--
signal      led_pattern : std_logic_vector(7 downto 0):= "00010000"; --initial value puts one LED on near the middle.
signal        led_drive : std_logic_vector(7 downto 0);
--
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--
-- Start of circuit description
--
begin
  --
  ----------------------------------------------------------------------------------------------------------------------------------
  -- Interface to rotary encoder.
  -- Detection of movement and direction.
  ----------------------------------------------------------------------------------------------------------------------------------
  --
  -- The rotary switch contacts are filtered using their offset (one-hot) style to  
  -- clean them. Circuit concept by Peter Alfke.
  -- Note that the clock rate is fast compared with the switch rate.

  rotary_filter: process(clk)
  begin
    if clk'event and clk='1' then

      --Synchronise inputs to clock domain using flip-flops in input/output blocks.
      rotary_a_in <= rotary_a;
      rotary_b_in <= rotary_b;
      rotary_press_in <= rotary_press;

      --concatinate rotary input signals to form vector for case construct.
      rotary_in <= rotary_b_in & rotary_a_in;

      case rotary_in is

        when "00" => rotary_q1 <= '0';         
                     rotary_q2 <= rotary_q2;
 
        when "01" => rotary_q1 <= rotary_q1;
                     rotary_q2 <= '0';

        when "10" => rotary_q1 <= rotary_q1;
                     rotary_q2 <= '1';

        when "11" => rotary_q1 <= '1';
                     rotary_q2 <= rotary_q2; 

        when others => rotary_q1 <= rotary_q1; 
                       rotary_q2 <= rotary_q2; 
      end case;

    end if;
  end process rotary_filter;
  --
  -- The rising edges of 'rotary_q1' indicate that a rotation has occurred and the 
  -- state of 'rotary_q2' at that time will indicate the direction. 
  --
  direction: process(clk)
  begin
    if clk'event and clk='1' then

      delay_rotary_q1 <= rotary_q1;
      if rotary_q1='1' and delay_rotary_q1='0' then
        rotary_event <= '1';
        rotary_left <= rotary_q2;
       else
        rotary_event <= '0';
        rotary_left <= rotary_left;
      end if;

    end if;
  end process direction;
  --
  --
  ----------------------------------------------------------------------------------------------------------------------------------
  -- LED control.
  ----------------------------------------------------------------------------------------------------------------------------------
  --
  -- The LED pattern is provided by a shift register which has been initialised in the signal 
  -- definition to have only one bit active (High). 
  --
  led_display: process(clk)
  begin
    if clk'event and clk='1' then

      if rotary_event='1' then
        if rotary_left='1' then 
          led_pattern <= led_pattern(6 downto 0) & led_pattern(7); --rotate LEDs to left
         else
          led_pattern <= led_pattern(0) & led_pattern(7 downto 1); --rotate LEDs to right
        end if;
      end if;

     --
     -- Pressing the rotary encoder will cause all LED drive bits to be inverted.
     --

      if rotary_press_in='0' then
        led_drive <= led_pattern; 
       else
        led_drive <= led_pattern xor "11111111";  
      end if;

      --Ouput LED drive to the pins making use of the output flip-flops in input/output blocks.
      led <= led_drive; 

    end if;
  end process led_display;
  --
  --
end Behavioral;

------------------------------------------------------------------------------------------------------------------------------------
--
-- END OF FILE left_right_leds.vhd
--
------------------------------------------------------------------------------------------------------------------------------------

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线视频日韩| 亚洲国产成人高清精品| 欧洲精品一区二区三区在线观看| 国产成人在线视频免费播放| 激情五月婷婷综合网| 国产在线精品一区二区不卡了| 美女任你摸久久| 久久精品国产99国产精品| 久久精品国产99国产精品| 狠狠色丁香婷综合久久| 国产麻豆精品在线观看| 国产精品一级黄| 99久久伊人精品| 在线观看日韩电影| 欧美一区二区三区在线| 精品日韩一区二区三区免费视频| 久久婷婷国产综合国色天香| 国产欧美视频一区二区三区| 国产精品女主播在线观看| 亚洲日本丝袜连裤袜办公室| 亚洲国产一区二区视频| 美女在线观看视频一区二区| 国产老肥熟一区二区三区| 成人免费黄色在线| 欧美撒尿777hd撒尿| 欧美电影免费观看完整版| 久久色.com| 亚洲人成影院在线观看| 日韩av在线播放中文字幕| 久久www免费人成看片高清| 国产成人精品免费| 欧美在线观看视频一区二区 | 久久综合九色欧美综合狠狠| 国产日韩欧美一区二区三区综合| 亚洲靠逼com| 麻豆传媒一区二区三区| caoporn国产一区二区| 欧美精品久久99久久在免费线| 久久综合九色综合欧美亚洲| 亚洲黄色片在线观看| 久久精品国产**网站演员| aaa亚洲精品一二三区| 精品国产sm最大网站免费看| 久久久国产精华| 天天色综合成人网| 国产成人av资源| 欧美一区午夜视频在线观看| 中文字幕制服丝袜成人av| 另类人妖一区二区av| 91国产免费看| 国产精品久久久久影院色老大 | 日韩高清一级片| 99v久久综合狠狠综合久久| 日韩天堂在线观看| 夜夜嗨av一区二区三区网页| 高清成人在线观看| 精品久久国产字幕高潮| 亚洲高清久久久| 色悠悠久久综合| 中文幕一区二区三区久久蜜桃| 免费在线观看不卡| 欧美日韩国产小视频| 亚洲欧美日韩一区二区三区在线观看| 韩日精品视频一区| 日韩一区二区三区在线观看| 一区二区欧美在线观看| 99精品欧美一区二区三区小说| 亚洲精品一区二区精华| 久久激情五月婷婷| 日韩欧美国产1| 免费的成人av| 日韩一区和二区| 日韩—二三区免费观看av| 欧美日韩国产免费一区二区| 亚洲午夜免费视频| 欧美日韩一区二区三区高清| 一区二区免费在线播放| 在线欧美一区二区| 一区二区三区电影在线播| 欧美在线观看一二区| 亚洲在线视频网站| 欧美日韩国产电影| 蜜桃视频一区二区| 2020国产精品自拍| 国产成人aaaa| 中文字幕亚洲一区二区va在线| 国产麻豆精品在线| 中文字幕在线一区二区三区| 91麻豆免费视频| 亚洲最大成人综合| 3d动漫精品啪啪1区2区免费 | 国产乱妇无码大片在线观看| 久久在线免费观看| 成人18精品视频| 亚洲曰韩产成在线| 欧美一区二区视频免费观看| 国产裸体歌舞团一区二区| 国产精品久久综合| 欧美综合色免费| 久久国产精品一区二区| 国产女人水真多18毛片18精品视频| 不卡av在线免费观看| 亚洲va韩国va欧美va精品| 欧美一区二区三区精品| 国产99久久久国产精品潘金网站| 亚洲欧洲综合另类| 欧美一级专区免费大片| 丰满亚洲少妇av| 污片在线观看一区二区| 国产天堂亚洲国产碰碰| 欧美在线|欧美| 国产在线一区观看| 亚洲精品中文在线影院| 精品黑人一区二区三区久久 | 亚洲三级在线播放| 欧美一区二区三区四区在线观看| 国产精品亚洲一区二区三区在线| 一区二区三国产精华液| 久久亚洲私人国产精品va媚药| 色综合久久久久综合体| 久久精品国产99久久6| 亚洲一区免费观看| 国产欧美一区二区精品性| 在线成人免费视频| 蜜臀av国产精品久久久久| 不卡的看片网站| 亚洲影视在线播放| 精品国产一区a| 欧美三级视频在线观看| 风间由美一区二区三区在线观看| 亚洲国产日产av| 国产午夜一区二区三区| 91精品久久久久久久久99蜜臂| 成人激情视频网站| 精品一区二区三区久久| 香蕉成人伊视频在线观看| 国产精品久久久久久久久果冻传媒| 欧美一区二区久久久| 日本精品免费观看高清观看| 成人做爰69片免费看网站| 久久精品国产秦先生| 婷婷久久综合九色综合绿巨人| 欧美日韩一区二区三区在线| 国产精品成人午夜| 久久精品人人做人人爽97 | 久久精品综合网| 日韩欧美一卡二卡| 欧美日韩精品是欧美日韩精品| 色哟哟一区二区三区| 成人91在线观看| www.亚洲色图| 99re热这里只有精品免费视频| 成人一区二区三区在线观看| 国产麻豆91精品| 国产成人免费在线| 国产成人免费视频| 国产成人精品三级麻豆| 成人一区在线观看| 成人av小说网| 91污在线观看| 在线亚洲欧美专区二区| 欧美午夜精品免费| 欧美亚洲禁片免费| 欧美放荡的少妇| 欧美一级日韩免费不卡| 蜜臀99久久精品久久久久久软件| 在线播放欧美女士性生活| 欧美在线观看一区| 欧美欧美午夜aⅴ在线观看| 日本道色综合久久| 欧美羞羞免费网站| 日韩欧美一区二区三区在线| 精品国产伦理网| 国产欧美日韩三区| 亚洲男女一区二区三区| 午夜精品久久久久久不卡8050| 美女视频第一区二区三区免费观看网站 | 精品一区二区影视| 国产乱子伦一区二区三区国色天香| 国产精品自在在线| 97精品久久久午夜一区二区三区 | 欧美大片一区二区三区| 亚洲精品在线一区二区| 中文字幕在线不卡一区二区三区| 一区二区三区欧美激情| 日本在线不卡视频| 国产成人小视频| 欧美三级日本三级少妇99| 久久综合九色综合欧美就去吻 | 日本欧美一区二区| 成人免费av网站| 欧美美女直播网站| 国产精品萝li| 日本中文在线一区| 91美女片黄在线观看| 日韩区在线观看| 亚洲激情自拍视频| 国产综合久久久久久鬼色| 在线观看91精品国产入口| 2017欧美狠狠色|