Orodha ya maudhui:

Mwendo wa Sensored LED: 8 Hatua
Mwendo wa Sensored LED: 8 Hatua

Video: Mwendo wa Sensored LED: 8 Hatua

Video: Mwendo wa Sensored LED: 8 Hatua
Video: Goodluck Gozbert - Hauwezi Kushindana (Official Video) SMS SKIZA 8633371 TO 811 TO GET THIS SONG 2024, Novemba
Anonim
Image
Image

Usuli:

Je! Unasahau kuzima taa kabla ya kwenda darasani au kufanya kazi au kabla ya kwenda kulala? Saa hizo zilizo na taa ikiwa hautumii zinaweza kujumuisha upotezaji wa gharama na nishati. Kwa mfano, kulingana na solarcity.com, kuacha taa usiku kucha kwa wiki inaweza kuongeza $ 25 kwa bili yako ya umeme! Kwa mradi wetu wa CPE133, tunatengeneza taa ya sensa ya mwendo kusaidia watu kuhifadhi nishati katika nyumba zao na kutumia taa zao vizuri.

Mfumo wetu kwa vitendo:

Katika mazoezi, taa ingewashwa tu wakati sensa inapogundua mwendo ndani ya chumba. Kisha taa zitakaa juu kwa muda uliowekwa, kama karibu dakika 30, na kisha uzime kiatomati. Lakini wacha tuseme ulikuwa unapita tu au unataka kutoka kwenye chumba mapema kabla ya muda uliowekwa haujaisha. Kwa visa hivyo, tuliweka kitufe ambapo unaweza kuwasha au kuzima taa kwa mikono. Kumbuka taa zitakaa kwa dakika 30 hata wakati taa zinawashwa kwa mikono au kiatomati (isipokuwa taa zimezimwa kwa mikono).

Uigaji kwenye ubao:

Kuona kuwa kipima muda kiliibadilisha kipima muda kuwa dakika 1.

Vifaa:

  • Bodi 1 ya Basys (unaweza kupata moja hapa kutoka kwa Digilent)
  • 1 sensor ya mwendo wa PIR (unaweza kupata moja hapa kwenye Amazon)
  • 1 mkate na kit (tunashauri kutumia hii kutoka Amazon)
  • Kutoka kwa kit hapo juu

    • 1 LED
    • Kamba 3 za kike hadi za kiume
    • Kamba 6 za kuruka kiume hadi za kiume

Hatua ya 1: Timer

Ili taa ibaki kwa dakika 1, lazima kwanza tuunde kipima muda. Bodi ya Basys 3 ina masafa ya ndani ya 100MHz na hivyo kutengeneza mizunguko milioni 100 sawa na sekunde 1. Hii hutumiwa kama ubadilishaji ambao utafanya kama nambari ya juu kwa "t_cnt". T_cnt huongezeka kwa 1 wakati bodi ya Basys 3 inakamilisha mzunguko. Mara tu itakapofikia alama milioni 100 itaweka upya na ubadilishaji mwingine, "sec", itaongezeka kwa 1. Tofauti hii ya "sec" inawakilisha idadi ya sekunde zilizopita na mara utofauti huo ni sawa na 60, dakika kamili imepita.

Nakili nambari hapa chini kwenye faili ya chanzo ya vhdl iitwayo Timer.

huluki COUNT_8B ni

bandari (Rudisha: katika std_logic;

CLK: katika std_logic; T: nje std_logic: = '0');

mwisho COUNT_8B;

usanifu my_count ya COUNT_8B ni

hesabu ya mara kwa mara ya max: integer: = (100000000); - ishara t_cnt: std_logic_vector (7 chini ya 0): = "00000000"; ishara t_cnt: integer: = (0); Anza mchakato (CLK, RESET, t_cnt) sec sec: integer: = 0; anza ikiwa (rising_edge (CLK)) basi ikiwa (RESET = '1') basi t_cnt <= (0); - wazi elsif (t_cnt = max_count) basi - hesabu ya kiwango cha juu ni milioni 100 ambayo ni sawa na sekunde 1 t_cnt <= (0); - Rudisha saa ya ndani kuwa sekunde 0: = sec + 1; - Huongeza "saa yetu polepole" kwa 1 ikiwa (sec = 60) basi - Mara tu itakapofikia sekunde 60 basi imefikia wakati wa juu: = 0; - Rudisha "saa polepole" hadi 0 T <= '1'; mwisho ikiwa; vinginevyo t_cnt <= t_cnt + 1; - huongeza saa ya ndani T <= '0'; mwisho ikiwa; mwisho ikiwa; mchakato wa mwisho; maliza hesabu_yangu;

