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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? onewire_master.vhd

?? something is very important in life. So read it. Try reading it,. I do not care. Please read it/ Ple
?? VHD
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
         when INIT =>        ---------------------------------------

                             -- Reset/Initialization state

                             ---------------------------------------

                             -- The one-wire bus will be pulled up,

                             -- so that next state we can send a

                             -- Reset Pulse (active low) to the bus.

                             ---------------------------------------

              

               dout <= '1';   -- begin the operation by pulling up

                              -- one-wire bus to high

                              

               d_ctrl <= '0'; -- write to the one-wire bus



               nextState <= TX_RST_PLS;

               

               jc1_reset <= '1';



         when TX_RST_PLS =>  ---------------------------------------

                               -- Transmit Reset Pulse state     

                               ---------------------------------------

                               -- In this state, the one-wire bus will

                               -- be pulled down (Tx "Reset Pulse") for

                               -- 480 us to reset the one-wire

                               -- device connected to the bus.

                               --

                               -- It enables FSM to move to next state

                               -- at 480 us. The transition of the state

                               -- will happend at 500 us.

                               --

                               -- Use JC1 and SR2 here to count for

                               -- longer time duration (0 ~ 480 us):

                               -----------------------------------------

                               -- Time    JC1 SR2  SR2    SR2

                               -- elapse      En   Rst

                               --  (us)                 msb     lsb

                               -----------------------------------------

                               --    0    "00" '0' '0'  "00000001"

                               --    20   "01" '0' '0'  "00000001"

                               --    40   "11" '0' '0'  "00000001" 

                               --    60   "10" '1' '0'  "00000001"

                               --    80   "00" '0' '0'  "00000010"

                               --   100   "01" '0' '0'  "00000010"

                               --   120   "11" '0' '0'  "00000010"

                               --   140   "10" '1' '0'  "00000010"

                               --   160   "00" '0' '0'  "00000100"

                               --   180   "01" '0' '0'  "00000100"

                               --   ...   ...  ... ...      ...

                               --   ...   ...  ... ...      ...

                               --   240   "00" '0' '0'  "00001000"

                               --   ...   ...  ... ...      ...

                               --   320   "00" '0' '0'  "00010000"

                               --   ...   ...  ... ...      ...

                               --   400   "00" '0' '0'  "00100000"

                               --   ...   ...  ... ...      ...

                               --   480   "00" '0' '1'  "01000000" 

                               --   500   "01" '0' '0'  "00000001"

                               ----------------------------------------



                                    

              sr2_en <= ts_60_to_80us; -- enable sr2 to shift every 80 us,

                                       -- transition will occur at next clock

                                       -- cycle

              

              if sr2_q(6) = '1'  then  -- count till 480 us has passed.

                               

                 d_ctrl <= '1'; -- release one-wire bus by changing to

                                -- read mode

                 nextState <= RX_PRE_PLS; -- goes to next state

                 jc1_reset <= '1';

                 sr2_reset <= '1'; -- reset sr2 at 480us



              else  -- 0 ~ 480 us

              

                 d_ctrl <= '0'; -- write data to one-wire bus

                 dout   <= '0'; -- Tx "Reset Pulse" for 480us

                     

                 sr2_reset <= '0'; -- use sr2 to count for longer

                                   -- time duration (0 ~ 480 us),

                 

              end if;

              

             

         when RX_PRE_PLS => 

                               ---------------------------------------

                               -- Detect Presence Pulse state     

                               ---------------------------------------

                               -- In this state, it sample the data

                               --  on the one wire bus when the

                               -- "Presence Pulse" will occur.

                               -- The data will be latched at 0~80 us.

                               -- Then it waits till total 500us has

                               -- has passed, and moves to next state

                               -- or goes back to INIT state according

                               -- to the presence of the "Presence

                               -- Pulse"

                               --

                               -- Use JC1 and SR2 here to count for

                               -- longer time duration (0 ~ 480 us):

                               --

                               -- Note:"Presence Pulse" indicates

                               -- a Serial Number Device is on the bus

                               -- and it's ready to operate.

                               ----------------------------------------

                               

              sr2_reset <=  '0'  ;   -- use sr2 to count for longer

                                     -- time duration (0 ~ 480 us),



              sr2_en <= ts_60_to_80us; -- enable sr2 to shift every 80 us



                             

              if sr2_q(6) = '1' then     -- 480us passed

              

                 d_ctrl <= '1'; -- remain read status on the bus

                    

                 if din_pp ='0' and din = '1' then -- detect presence pulse

                                                   -- and pull up after the

                                                   -- presence pulse

                   nextState <= TX_RD_CMD;

                   jc1_reset <= '1';

                 else

                   nextState <= INIT;

                 end if;

              

              else   -- 0 ~  480 us

                 

                 d_ctrl <= '1'; -- use read mode on the one-wire bus

                 

              end if;

         

         

         when TX_RD_CMD =>  ---------------------------------------

                               -- Transmit ROM Function Command state

                               ---------------------------------------

                               -- In this state, the onewire bus is

                               -- pulled down during first 10 us.

                               --

                               -- Then according to each bit of data

                               -- in the ROM Command (0x0F for Read ROM),

                               -- we write data to the Serial Number

                               -- Device:

                               -- (1) if we need to write '1' to the serial

                               -- number device, it will release

                               -- the one-wire bus to allow the

                               -- pull-up resistor to pull the wire to

                               -- '1';(2) if we need to write '0' to

                               -- the device, we output '0' directly

                               -- to the bus. This process happens from

                               -- 10 us to 60 us.

                               -- 

                               -- After 60us, it releases the bus allowing

                               -- the one-wire bus to be pulled back to

                               -- high, and enable SR1 to shift to 

                               -- next bit.

                               --  

                               -- After another 20us, the transition of SR1

                               -- will take place. The process will repeat

                               -- to transmit another bit in the ROM Command,

                               -- till all 8 bits in the ROM Command have

                               -- been sent out. 

                               --

                               -- After 8 bits of data has been sent out,

                               -- it moves to next state

                               -----------------------------------------

              

              sr1_reset <= '0';  -- start to use sr1 to count 8 bits in

                                 -- one byte of data



            

              if ts_60_to_80us = '1' then  -- 60 us passed

              

                 d_ctrl <= '1';       -- set read mode to release the one-wire

                                      -- bus

                 sr1_en <= '1';       -- one bit is sent, enable sr1 to

                                      -- move to next bit after 80us

               

                 if sr1_q(7) = '1' then  -- when all 8 bits has been sent

                    nextState <= RX_DATA; -- move to next state

                    jc1_reset <= '1';

                 end if;

              

              elsif ts_0_to_10us = '1'  then  -- 0 ~ 10 us



                 dout <= '0';   -- output '0' to one-wire bus

                 d_ctrl <= '0'; -- set write mode on the bus

                 

   

              else     -- 10 us ~ 60 us 



                 dout <= tx_cmd_bit;  -- write command bit to the bus

                 d_ctrl <= tx_cmd_bit; 

                                -- if write '1' to the one-wire bus,

                                -- we disable output by set read mode on

                                -- the bus, and use the external pull-up

                                -- resistor to pull up the one wire bus

                                -- to high (which represents '1')

                                --

                                -- if write '0' to the one-wire bus,

                                -- we actually send a '0' to the one-wire

                                -- bus using write mode on the bus

              end if;   

              

         

         when RX_DATA =>     ---------------------------------------

                               -- Receive Serial Number Data state

                               ---------------------------------------

                               -- In this state, the onewire bus is

                               -- pulled down during first 1 us, thisthen

                               -- is the initialization of the Rx of one

                               -- bit . Then it release the bus by change

                               -- back to read mode.

                               --

                               -- From 13us to 15 us, it samples the 

                               -- data on the one-wire bus, and assert

                               -- databit_valid signal. 

                               --

                               -- After 15us, it release the bus allowing

                               -- the one-wire bus to be pulled back to

                               -- high.

                               --

                               -- At 60us, it enables SR1 to shift to

                               -- next bit. After 80us, it finished

                               -- reading ONE bit. Then it repeats

                               -- the process to receive other 7

                               -- bits in one byte.

                               --

                               -- After 8 bits for one byte of data have

                               -- been received, the SR2 is used to

                               -- count for total 8 bytes of serial

                               -- number data.

                               --

                               -- After 8 bytes of data has been received,

                               -- it moves to next state

                               -----------------------------------------

         

              sr1_reset <= '0';  -- start to use sr1 to count 8 bits.

                                 -- sr1 is configured to scroll over

                                 -- when it reach the end. So it's

                                 -- not necessary to reset it.

              

              sr2_reset <= '0';  -- start to use sr2 to count for 

                                 -- 8 bytes coming from the one-wire device

                                 

              if ts_60_to_80us = '1' then  -- 60 us passed

              

                 sr1_en <= '1';     -- one bit is read, enable sr1 to move to

                                    -- next bit

                                 

                

                 sr2_en <= sr1_q(7);-- when sr1 shift to last bit which

                                    -- means all 8 bits in this byte of

                                    -- data have already been read,

                                    -- then we can move to next byte

                                    

                 databyte_valid <= sr1_q(7);  

                                    -- enable data output to external

                                    -- world when all 8 bits are read

                                    -- in.

                 

                 if ( sr2_q(7) and databyte_valid) = '1' then

                                    -- move to next state when all 8 bytes

                                    -- has been received.

                      nextState <= IDLE;

                      jc1_reset <= '1';

                 end if;

                 

              

              elsif ts_0_to_1us = '1' then -- 0~1 us

              

                 dout <= '0';   -- pull down for only 1 us

                 d_ctrl <= '0'; -- output '0' to one-wire bus to start write

                                -- period



              else   -- 1~ 60 us



                 d_ctrl <= '1'; -- release one-wire bus by keeping the read

                                -- mode

                 databit_valid <= ts_14_to_15us; 

                                -- assert databit_valid from 13 to 15us

                                -- in order to latch the data reading from

                                -- the one-wire device.



                    

              end if;   



         when IDLE =>

                               ---------------------------------------

                               -- IDLE state

                               ---------------------------------------

                               -- The onewire bus will be released to

                               -- read mode; the data bus will keep the

                               -- last byte (CRC value); crcok will

                               -- be valid as a latch signal.

                               --

                               -- Once enter IDLE state, it stays here

                               -- unless getting a system reset signal.

                               ---------------------------------------

              if crcok_i = '0' then

                 nextState <= INIT;

              else

                 nextState <= IDLE;

              end if;

                

         when Others =>

         



       end case;

     end process statemux;

     

          

