Cov txheej txheem:
- Kauj Ruam 1: Tsim Cov Hluav Taws Xob Hluav Taws Xob
- Kauj Ruam 2: Txheeb Tus Pin Planner thiab Kho Verilog Code
- Kauj Ruam 3: Kho Verilog Code
- Kauj Ruam 4: Txheeb Cov Verilog Code
- Kauj Ruam 5: Cia Sim Sim
Video: FPGA Cyclone IV DueProLogic - Laub Khawm & LED: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
Hauv qhov kev qhia no, peb yuav siv FPGA los tswj cov LED sab nrauv. Peb yuav ua raws cov haujlwm hauv qab no
(A) Siv lub pob nyem ntawm FPGA Cyclone IV DuePrologic los tswj LED.
(B) Flash LED qhib & tawm ib ntus
Video demo
Lab ntawv qhia zaub mov:
Kauj Ruam 1: Tsim Cov Hluav Taws Xob Hluav Taws Xob
Kauj Ruam 2: Txheeb Tus Pin Planner thiab Kho Verilog Code
Kauj Ruam 3: Kho Verilog Code
Thaum koj yuav FPGA DueProLogic, koj yuav tsum tau txais daim DVD. Tom qab koj qhib "Projects_HDL", koj yuav tsum pom thawj daim ntawv ua ntaub ntawv
Ntxiv cov cai tseem ceeb. Nws sau npe rau I/O cov chaw nres nkoj thiab muab tus lej rau cov chaw nres nkoj.
cov xov hlau tso tawm [7: 0] XIO_1, // XIO-D2-D9
tso zis hlau [5: 0] XIO_2, // XIO-D10-D12
tso zis hlau [5: 0] XIO_3, // XIO-D22-D29
input hlau [5: 0] XIO_4, // XIO-D30-D37
input hlau [5: 0] XIO_5, // XIO-D38-D45
tso zis hlau [4: 0] XIO_6_OUT, // XIO-D46-D53
cov xov hlau [31: 5] XIO_6, // XIO-D46-D53
tso zis hlau [2: 0] XIO_7, // XIO - D69, D70, D71, D74, D75, D76
input hlau UBA, // Push Button Switches
input hlau UBB // Push Button Switches
muab XIO_1 [3] = start_stop_cntrl;
muab XIO_2 [1] = start_blinky; // LED nyem LED qhib thiab tawm
muab XIO_2 [2] = 1'b1; // tso zis siab
muab XIO_2 [3] = ~ UBA; // Laub khawm A
assign XIO_2 [4] = UBB; // Laub khawm B
muab c_enable = XIO_5 [2];
muab LEDExt = XIO_5 [5];
Tom qab ntawd peb yuav tsum teev sijhawm ncua sijhawm. Tawm tswv yim tus lej timer qub thiab sau lub sijhawm ua haujlwm tshiab
//-----------------------------------------------
// LED Blinky pib
//-----------------------------------------------
/*
ib txwm @(posedge CLK_66 lossis negedge RST)
pib
yog (! RST)
start_blinky <= 1'b0;
lwm tus
pib
yog (control_register [7: 4]> 0)
start_blinky <= 1'b1;
lwm tus
start_blinky <= 1'b0;
kawg
kawg
*/
reg [31: 0] ex;
pib pib
ex <= 32'b0;
start_blinky <= 1'b0;
kawg
ib txwm @(posedge CLK_66)
pib
ex <= ex + 1'b1;
yog (ex> 100000000) // nyem rau/tawm ~ 1.6 vib nas this, moos 66MHz
pib
start_blinky <=! start_blinky;
ex <= 32'b0;
kawg
kawg
//-----------------------------------------------
// LED ncua sij hawm timer
//-----------------------------------------------
/*
ib txwm @(posedge CLK_66 lossis negedge RST)
pib
yog (! RST)
led_delay_counter <= TIMER_LOW_LIMIT;
lwm tus
pib
yog (xeev [SELECT_MODE])
led_delay_counter <= timer_value;
lwm yam yog (xeev [WAIT_FOR_TIMER])
led_delay_counter <= led_delay_counter - 1'd1;
kawg
kawg*/
Kauj Ruam 4: Txheeb Cov Verilog Code
Nias "Pib Sib Sau Ua Ke" hauv Quartus, tsis muaj lus yuam kev yuav tsum tsim.
Yog tias koj tau txais cov lus yuam kev hais txog ntau tus pin. Mus rau Cov Haujlwm -> Ntaus -> Ntaus thiab Pin Xaiv -> Dual -Purpose Pins -> hloov tus nqi ntawm tus pin tsim nyog rau "Siv raws li I/O li niaj zaus".
Tom qab muab tso ua ke, koj yuav tsum tau txais cov ntaub ntawv pof tso tawm ncaj qha. Yog tias koj lub software tsis hloov kho tshiab, koj yuav tau txais cov ntaub ntawv sof nkaus xwb. Thaum nws tshwm sim, nyem "Cov Ntaub Ntawv" hauv Quartus -> "hloov cov ntaub ntawv programming". Hloov cov chaw uas tau cim los ntawm cov thawv liab.
Kauj Ruam 5: Cia Sim Sim
Tom qab tag nrho, nws yuav tsum ua haujlwm !!! LED daj yog ib txwm nyob. LED liab tab tom ci ntsa iab. Qhov xiav LED raug kaw yog tias koj nias lub pob B. Lub LED ntsuab qhib yog tias koj nias lub pob A.
Pom zoo:
FPGA Cyclone IV DueProLogic Tswj Raspberry Pi Lub Koob Yees Duab: 5 Kauj Ruam
FPGA Cyclone IV DueProLogic Tswj Raspberry Pi Lub Koob Yees Duab: Txawm hais tias FPGA DueProLogic raug tsim los rau Arduino, peb tab tom ua FPGA thiab Raspberry Pi 4B sib txuas tau. FPGA txhawm rau tig lub kaum sab xis ntawm
FPGA Cyclone IV DueProLogic Tswj Servo Tsav: 4 Kauj Ruam
FPGA Cyclone IV DueProLogic Controls Servo Motor: Hauv qhov kev qhia no, peb tab tom yuav sau Verilog code los tswj lub cav servo. Qhov servo SG-90 yog tsim los ntawm Waveshare. Thaum koj yuav lub servo motor, koj tuaj yeem tau txais cov ntawv teev npe uas ua haujlwm qhov hluav taws xob, qhov siab tshaj plaws thiab qhov xav tau Pu
DC Lub Cev Pib Pib, Ceev thiab Kev Taw Qhia Siv Tus Kheej Potentiometer, OLED Zaub & Khawm: 6 Cov Kauj Ruam
DC Motor Smooth Start, Speed and Direction Siv Tus Kheej Potentiometer, OLED Display & Buttons: Hauv qhov kev qhia no peb yuav kawm paub siv L298N DC MOTOR CONTROL tus tsav tsheb thiab lub hwj chim kom tswj tau DC lub zog pib zoo, nrawm thiab qhia nrog ob lub khawm thiab tso saib tus nqi potentiometer ntawm OLED Zaub. Saib cov yeeb yaj kiab
Rooj Bluetooth Hais Lus Nrog Pom Pom Lub Suab, Khawm Khawm thiab NFC.: 24 Kauj Ruam (nrog Duab)
Rooj Bluetooth Hais Lus Nrog Pom Pom Suab, Khawm Khawm thiab NFC.: Nyob zoo! Hauv Cov Lus Qhia no Kuv yuav qhia yuav ua li cas kuv thiaj ua Lub Rooj Sib Tham Bluetooth hais lus no uas muaj Lub Suab Pom Zoo Zoo nrog kov cov nyees khawm thiab NFC. Ua tau yooj yim ua ke nrog NFC Enabled cov cuab yeej nrog tsuas yog kov. Tsis muaj lub cev khawm
Micro: ntsis Cov Hauv Paus Kawm: Khawm Khawm: 11 Kauj Ruam
Micro: ntsis Cov Hauv Paus Kawm: Kov Khawm: Ntawm BBC Micro: ntsis, muaj 3 kov footers: pin0, pin1, pin2. Yog tias koj tuav tus GND tus pin nrog ib txhais tes thiab kov tus lej 0, 1, lossis 2 nrog rau lwm qhov, qhov hluav taws xob me me (nyab xeeb) yuav ntws los ntawm koj lub cev thiab rov qab mus rau hauv micro: me ntsis. Qhov no yog