Hatua ya 2: Uboreshaji wa vifungo

LED
LED

Kwa kuwa masafa katika bodi za Basys ni kubwa sana (karibu 100 MHz) wakati unabonyeza kile unachofikiria ni muda mfupi kwa bodi ya Basys ungekuwa ukisisitiza mara 100, 000. Hii inasababisha taa kuwaka kati ya hali ya kuwasha na kuzima haraka. Tulijaribu kuongeza kitufe kwa kuunda mchoro wa serikali ili kupunguza uangazaji.

Flop-flops zitashikilia kila jimbo na kisha tutaainisha mabadiliko ya serikali katika taarifa ya mchakato.

Nakili nambari hapa chini kwenye faili ya chanzo ya vhdl iitwayo Button.

tumia IEEE. STD_LOGIC_1164. ALL;

Kitufe cha chombo ni

Bandari (btn: katika STD_LOGIC; clk: katika STD_LOGIC; E: nje STD_LOGIC); kifungo cha mwisho;

usanifu Tabia ya kitufe ni

aina state_type ni (PRESSED, NP); ishara PS, NS: state_type: = NP;

anza

seq_proc: mchakato (NS, clk) anza ikiwa (rising_edge (clk)) kisha PS <= NS; mwisho ikiwa; mchakato wa mwisho seq_proc;

ns_proc: mchakato (btn, PS)

kesi ya kuanza PS ni wakati NP => ikiwa (btn = '1') kisha NS <= IMESITIWA; E <= '1'; kingine NS <= NP; E ikiwa (btn = '0') basi NS <= NP; E <= '0'; kingine NS <= IMESITIWA; E <= '0'; mwisho ikiwa; kesi ya mwisho; mchakato wa mwisho ns_proc;

mwisho Tabia;

Hatua ya 3: LED

LED ina majimbo mawili: OFF (au IDLE) na ON. Kama ilivyosemwa hapo awali, majimbo yanahifadhiwa kwenye d-flip-flop. Taa itageuka ikiwa sensorer itagundua mwendo (S = 1) au wakati kifungo kinabanwa (E = 1). LED itazima kiatomati ikiwa kipima muda kinafikia dakika 1 (T = 1) au kwa mikono wakati kitufe kinabanwa (E = 1).

Nakili nambari hapa chini kwenye faili ya chanzo ya vhdl inayoitwa LED.

mwendo wa chombo_sensored_light ni Port (S: in STD_LOGIC; - sesnor; Port JA10 / Pin G3 E: in STD_LOGIC; - kitufe cha nje cha kazi ya mwongozo; Kitufe cha Kituo T: katika STD_LOGIC; - wakati kipima muda kinafikia wakati wa juu; Kutoka kwa timer LED: nje STD_LOGIC, - TRST nyepesi: nje STD_LOGIC; - inaseti clk timer: katika STD_LOGIC); - clk kwa flip flop ambayo inashikilia majimbo mwisho mwendo_sensored_light;

usanifu Tabia ya mwendo_sensored_light ni

aina state_type ni (ST0, ST1); -ST0 = IDLE, ST1 = LED Juu

ishara PS, NS: state_type: = ST0; - HALI YA SASA NA HALI IJAYO, huanza katika ST0 IDLE

anza

- mchakato wa kuzuia flip flop - sasisho hali juu ya kupanda kwa saa seq_proc: mchakato (NS, clk) kuanza - d flip flop ambayo inashikilia mataifa ikiwa (rising_edge (clk)) basi PS <= NS; mwisho ikiwa; mchakato wa mwisho seq_proc;

ns_proc: mchakato (S, E, T, PS)

kesi ya kuanza PS ni wakati ST0 => LED <= '0'; - matokeo ya hali ya uvivu TRST <= '1'; ikiwa (S = '0' AU E = '1') basi - pembejeo za mpito kutoka st0 hadi st1 NS <= ST1; vinginevyo NS LED <= '1'; - matokeo ya hali TRST <= '0'; ikiwa (E = '1' AU T = '1') basi - pembejeo za kubadilisha kutoka st1 hadi st0 NS <= ST0; kingine NS <= ST1; mwisho ikiwa; kesi ya mwisho; mchakato wa mwisho ns_proc;

mwisho Tabia;

Hatua ya 4: Faili ya Juu