end rtl;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产日韩一二三区| 色综合色综合色综合色综合色综合| 亚洲免费观看在线视频| 国产日韩亚洲欧美综合| 日韩久久久久久| 日韩欧美你懂的| 日韩精品一区二区三区视频播放| 欧美一区二区日韩| 91麻豆精品国产91久久久久久久久 | 亚洲国产wwwccc36天堂| 亚洲一区二区三区四区在线观看| 亚洲精品国产成人久久av盗摄 | 日本道色综合久久| 91九色最新地址| 欧美日本一区二区三区四区| 日韩三级在线观看| 久久久久高清精品| 国产精品美女久久久久aⅴ国产馆| 国产精品热久久久久夜色精品三区 | 国产自产视频一区二区三区| 国产91丝袜在线观看| 99久久精品国产麻豆演员表| 91久久一区二区| 日韩视频免费观看高清在线视频| 久久女同性恋中文字幕| 亚洲乱码中文字幕| 日韩在线卡一卡二| 国产成人综合网站| 欧美天堂一区二区三区| 2020国产精品久久精品美国| 成人欧美一区二区三区视频网页| 亚洲成人精品一区| 国产成人av影院| 欧美视频完全免费看| 久久综合视频网| 亚洲一线二线三线视频| 国产九色sp调教91| 欧美日韩一级二级三级| 欧美国产一区二区| 日韩精品电影在线| 一本大道久久a久久综合| 日韩欧美一卡二卡| 国产精品高潮呻吟久久| 视频一区在线视频| 国产真实乱对白精彩久久| 欧美图区在线视频| 欧美白人最猛性xxxxx69交| 欧美国产1区2区| 一区二区国产盗摄色噜噜| 日韩国产在线一| 国产成人免费视频一区| 欧美老肥妇做.爰bbww视频| 欧美午夜片在线观看| 欧美午夜片在线观看| 日韩欧美国产精品一区| 亚洲欧美在线视频观看| 香蕉久久夜色精品国产使用方法| 国产一区美女在线| 色婷婷综合久久久中文字幕| 日韩欧美黄色影院| 中文字幕欧美一| 久久不见久久见免费视频1| 91色乱码一区二区三区| 日韩精品一区二区三区视频在线观看| 亚洲天堂2016| 国产一区二区三区最好精华液| 国产麻豆一精品一av一免费| 99精品欧美一区二区蜜桃免费 | 日韩精品久久久久久| 成人综合激情网| 7777精品伊人久久久大香线蕉的| 国产精品毛片a∨一区二区三区| 欧美a级理论片| 国产精品一区二区无线| 欧美日韩国产高清一区二区| 国产精品毛片久久久久久久| 国产精品一二三四五| 亚洲人成在线播放网站岛国| 久久精品国产久精国产爱| 精品久久久久久久久久久院品网| 日韩影院免费视频| 国产精品午夜春色av| 欧美精三区欧美精三区| 亚洲成av人片在线观看| 中文字幕av在线一区二区三区| 欧美性做爰猛烈叫床潮| 亚洲女同女同女同女同女同69| 欧美人牲a欧美精品| 欧美一区二区网站| 午夜欧美2019年伦理| www.视频一区| 国产精品麻豆久久久| 国产精品白丝av| 精品999久久久| 麻豆成人久久精品二区三区小说| 欧美体内she精视频| 亚洲精品乱码久久久久| 91免费小视频| 亚洲欧美日韩中文播放 | 99在线精品一区二区三区| 欧美国产欧美亚州国产日韩mv天天看完整 | 欧美一级一级性生活免费录像| 亚洲一区二区在线免费看| 色婷婷综合久久久| 一区二区在线观看免费| 91美女视频网站| 天堂午夜影视日韩欧美一区二区| 欧美日韩激情一区| 亚洲制服丝袜在线| 在线国产电影不卡| 午夜在线成人av| 日韩一本二本av| 国产盗摄精品一区二区三区在线| 国产欧美一二三区| 99精品视频一区二区| 亚洲成人高清在线| 日韩小视频在线观看专区| 精品一区二区三区免费播放| 久久久久久久久99精品| 极品少妇xxxx精品少妇| 国产精品家庭影院| 在线观看网站黄不卡| 日韩二区三区四区| 国产日韩精品一区| 91国产丝袜在线播放| 全国精品久久少妇| 国产精品福利一区二区三区| 欧美在线免费视屏| 久久精工是国产品牌吗| 国产精品欧美一区喷水| 欧美日韩视频在线第一区| 国产美女在线观看一区| 亚洲女人小视频在线观看| 欧美日本国产一区| 国产精品1区二区.| 亚洲永久精品大片| 久久久www免费人成精品| 一本色道a无线码一区v| 久久99国产精品久久| 亚洲欧洲另类国产综合| 欧美电影免费观看完整版| 91在线观看免费视频| 免费成人av在线| 亚洲欧美另类图片小说| 26uuu色噜噜精品一区| 一本到不卡免费一区二区| 激情综合网激情| 国产精品久久免费看| 精品久久久三级丝袜| 欧美亚洲一区二区在线观看| 国产伦精品一区二区三区免费迷 | 亚洲欧美日韩国产一区二区三区| 日韩欧美专区在线| 欧美亚洲高清一区二区三区不卡| 国产成人亚洲综合a∨猫咪 | 欧美性大战久久| 不卡的av电影| 蜜臀a∨国产成人精品| 亚洲蜜臀av乱码久久精品| 久久久久久久免费视频了| 欧美精品一二三| 色综合天天综合网天天狠天天 | 国产一区二区精品久久| 亚洲一区二区三区四区在线免费观看 | 日韩高清不卡一区| 亚洲小少妇裸体bbw| 国产精品嫩草影院av蜜臀| 5566中文字幕一区二区电影| 在线亚洲+欧美+日本专区| 久久精品国产亚洲一区二区三区| 一区二区三区四区高清精品免费观看 | 丝袜亚洲另类丝袜在线| 亚洲午夜久久久久久久久久久| 日韩久久一区二区| 自拍偷拍欧美精品| 亚洲欧美激情插| 亚洲精品高清视频在线观看| 国产日产欧美精品一区二区三区| 久久一夜天堂av一区二区三区| 欧美精品一区二| 国产清纯白嫩初高生在线观看91 | 欧美绝品在线观看成人午夜影视| 欧美色偷偷大香| 欧美片在线播放| 欧美高清你懂得| 欧美电影免费观看高清完整版在线观看 | 麻豆精品国产91久久久久久| 国产在线观看一区二区| 高清国产一区二区三区| 不卡区在线中文字幕| 91麻豆精品在线观看| 欧美日韩中字一区| 欧美白人最猛性xxxxx69交| 久久日一线二线三线suv| 国产精品色一区二区三区| 亚洲精品伦理在线| 蜜桃一区二区三区在线| 国产精品一区二区三区99| 白白色 亚洲乱淫| 色婷婷精品久久二区二区蜜臀av|