Sasa tutaenda kuweka ramani kwa faili zingine zote kuwa moja.

Nakili nambari hapa chini kwenye faili ya chanzo ya vhdl iitwayo Top_File.

tumia IEEE. STD_LOGIC_1164. ALL;

chombo Top_File ni

Bandari (S: in STD_LOGIC: = '1'; - sesnor; Port JA10 / Pin G3 btn: in STD_LOGIC: = '0'; - kitufe cha nje cha kazi ya mwongozo; Kitufe cha Kituo cha LED: nje STD_LOGIC; - clk nyepesi: katika STD_LOGIC); - clk kwa flip flop ambayo inashikilia majimbo mwisho Top_File;

Tabia ya usanifu wa Top_File ni

sehemu COUNT_8B ni

bandari (RESET: in std_logic: = '0'; CLK: in std_logic; T: out std_logic: = '0'); sehemu ya mwisho; mwendo wa sehemu_sensored_light ni Port (S: in STD_LOGIC; - sesnor; Port JA10 / Pin G3 E: in STD_LOGIC; - kitufe cha nje cha kazi ya mwongozo; Kitufe cha Kituo T: katika STD_LOGIC; - wakati kipima muda kinafikia wakati wa juu; Kutoka kwa timer LED: nje STD_LOGIC; - TRST nyepesi: nje STD_LOGIC; - huweka upya kipima muda: katika STD_LOGIC); - clk kwa flip flop ambayo inashikilia sehemu ya mwisho ya majimbo; kitufe cha sehemu ni Port (btn: in STD_LOGIC; clk: in STD_LOGIC; E: out STD_LOGIC); sehemu ya mwisho; ishara t_ imefikia_c: std_logic; - ishara r_time_c: std_logic; - kitufe cha ishara_c: std_logic;

anza

kipima muda: COUNT_8B ramani ya bandari (Rudisha => r_time_c, CLK => CLK, T => t_ imefikia_c); mwendo_sensor: mwendo_sensored_ light ramani ya ramani (S => S, E => button_c, T => t_reached_c, LED => LED, TRST => r_time_c, clk => clk); mdhibiti wa kitufe: ramani ya bandari ya vifungo (btn => btn, clk => clk, E => button_c); mwisho Tabia;

Hatua ya 5: Vizuizi faili

Sasa tunapaswa kufafanua wapi pembejeo na matokeo yatakuwa kwenye bodi.

Nakili nambari hapa chini kwenye faili ya vizuizi vya vhdl inayoitwa Vizuizi.

# # Faili hii ni ya jumla. kwa majina ya ishara ya kiwango cha juu katika mradi huo

# # Saa ya saa

set_property PACKAGE_PIN W5 [get_ports clk] set_property IOSTANDARD LVCMOS33 [get_ports clk] create_clock -add -name sys_clk_pin -period 10.00 -waveform {0 5} [get_ports clk] ## Swichi #set_property PACKAGE_PIN V17 [0_pata nafasi] set_property IOSTANDARD LVCMOS33 [get_ports {sw [0]}] #set_property PACKAGE_PIN V16 [get_ports {sw [1]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [1]}] #set_property PACKAGE_PIN W16 [get_ports {sw [2] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [2]}] #set_property PACKAGE_PIN W17 [get_ports {sw [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [3]}] #set_property PACKAGE_PIN W15 [get_ports {sw [4]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [4]}] #set_property PACKAGE_PIN V15 [get_ports {sw [5]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [5]}] #set_property PACKAGE_PIN W14 [get_ports {] pata_mipaka {sw [7]}] #mali_ya_mipango PACKAGE_PIN V2 [pata_mipaka {sw [8]}] #mali_ya_kitengo IOSTANDARD LVCMOS33 [pata_mipaka {sw [8]}] #siku_mali PACKAGE_PIN T3 [pata_mipaka {sw [9]}] #miliki_mazingira IOSTANDARD " set_property IOSTANDARD LVCMOS33 [get_ports {sw [11]}] #set_property PACKAGE_PIN W2 [get_ports {sw [12]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [12]}] #set_property PACKAGE_PIN U1 [get_ports {sw [13] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [13]}] #set_property PACKAGE_PIN T1 [get_ports {sw [14]}] #set_property IOSTANDARD LVCMOS33 [get_ports {sw [14]}] #set_property PACKAGE_PIN R2 [get_ports {sw }] #set_mali IOSTANDARD LVCMOS33 [pata_poti {sw [15]}]

## LED

#set_property PACKAGE_PIN U16 [get_ports {led [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [0]}] #set_proderty PACKAGE_PIN E19 [get_ports {led [1]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [1] }] #set_property PACKAGE_PIN U19 [get_ports {led [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [2]}] #set_property PACKAGE_PIN V19 [get_ports {led [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports led { [3]}] #set_property PACKAGE_PIN W18 [get_ports {led [4]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [4]}] #set_property PACKAGE_PIN U15 [get_ports {led [5]}] #set_property IOSTANDARD LVCMOS33 [kupata_mipaka imesababisha [5]}] #set_property PACKAGE_PIN U14 [get_ports {led [6]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [6]}] #set_property PACKAGE_PIN V14 [get_ports {led [7]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [7]}] #set_property PACKAGE_PIN V13 [get_ports {led [8]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [8]}] #set_property PACKAGE_PIN V3 [get_ports {led [9]}] #mali_ya_za_Iostandard LVCMOS33 [pata_michezo {iliyoongozwa [9]}] #ka_mali PACKAGE_PIN W3 [viwanja_vilipwaliwa [10]}] #mali_ya_IostANDARD LVCMOS33 [pata_milikiwa [10]}] #set_property PACKAGE_PIN U3 [get_ports { [11]}] #mali_ya_za_Iostandard LVCMOS33 [pata_mipaka {ikiongozwa [11]}] #mali_ya_mali PACKAGE_PIN P3 [viwanja_viongoze [12]}] #mali_ya_IostANDARD LVCMOS33 [viwanja {viongozwe [12]}] #ma_milki PACKAGE_PIN N3 [kupata_poti_ {led [13]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [13]}] #set_property PACKAGE_PIN P1 [get_ports {led [14]}] #set_property IOSTANDARD LVCMOS33 [get_ports {led [14]}] #set_property PACKAGE_PIN L1 [pata viwanja {15 [}]}] #set_property PACKAGE_PIN W6 [get_ports {seg [1]}] #set_property IOSTANDARD LVCMOS33 [get_ports {seg [1]}] #set_property PACKAGE_PIN U8 [get_ports {seg [2]}] #set_property IOSTA NDARD LVCMOS33 [pata viwanja vya michezo {seg [2]}] #set_property PACKAGE_PIN V8 [get_ports {seg [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {seg [3]}] #set_property PACKAGE_PIN U5 [get_ports {seg [4]}] #set_property IOSTANDARD LVCMOS33 [get_ports {seg [4]}] #set_property PACKAGE_PIN V5 [get_ports {seg [5]}] #set_property IOSTANDARD LVCMOS33 [get_ports {seg [5]}] #set_property PACKAGE_PIN U7 [pata viwanja [seg [6] }] #set_mali IOSTANDARD LVCMOS33 [pata viwanja vya michezo {seg [6]}]

#set_property PACKAGE_PIN V7 [get_ports dp]

#set_property IOSTANDARD LVCMOS33 [pata_poti_dp]

#set_property PACKAGE_PIN U2 [pata viwanja vya ndege {0 [0]}]

#set_property IOSTANDARD LVCMOS33 [get_ports {an [0]}] #set_property PACKAGE_PIN U4 [get_ports {an [1]}] #set_property IOSTANDARD LVCMOS33 [get_ports {an [1]}] #set_property PACKAGE_PIN V4 [pata viwanja vya michezo [2] }] #set_property IOSTANDARD LVCMOS33 [pata_poti {2 [2]}] #set_property PACKAGE_PIN W4 [get_ports {an [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {an [3]}]

Vifungo vya # #

set_property PACKAGE_PIN U18 [get_ports btn] set_property IOSTANDARD LVCMOS33 [get_ports btn] #set_property PACKAGE_PIN T18 [get_ports btnU] #set_property [get_ports btnR] #set_property IOSTANDARD LVCMOS33 [get_ports btnR] #set_property PACKAGE_PIN U17 [get_ports btnD] #set_property IOSTANDARD LVCMOS33 [get_ports btnD]

## Kichwa cha Pmod JA

## Sch name = JA1 #set_property PACKAGE_PIN J1 [get_ports {JA [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JA [0]}] ## Sch name = JA2 #set_property PACKAGE_PIN L2 [get_ports {JA [1]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JA [1]}] ## Sch name = JA3 #set_property PACKAGE_PIN J2 [get_ports {JA [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JA [2]}] ## Sch name = JA4 #set_property PACKAGE_PIN G2 [get_ports {JA [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JA [3]}] ## Sch name = JA7 #set_property PACKAGE_PIN H1 [get_ports {JA [4]}] #set_property IOST " set_property IOSTANDARD LVCMOS33 [get_ports {JA [6]}] ## Sch name = JA10 set_property PACKAGE_PIN G3 [get_ports S] set_property IOSTANDARD LVCMOS33 [get_ports S]

## Kichwa cha Pmod JB

## Sch name = JB1 #set_property PACKAGE_PIN A14 [get_ports {JB [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JB [0]}] ## Sch name = JB2 #set_property PACKAGE_PIN A16 [get_ports {JB [1]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JB [1]}] ## Sch name = JB3 #set_property PACKAGE_PIN B15 [get_ports {JB [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JB [2]}] # # Sch jina = JB4 #set_property PACKAGE_PIN B16 [get_ports {JB [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JB [3]}] ## Sch name = JB7 #set_property PACKAGE_PIN A15 [get_ports {JB [4]}] #set_property IOST " PACKAGE_PIN C15 [pata_mipando {JB [6]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JB [6]}] ## Sch name = JB10 #set_property PACKAGE_PIN C16 [get_ports {JB [7]}] #set_property IOSTANDARD LVCMOS33 [get_ports] JB [7]}]

## Kichwa cha Pmod JC

## Sch name = JC1 #set_property PACKAGE_PIN K17 [get_ports {JC [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JC [0]}] ## Sch name = JC2 #set_property PACKAGE_PIN M18 [get_ports {JC [1]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JC [1]}] ## Sch name = JC3 #set_property PACKAGE_PIN N17 [get_ports {JC [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JC [2]}] ## Sch name = JC4 #set_property PACKAGE_PIN P18 [get_ports {JC [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JC [3]}] ## Sch name = JC7 #set_property PACKAGE_PIN L17 [get_ports {JC [4]}] #set_property IOST " PACKAGE_PIN P17 [pata_poti {JC [6]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JC [6]}] ## Sch name = JC10 #set_property PACKAGE_PIN R18 [get_ports {JC [7]}] #set_property IOSTANDARD LVCMOS33 [get_ports] JC [7]}]

## Kichwa cha Pmod JXADC

## Sch name = XA1_P #set_property PACKAGE_PIN J3 [get_ports {JXADC [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JXADC [0]}] ## Sch name = XA2_P #set_property PACKAGE_PIN L3 [get_ports {JXADC [1]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JXADC [1]}] ## Sch name = XA3_P #set_property PACKAGE_PIN M2 [get_ports {JXADC [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JXADC [2]}] ## Sch name = XA4_P #set_property PACKAGE_PIN N2 [get_ports {JXADC [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {JXADC [3]}] ## Sch name = XA1_N #set_property PACKAGE_PIN K3 [get_ports {JXADC [4]}] #set " PACKAGE_PIN M1 [pata_mitaa {JXADC [6]}] #set_mali IOSTANDARD LVCMOS33 [pata_poti {JXADC [6]}] ## Sch name = XA4_N #set_property PACKAGE_PIN N1 [get_ports {JXADC [7]}] #set_property IOSTANDARD LVCMOS [pata_poti {JXADC [7]}]

# # Kontakt VGA

#set_property PACKAGE_PIN G19 [get_ports {vgaRed [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {vgaRed [0]}] #set_property PACKAGE_PIN H19 [get_ports {vgaRed [1]}] #set_property IOSTANDARD LVCMOS [1] }] #set_property PACKAGE_PIN J19 [get_ports {vgaRed [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {vgaRed [2]}] #set_property PACKAGE_PIN N19 [get_ports {vgaRed [3]}] #set_property IOSTANDARD LVC [3]}] #set_property PACKAGE_PIN N18 [get_ports {vgaBlue [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {vgaBlue [0]}] #set_property PACKAGE_PIN L18 [get_ports {vgaBlue [1]}] #set_property IOSTANDARD [33] vgaBlue [1]}] #set_property PACKAGE_PIN K18 [get_ports {vgaBlue [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {vgaBlue [2]}] #set_property PACKAGE_PIN J18 [get_ports {vgaBlue [3]}] #set_property pata_poti {vgaBlue [3]}] #set_property PACKAGE_PIN J17 [get_ports {vgaGreen [0]}] #set_property IOSTANDARD LVCMOS33 [get_p orts {vgaGreen [0]}] #set_property PACKAGE_PIN H17 [get_ports {vgaGreen [1]}] #set_property IOSTANDARD LVCMOS33 [get_ports {vgaGreen [1]}] #set_property PACKAGE_PIN G17 [get_ports {vgaGreen [2]} LVCMOS33 [pata viwanja vya michezo {vgaGreen [2]}] #set_property PACKAGE_PIN D17 [get_ports {vgaGreen [3]}] #set_property IOSTANDARD LVCMOS33 [get_ports {vgaGreen [3]}] #set_property PACKAGE_PIN P19 [get_ports Hsync] Hsync] #set_property PACKAGE_PIN R19 [get_ports Vsync] #set_property IOSTANDARD LVCMOS33 [get_ports Vsync]

Kiolesura cha ## USB-RS232

#set_property PACKAGE_PIN B18 [get_ports RsRx] #set_property IOSTANDARD LVCMOS33 [get_ports RsRx] #set_property PACKAGE_PIN A18 [get_ports RsTx] #set_property IOSTANDARD LVCMOS33 [pata_ Viwanja RsTx]

## USB HID (PS / 2)

#set_property PACKAGE_PIN C17 [get_ports PS2Clk] #set_property IOSTANDARD LVCMOS33 [get_ports PS2Clk] #set_property PullUP true [get_ports PS2Clk] #set_property PACKAGE_PIN B17 [get_ports PS2Data] #Stop_property]

## Kiwango cha Quad SPI

## Kumbuka kuwa CCLK_0 haiwezi kuwekwa katika vifaa 7 vya mfululizo. Unaweza kuipata kwa kutumia # # STARTUPE2 ya zamani. #set_property PACKAGE_PIN D18 [get_ports {QspiDB [0]}] #set_property IOSTANDARD LVCMOS33 [get_ports {QspiDB [0]}] #set_property PACKAGE_PIN D19 [get_ports {QspiDB [1]}] #set_property IOSTANDARD LVCMOS] }] #set_property PACKAGE_PIN G18 [get_ports {QspiDB [2]}] #set_property IOSTANDARD LVCMOS33 [get_ports {QspiDB [2]}] #set_property PACKAGE_PIN F18 [get_ports {QspiDB [3]}] #set_property IOSTANDARD LVC [3]}] #set_property PACKAGE_PIN K19 [get_ports QspiCSn] #set_property IOSTANDARD LVCMOS33 [get_ports QspiCSn]

Hatua ya 6: Wiring Up Sensor ya Mwendo wa PIR

Wiring Up Sensor ya Mwendo wa PIR
Wiring Up Sensor ya Mwendo wa PIR
Wiring Up Sensor ya Mwendo wa PIR
Wiring Up Sensor ya Mwendo wa PIR

Sensor ya mwendo wa PIR ina pini tatu: nguvu, gnd, na kengele mtawaliwa (tazama picha ya kwanza). Sensor ya mwendo iliyopendekezwa katika hii inayoweza kufundishwa inaweza kuungana moja kwa moja kwenye ubao wa mkate. Lakini kwa sensorer tuliyotumia ilibidi tukate na kuvua waya na kisha tuziweke ncha zilizo wazi ili kuwazuia wasigombee. Kwenye ubao wa mkate weka waya wa kuruka wa kiume hadi wa kike mfululizo na pini za nguvu na za ardhini na kisha waya wa kiume na wa kiume mfululizo na pini ya kengele (angalia picha ya pili).

Hatua ya 7: Wiring Up LED katika Breadboard

Wiring Up LED katika ubao wa mkate
Wiring Up LED katika ubao wa mkate
Wiring Up LED katika ubao wa mkate
Wiring Up LED katika ubao wa mkate

Chomeka LED kwenye ubao wa mkate. Ingiza kebo nyeusi kwa kiume cha kuruka kiume mfululizo na mwongozo mfupi wa LED. Kisha ingiza cable ya kiume ya rangi tofauti na kiume cha kuruka mfululizo na risasi ndefu ya LED.

Hatua ya 8: Uunganisho wa Bodi ya Basys

Uunganisho wa Bodi ya Basys
Uunganisho wa Bodi ya Basys

Unganisha ncha za kike za sensorer ya mwendo wa PIR kwenye chanzo cha voltage ya volt 5 kwenye bodi ya basys. Kisha unganisha waya wa kiume wa ardhini wa LED kwenye ardhi ya bandari ya kando kisha waya wa kengele kutoka kwa sensorer ya mwendo wa PIR na kisha waya wa kuingiza wa LED (kama inavyoonekana kwenye picha).

Ilipendekeza: