Cov txheej txheem:
- Lub Hom Phiaj
- Kev paub thiab txuj ci
- Tsis lees paub thiab Credit
- Kauj Ruam 1: Qhov Chaw
- Daim Ntawv Teev Npe
- Qhov Chaw
- Cov Khoom Tshwj Xeeb Siv Ntawm No
- Cov Lus Hais Txog Xeem
- Kauj Ruam 2: Matrix
- Kev Txiav Txim Siab
- Tsim lub Matrix
- Tseem ceeb
- Kauj Ruam 3: Kev Tswj Kho Vajtse
- Tsim Kev Tswj Kho Vajtse
- Kauj ruam 4: Software
- Kev dag
- Hloov Sau Npe: Yuav Ua Li Cas
- Hais txog cov zaub
- Programming
- Hauv Kev Ua
- Kauj Ruam 5: Cov Qauv Ntsuas
- Lej
- Cascading Shift Sau Npe
- Ntau Kab Tsav Tsheb
- Piv Txwv
- Kauj Ruam 6: Xaus
- Tau Ntxiv
- Kauj Ruam 7: Ua Raws Li
- Cov Txheej Txheem Circuit Board
- Los ua ke
Video: LED Matrix Siv Hloov Npe: 7 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:31
Cov lus qhia no txhais tau tias yog kev piav qhia ntau dua li lwm qhov muaj nyob online. Qhov tshwj xeeb, qhov no yuav muab cov lus piav qhia kho vajtse ntau dua li muaj nyob hauv LED Marquee qhia los ntawm led555.
Lub Hom Phiaj
Cov lus qhia no nthuav qhia cov ntsiab lus cuam tshuam nrog kev hloov npe thiab cov tsav tsheb siab. Los ntawm kev piav qhia cov ntsiab lus no nrog 8x8 LED matrix Kuv vam tias yuav muab koj cov cuab yeej xav tau los hloov pauv thiab nthuav mus rau qhov loj thiab teeb tsa koj qhov phiaj xwm hu rau.
Kev paub thiab txuj ci
Kuv yuav ntsuas qhov haujlwm no kom muaj teeb meem nruab nrab:
- Yog tias koj twb muaj kev paub dhau los ua lub microcontrollers thiab ua haujlwm nrog LEDs txoj haujlwm no yuav tsum yooj yim rau koj kom ua tiav thiab ntsuas kom loj dua ntawm cov teeb.
- Yog tias koj nyuam qhuav pib tawm nrog microcontrollers thiab tau ua lub teeb ci LED lossis ob qho koj yuav tsum muaj peev xwm ua tiav txoj haujlwm no nrog qee qhov kev pab los ntawm peb tus phooj ywg google.
- Yog tias koj muaj kev paub me me lossis tsis muaj kev paub nrog microcontrollers lossis kev ua haujlwm no tej zaum yuav dhau qhov koj yuav tsum tau ua rau koj tus kheej. Sim tawm ob peb lwm txoj haujlwm pib thiab rov qab los thaum koj tau txais qee qhov kev paub dhau los sau cov haujlwm rau microcontrollers.
Tsis lees paub thiab Credit
Ua ntej tshaj, Kuv tsis yog kws kho hluav taws xob. Yog tias koj pom qee yam uas tsis raug, lossis tsis yog qhov ua tau zoo tshaj plaws, thov qhia rau kuv paub thiab kuv yuav kho qhov no. Ua qhov no ntawm koj tus kheej txoj kev pheej hmoo! Koj yuav tsum paub tias koj tab tom ua dab tsi lossis koj tuaj yeem tsim kev puas tsuaj rau koj lub khoos phis tawj, koj lub microcontroller, thiab koj tus kheej. cov ntawv teev uas tuaj nrog ks0108 universal C library. Txheeb qhov ntawd ntawm no:
Kauj Ruam 1: Qhov Chaw
Daim Ntawv Teev Npe
Qhov Chaw
Txhawm rau ua 8x8 daim phiaj ntawm LEDs thiab tswj lawv koj yuav xav tau:
- 64 LEDs ntawm koj xaiv
- 8 Resistors rau LEDs
- 1 Hloov npe rau kab ntawv
- 1 Tsav tsheb rau kab
- 8 Resistors rau hloov tus tsav tsheb
- 1 microcontroller
- 1 teev qhov chaw rau microcontroller
- 1 pawg thawj coj saib
- 1 fais fab mov
- Cov hlua txuas
Cov Khoom Tshwj Xeeb Siv Ntawm No
Rau qhov kev qhia no kuv siv cov hauv qab no:
- 64 ntsuab LEDs (Mouser ntu #604-WP7113GD)
- 8 220ohm 1/4 watt resistors rau LEDs (Mouser ntu #660-CFS1/4CT52R221J)
- 1 HEF4794 LED tsav tsheb nrog hloov npe (Mouser ntu #771-HEF4794BPN)
- 1 mic2981 High-Voltage High-Current Source Driver Array (Digikey ntu #576-1158-ND)
- 8 3.3kohm 1/4 watt resistors rau hloov tus tsav tsheb (Xov tooj cua Shack ntu #271-1328)
- 1 Atmel ATmega8 microcontroller (Mouser ntu #556-ATMEGA8-16PU)
- 1 12MHz siv lead ua rau lub microcontroller moos qhov chaw (Mouser ntu #815-AB-12-B2)
- 1 2200-qhov tsab ntawv tsa suab pawg thawj coj (Xov tooj cua Shack ntu #276-147)
- Hloov pauv ATX lub zog siv hluav taws xob: Saib Cov Lus Qhia No
- Cov tub ntxhais 22-awg nuv-txuas hlau (Xov tooj cua Shack ntu #278-1221)
- Solderless breadboard (Radio Shack ntu #276-169 (tsis muaj ntxiv lawm, sim: 276-002)
- AVR Zaj (Mouser ntu #556-ATAVRDRAGON)
- Dragon Rider 500 los ntawm Ecros Technologies: Saib Cov Lus Qhia No
Cov Lus Hais Txog Xeem
Kab thiab Kab Tsav Tsheb: Tej zaum qhov nyuaj tshaj plaws ntawm txoj haujlwm no yog xaiv kab thiab kab tsav tsheb. Ua ntej tshaj plaws, Kuv tsis xav tias tus qauv 74HC595 hloov npe rau npe yog lub tswv yim zoo ntawm no vim tias lawv tsis tuaj yeem ua haujlwm zoo li tam sim no peb xav xa los ntawm LEDs. Qhov no yog vim li cas kuv thiaj xaiv tus tsav tsheb HEF4794 vim nws tuaj yeem yooj yim poob tam sim no thaum tag nrho 8 lub leds nyob hauv ib kab tau hloov pauv. Qhov hloov npe muaj nyob ntawm sab qis (tus pin hauv av ntawm cov coj). Peb yuav xav tau tus tsav tsheb uas tuaj yeem muaj peev xwm txaus tam sim no los ua kab ntau kab ua ke. Lub mic2981 tuaj yeem muab txog li 500mA. Tsuas yog lwm qhov kuv tau pom uas ua txoj haujlwm no yog UDN2981 (digikey ntu #620-1120-ND) uas yog tib feem los ntawm cov chaw tsim khoom sib txawv. Thov xa xov tuaj rau kuv yog tias koj paub txog lwm tus tsav tsheb zoo uas yuav ua haujlwm zoo hauv daim ntawv thov no. LED Matrix: Cov lej no yog 8x8 vim tias kab thiab kab tsav tsheb txhua tus muaj 8 tus pin. Qhov loj ntawm LED tuaj yeem tsim los ntawm hlua ntau daim ntawv ua ke thiab yuav tham txog hauv "cov ntsiab lus hloov pauv". Yog tias koj xav tau cov khoom loj, xaj txhua qhov uas xav tau ntawm ib zaug. There muaj 8x8, 5x7 thiab 5x8 LED matrices muaj nyob hauv ib pob yooj yim. Cov no yuav tsum yooj yim los hloov rau diy matrix. Ebay yog qhov chaw zoo rau cov no. Mouser muaj qee qhov 5x7 chav nyob xws li ntu #604-TA12-11GWA. Kuv siv LEDs ntsuab ntsuab vim kuv tab tom ua si ib puag ncig thiab muaj kev lom zem. Kev siv nyiaj ntau dua ntawm qhov ci ci, ua haujlwm tau zoo LEDs tuaj yeem tso cai rau koj los tsim cov duab zoo nkauj dua… qhov no zoo txaus rau kuv txawm hais tias! Koj yuav xav tau tus programmer rau qhov no. Vim tias kuv tab tom tsim qauv Kuv tab tom siv Dragon Rider 500 uas kuv tau sau ob qho tib si los ua ke thiab siv qhia tau. Nov yog qhov cuab yeej yooj yim rau kev tsim qauv thiab kuv pom zoo nws.
Kauj Ruam 2: Matrix
Kuv yuav tsim kuv tus kheej LED matrix rau txoj haujlwm no siv 5mm leds thiab lub rooj tsav xwm tsim qauv los ntawm Xov Tooj Cua. Nws yuav tsum tau sau tseg tias koj tuaj yeem yuav 8x8 dot matrix coj cov qauv los ntawm ntau qhov chaw, suav nrog ebay. Lawv yuav tsum ua haujlwm zoo nrog cov lus qhia no.
Kev Txiav Txim Siab
Cov LEDS yuav tsum tau ua kom sib haum yog li lawv ntsib tib txoj kev taw qhia ntawm tib lub kaum ntse ntse. Kuv pom qhov kev xaiv yooj yim tshaj plaws rau kuv yog muab lub cev ntawm cov dej ntws yaug rau hauv lub rooj tsavxwm thiab tuav nws nrog me me ntawm plexiglass thiab lub clamp. Kuv muab ob peb LEDs tso rau ntawm ob peb ntiv tes ntawm kab kuv tau ua haujlwm kom paub tseeb tias lub plexiglass tau ua tib zoo nrog lub rooj tsav xwm qauv. Vim tias peb kab thiab kab lus xaiv tus tsav tsheb peb yuav tsum muaj anode (cov hlau lead zoo ntawm LED) txuas nrog kab thiab cathode (cov hlau tsis zoo ntawm LED) txuas nrog los ntawm kab. Tswj Cov Hluav Taws Xob Rau qhov qauv no kuv tab tom siv cov tub ntxhais muaj zog (ib tus neeg xyuas pib) sib txuas hlau. Qhov no yuav yooj yim heev rau cuam tshuam nrog lub lauj kaub tais diav uas tsis txhuam. Xav tias dawb siv hom sib txuas sib txawv kom haum rau koj qhov project.
Tsim lub Matrix
1. Muab thawj kab ntawm LEDS tso rau hauv pawg thawj coj. 2. Txheeb ob zaug tias koj qhov polarity rau txhua LED yog qhov raug, qhov no yuav nyuaj rau kho yog tias koj paub nws tom qab. 3. Siv ob qho tib si coj ntawm LED mus rau lub rooj tsavxwm. Txheeb xyuas kom ntseeg tau tias lawv tau ua kom raug (tsis yog ntawm cov ces kaum txawv) thiab txiav tawm cov cathode coj. Nco ntsoov tias koj tsis kaw qhov anode txhuas, peb yuav xav tau tom qab yog li cia li tso nws taw tes. 4. Tshem cov rwb thaiv tsev los ntawm ib qho ntawm cov tub ntxhais hlau xaim. Muab cov xaim no txuas rau txhua qhov cathode sab xis ntawm qib board.
- Kuv tsoo qhov no ntawm txhua qhov kawg tom qab ntawd rov qab mus thiab ntxiv me ntsis ntawm cov laug ntawm txhua qhov kev sib tshuam.
- Cov xov hlau no yuav tsum hla dhau koj lub LED kawg los ua kom yooj yim cuam tshuam thaum peb ntxiv tswj cov xov hlau.
5. Rov ua qhov ntu 1-4 kom txog thaum koj muaj tag nrho cov LEDs nyob rau hauv qhov chaw thiab tag nrho cov kab tsheb npav tau muag. Txhawm rau tsim kab tsheb npav, khoov ob peb ntawm cov anode ua rau ntawm lub kaum sab xis 90 degree yog li lawv kov lwm qhov anode ua rau tib kab.
- Muaj cov duab ntxaws ntxaws ntawm qhov hauv qab no.
- Saib xyuas kom tsis txhob cia cov no los cuam tshuam nrog cov tsheb npav, tsim kom muaj hluav taws xob luv.
7. Muab cov hlau lead tso rau ntawm txhua qhov kev sib tshuam thiab tshem tawm qhov ua rau anode ntau dhau.
Tawm qhov kawg anode lo dhau qhov kawg LED. Qhov no yuav raug siv los txuas cov kab tsav tswj kab
8. Rov ua dua ntu 6 & 7 kom txog rau thaum tag nrho cov tsheb npav tau muab muag lawm. 9. Txuas cov xov hlau tswj.
- Kuv siv cov xov hlau liab liab rau kab thiab dub rau kab.
- Txuas ib xaim rau txhua kab thiab ib qho rau txhua kab. Qhov no tuaj yeem ua tau yooj yim tom kawg ntawm txhua lub npav.
Tseem ceeb
Qhov matrix LED no tsis muaj qhov txwv tam sim no. Yog tias koj sim qhov no yam tsis muaj kev tiv thaiv koj yuav zaum hlawv koj cov LEDs thiab txhua txoj haujlwm no yuav tsis muaj dab tsi.
Kauj Ruam 3: Kev Tswj Kho Vajtse
Peb yuav tsum tswj cov kab thiab kab ntawm peb cov lej LED. Lub matrix tau tsim los kom Anodes (qhov hluav taws xob sab ntawm LED) tsim cov kab, thiab Cathodes (sab hauv av ntawm LED) ua kab. Qhov no txhais tau tias peb tus neeg tsav tsheb xav tau los rau tam sim no thiab peb tus tsav tsheb yuav tsum tau tso nws tseg. Txoj kev no kuv tuaj yeem tswj tau yuav luag txhua tus naj npawb ntawm kab nrog tsuas yog plaub tus microcontroller pins. Nws muaj peev xwm siv tau tsuas yog peb qho yog Pab Kom Tus Pin tso zis ncaj qha rau qhov hluav taws xob. Kuv tau xaiv tus HEF4794 LED tsav nrog hloov npe. Qhov no yog qhov kev xaiv zoo dua li tus qauv 74HC595 raws li nws tuaj yeem yooj yim poob tam sim no thaum tag nrho 8 LEDs nyob rau ntawm ib zaug. Nyob rau sab siab (tam sim no rau kab) Kuv siv mic2981. Cov txheej txheem qhia pom UDN2981, Kuv ntseeg tias ob qho no sib pauv tau. Tus neeg tsav tsheb no tuaj yeem siv txog 500mA tam sim no. Vim tias peb tsuas yog tsav 1 kab nyob rau ib lub sijhawm qhov no muab sijhawm ntau rau kev nthuav dav, mus txog 33 kab rau cov nti no (ntau ntxiv ntawm qhov ntawd hauv "cov ntsiab lus hloov pauv" kauj ruam).
Tsim Kev Tswj Kho Vajtse
Txog qhov kev qhia no kuv tsuas yog tau ua daim phiaj no. Rau qhov kev daws teeb meem tas mus li koj yuav xav tau txhawm rau txheeb koj tus kheej lub rooj tsav xwm hauv Circuit lossis siv lub rooj tsav xwm tsim qauv. 1. Kab Tsav
- Muab lub mic2981 (lossis UDN2981) tso rau hauv lub khob cij
- Txuas tus Pin 9 rau Qhov Hluav Taws Xob (Qhov no tsis meej pem hauv qhov txheej txheem)
- Txuas tus Pin 10 rau hauv av (Qhov no tsis meej pem hauv cov txheej txheem)
- ntxig 3k3 resistors txuas rau tus pin 1-8
- Txuas los ntawm Chaw D ntawm ATmega8 (PD0-PD8) mus rau 8 tus tiv thaiv
- Txuas 8 kab tswj kab ntawm LED matrix rau tus pin 11-18 (nco ntsoov tias kuv tau txuas kab qis tshaj ntawm LEDs rau Pin 18 thiab Kab Siab Tshaj rau Pin 11).
2. Kem Tsav
- Muab lub hef4794 tso rau hauv daim ntawv tais
- Txuas tus Pin 16 rau qhov hluav taws xob
- Txuas tus Pin 8 rau hauv av
- Txuas 220 ohm resistors rau Pins 4-7 thiab 11-14.
- Txuas 8 kab kev tswj cov xov hlau los ntawm LED matrix mus rau 8 tus tiv thaiv uas koj nyuam qhuav txuas nrog.
- Txuas Pin1 (Latch) rau PC0 ntawm ATmega8
- Txuas Pin2 (Cov Ntaub Ntawv) rau PC1 ntawm ATmega8
- Txuas Pin3 (Clock) rau PC2 ntawm ATmega8
- Txuas Pin15 (Pab Kom Tawm) rau PC3 ntawm ATmega8
3. Lub moos Crystal
Txuas lub 12MHz siv lead ua thiab thauj cov capacitors raws li qhia hauv kab lus
4. ISP
Txuas lub program header raws li qhia hauv schematic
5. Filtering Capacitor thiab Pull-up resistor
- Nws yog qhov zoo tshaj los lim qhov hluav taws xob uas muab rau ATmega8. Siv 0.1uf capacitor nruab nrab ntawm Pin 7 & 8 ntawm ATmega8
- Tus pin rov pib dua yuav tsum tsis txhob sab laug vim nws tuaj yeem ua rau rov pib dua. Siv tus tiv thaiv kom txuas nws mus rau qhov hluav taws xob, txhua yam txog 1k yuav tsum yog qhov zoo. Kuv tau siv 10k resistor hauv cov txheej txheem.
6. Nco ntsoov tias koj siv +5v tswj lub zog. Nws nyob ntawm koj los tsim tus tswj hwm.
Kauj ruam 4: Software
Kev dag
Yog, zoo li txhua yam, muaj qhov ua kom yuam kev. Qhov ua kom yuam kev yog tias tsis muaj ntau dua 8 LEDs teeb nyob rau ib zaug. Txhawm rau kom ua haujlwm tau zoo, yuav tsum tau siv lub tswv yim me ntsis. Lub tswv yim kuv tau xaiv yog siv lub sijhawm cuam tshuam. Nov yog yuav ua li cas cov zaub cuam tshuam ua haujlwm hauv lus Askiv yooj yim:
- Timer suav txog qee qhov taw tes, thaum mus txog qhov cuam tshuam kev pabcuam ib txwm ua haujlwm.
- Qhov kev niaj hnub txiav txim siab tias kab twg yog kab tom ntej los nthuav tawm.
- Cov ntaub ntawv rau kab tom ntej yog saib los ntawm qhov tsis thiab hloov pauv mus rau kab tsav (cov ntaub ntawv no tsis yog "kaw" yog li nws tseem tsis tau tshwm sim).
- Tus neeg tsav tsheb ua kab raug kaw, tam sim no tsis muaj LEDs tau taws.
- Tus tsav tsheb yog "kaw" ua hauv cov ntaub ntawv peb tau hloov pauv hauv ob kauj ruam dhau los cov ntaub ntawv tam sim no los tso tawm.
- Tus neeg tsav tsheb kab ntawv muab tam sim no rau kab tshiab uas peb tab tom tso tawm.
- Cov kev pabcuam cuam tshuam tas li tas li thiab cov haujlwm rov zoo li qub mus txog thaum cuam tshuam tom ntej.
Qhov no tshwm sim sai heev. Qhov cuam tshuam raug cuam tshuam txhua 1 mSec. Qhov no txhais tau tias peb tab tom rov kho dua tag nrho cov zaub ib zaug txhua 8 mSec. Qhov no txhais tau tias tus lej tso saib ib puag ncig 125Hz. Muaj qee qhov kev txhawj xeeb txog qhov ci ntsa iab vim tias peb tau ua haujlwm tseem ceeb ntawm LEDs ntawm lub sijhawm ua haujlwm 1/8 (lawv tawm 7/8 ntawm lub sijhawm). Hauv kuv qhov xwm txheej kuv tau txais lub teeb pom kev zoo txaus uas tsis pom qhov muag. Qhov puv LED zaub tau teeb tsa hauv ib qho array. Hauv nruab nrab ntawm kev cuam tshuam cov kab tuaj yeem hloov pauv (nco ntsoov ntawm atomicity) thiab yuav tshwm ntawm cov zaub thaum cuam tshuam tom ntej. Qhov tshwj xeeb ntawm kev sau cov cai rau AVR microcontroller thiab ntawm yuav ua li cas sau cov cai los tham nrog kev hloov pauv sau npe yog dhau qhov txwv ntawm qhov kev qhia no. Kuv tau suav nrog qhov chaws (sau hauv C thiab suav nrog AVR-GCC) nrog rau cov ntawv hex rau qhov program ncaj qha. Kuv tau tawm tswv yim tag nrho cov cai yog li koj yuav tsum tuaj yeem siv qhov no los daws cov lus nug txog yuav ua li cas thiaj li tau txais cov ntaub ntawv rau hauv kev hloov pauv npe thiab yuav ua li cas kab rov ua haujlwm tau zoo dua. ks0108 universal C lub tsev qiv ntawv. Lub tsev qiv ntawv ntawd tuaj yeem pom ntawm no:
Hloov Sau Npe: Yuav Ua Li Cas
Kuv tau txiav txim siab ntxiv me ntsis txog yuav ua haujlwm li cas nrog kev hloov npe. Kuv vam tias qhov no tshem tawm qee yam rau cov uas tsis tau ua haujlwm nrog lawv ua ntej. Qhov lawv ua dab tsiShift Cov Ntawv Sau Npe coj lub teeb liab los ntawm ib lub xov hlau thiab tso tawm cov ntaub ntawv ntawd rau ntau tus pin sib txawv. Hauv qhov no, muaj ib cov ntaub ntawv xov tooj uas siv cov ntaub ntawv thiab 8 tus pin uas raug tswj nyob ntawm seb cov ntaub ntawv tau txais. Txhawm rau ua kom txhua yam zoo dua, muaj tus lej tawm rau txhua qhov kev hloov pauv npe uas tuaj yeem txuas nrog tus pin nkag ntawm lwm qhov kev hloov npe. Qhov no hu ua cascading thiab ua rau kev nthuav dav nthuav tawm yuav luag tsis muaj kev cia siab. Qhov Tswj PinsShift sau npe muaj 4 tswj tus pin:
- Latch - Tus pin no qhia hloov pauv rau npe thaum nws txog sijhawm hloov mus rau cov ntaub ntawv nkag tshiab
- Cov Ntaub Ntawv - Tus 1's thiab 0's qhia txog kev hloov pauv sau npe dab tsi pins kom qhib tau txais ntawm tus pin no.
- Moos - Qhov no yog mem tes xa los ntawm lub microcontroller uas qhia hloov pauv rau npe txhawm rau nyeem cov ntaub ntawv thiab txav mus rau theem tom ntej hauv kev sib txuas lus
- Pab kom cov zis tawm - Qhov no yog qhov hloov/qhib, Siab = On, Tsawg = Tawm
Ua kom nws ua koj li kev twv: Nov yog chav kawm sib tsoo hauv kev ua haujlwm ntawm cov tswj hwm saum toj no: Kauj Ruam 1: Teeb Latch, Cov Ntaub Ntawv, thiab Tsawg
Teeb Latch qis qhia qhov hloov pauv npe peb tab tom yuav sau rau nws
Kauj Ruam 2: Teeb Cov Ntaub Ntawv tus pin rau tus lej tus lej koj xav xa mus rau Shift RegisterStep 3: Teem Clock tus pin siab, qhia Shift Register kom nyeem hauv Cov Ntaub Ntawv tus lej tam sim no
Tag nrho lwm qhov txiaj ntsig tam sim no hauv Shift Register yuav txav los ntawm 1 qhov chaw, ua rau chav rau tus nqi logic tam sim no ntawm Cov Ntaub Ntawv tus lej
Kauj Ruam 4: Teem Clock pin Low thiab rov ua cov kauj ruam 2 thiab 3 kom txog thaum tag nrho cov ntaub ntawv tau raug xa mus rau qhov hloov pauv npe.
Tus pin tus pin yuav tsum tau teeb tsa qis ua ntej hloov mus rau tom ntej Cov ntaub ntawv tus nqi. Toggling tus pin ntawm siab thiab qis yog dab tsi tsim "moos mem tes" kev hloov pauv npe yuav tsum paub thaum twg yuav txav mus rau kauj ruam tom ntej hauv tus txheej txheem
Kauj Ruam 5: Teeb Latch siab
Qhov no qhia kev hloov pauv rau npe kom nqa tag nrho cov ntaub ntawv uas tau hloov pauv thiab siv nws los qhib cov pins tso tawm. Qhov no txhais tau tias koj yuav tsis pom cov ntaub ntawv raws li nws tau hloov pauv; tsis muaj kev hloov pauv ntawm cov pins tso tawm yuav tshwm sim kom txog thaum Latch tau teeb tsa siab
Kauj Ruam 6: Teeb Pab Kom Tso Tawm Kom Zoo
- Yuav tsis muaj tus pin tso tawm kom txog thaum Enable Output tau teeb tsa siab, tsis muaj teeb meem dab tsi tshwm sim nrog rau lwm qhov peb tswj tus pin.
- Tus pin no tuaj yeem tso siab yog tias koj xav tau
Muaj ob tus pin koj tuaj yeem siv rau cascading, Os thiab Os1. Os yog rau cov moos nce ceev thiab Os1 yog rau cov qeeb qeeb. Nqa tus pin no rau cov ntaub ntawv tus lej ntawm kev hloov pauv tom ntej thiab cov dej ntws los ntawm cov nti no yuav nkag mus rau tom ntej.
Hais txog cov zaub
Hauv qhov piv txwv program kuv tau tsim ib qho array ntawm 8 bytes hu ua row_buffer . Txhua byte sib raug rau ib kab ntawm 8x8 zaub, kab 0 yog hauv qab thiab kab 7 yog sab saum toj. Qhov tsawg kawg tseem ceeb ntawm txhua kab yog ntawm sab xis, qhov tseem ceeb tshaj plaws nyob rau sab laug. Hloov cov zaub yog ib qho yooj yim raws li sau tus nqi tshiab rau cov ntaub ntawv ntawd, kev cuam tshuam cov kev pabcuam niaj hnub saib xyuas kev ua kom zoo dua qub.
Programming
Txoj haujlwm yuav tsis tham txog ntxaws ntawm no. Kuv yuav ceeb toom koj kom tsis txhob siv DAPA programming cable raws li kuv ntseeg tias koj yuav tsis tuaj yeem ua haujlwm rau chip thaum nws ua haujlwm ntawm 12MHz. Txhua lwm tus txheej txheem tsim qauv yuav tsum ua haujlwm (STK500, MKII, Dragon, Parallel/Serial programmer, thiab lwm yam.). Fuses: Nco ntsoov npaj cov fuses kom siv 12MHz crystalhfuse: 0xC9lfuse: 0xEF
Hauv Kev Ua
Thaum koj teeb tsa lub nti cov zaub yuav tsum scroll "Hello World!" Nov yog daim vis dis aus ntawm LED matrix hauv kev nqis tes ua. Cov vis dis aus tsis zoo li kuv tau ua qhov no nrog kuv lub koob yees duab digital cov vis dis aus thiab tsis yog cov vis dis aus lossis webcam raug.
Kauj Ruam 5: Cov Qauv Ntsuas
Txoj haujlwm no tuaj yeem hloov pauv tau. Tsuas yog qhov txwv qhov tseeb yuav ntau npaum li cas tam sim no koj lub hwj huam tuaj yeem muab tau. (Lwm qhov kev muaj tiag yog pes tsawg LEDs thiab sau npe hloov chaw koj muaj).
Lej
Kuv tab tom tsav lub LEDs ntawm kwv yees li 15mA (5V-1.8vDrop/220ohms = 14.5mA). Qhov no txhais tau tias kuv tuaj yeem tsav mus txog 33 kab nrog mic2981 tus tsav tsheb (500mA/15mA = 33.3). Sib faib los ntawm 8 peb tuaj yeem pom tias qhov no tso cai rau peb ua hlua ua ke 4 hloov npe. Kuj xav txog tias koj tsis tas yuav muaj tag nrho 32 kab ntawv ncab ntawm sab laug mus rau sab xis. Koj tuaj yeem tsim qhov 16x16 array uas yog xaim tib txoj hauv kev koj xav tau 8x32 array. Qhov no yuav hais los ntawm kev hloov pauv hauv 4 bytes…. thawj ob yuav hloov tag nrho txoj kev mus rau lub leds rau kab thib 9, ob ob bytes yuav hloov mus rau thawj kab. Ob kab yuav tau los ntawm ib tus pin ntawm kab tsav tsheb.
Cascading Shift Sau Npe
Cov ntaub ntawv teev npe ua haujlwm siv yog cascading shift register. Qhov no txhais tau tias thaum koj hloov pauv hauv cov ntaub ntawv, dhau los tshwm ntawm Os tus pin. Ua kom muaj txiaj ntsig zoo li txheej txheej ntawm cov npe hloov pauv tuaj yeem txuas rau ib leeg, Os tus pin rau Cov Ntaub Ntawv tus pin, ntxiv 8 kab nrog txhua tus tshiab chip. Txhua tus ua haujlwm sau npe yuav txuas rau tib Latch, Clock, thiab Pab kom cov zis pins ntawm lub microcontroller. Qhov "cascading" cov txiaj ntsig tau tsim thaum Os ntawm thawj qhov kev hloov pauv npe tau txuas nrog Cov Ntaub Ntawv tus pin ntawm qhov thib ob. Qhov kev zov me nyuam yuav tsum tau hloov kho kom pom qhov nce ntawm kab. Ob qhov tsis uas khaws cov ntaub ntawv thiab kev ua haujlwm uas hloov cov ntaub ntawv hauv txhua kab ntawv yuav tsum tau hloov kho kom pom qhov tseeb ntawm cov kab.
Ntau Kab Tsav Tsheb
Tus neeg tsav tsheb ua kab (mic2981) tuaj yeem muaj peev xwm txaus tam sim no los tsav 32 kab. Yuav ua li cas yog tias koj xav tau ntau dua 32 kab? Nws yuav tsum muaj peev xwm siv ntau kab tsav tsheb yam tsis siv ntau lub microcontroller pins. Peb xav tau cov kab tsav tsheb kom muaj peev xwm txaus tam sim no kom pom lub LEDs. Yog tias koj siv ntau kab ntau dua li nws tuaj yeem ua lub teeb nyob rau ib zaug, ntxiv cov kab tsav tsheb tuaj yeem muab qhov xav tau tam sim no. Tib lub tswv yim pins los ntawm microcontroller tau siv yog li tsis tas yuav hloov kho qhov ntsuas ntawm kab. Hauv lwm lo lus, txhua tus neeg tsav tsheb tswj kab rau 8x32 block. Txawm hais tias 64 kab yuav muaj tib txoj kab PHYSICAL tso rau hauv, peb faib kab tsheb npav ua ob kab, siv tus tsav tsheb rau 8 kab ntawm thawj 32 kab, thiab tus tsav thib ob rau 8 kab ntawm ob kab thib ob thiab lwm yam. Cov txheej txheem ntawm qhov no tau muab hauv qab no ua piv txwv. Tsis txhob siv ntau kab tsav tsheb nrog tib tus lej. Ua li ntawd yuav txhais tau tias txhua qhov hloov pauv tus lej pin yuav tsav ntau dua ib qho LED ib zaug. 2. Koj yuav tsum muaj teeb tsa ntawm 8 tus tiv thaiv (3k3) rau txhua tus tsav tsheb, ib txheej rau ntau tus tsav tsheb sib tw yuav tsis ua haujlwm vim nws yuav tsis muab qhov tsim nyog tam sim no hloov lub rooj vag.
Piv Txwv
Kuv txiav txim siab nthuav dav ntawm cov lej uas kuv tau tsim ua ntej. Kuv tau ntxiv 7 kab ntxiv rau tag nrho ntawm 15 vim tias yog txhua yam kuv tuaj yeem haum rau ntawm daim ntawv no. Kuv tseem nyuam qhuav pom txog kev sib tw uas Cov Ntawv Qhia tau ua hu ua "Cia Nws Glow". Nov yog daim vis dis aus ntawm kuv coj qhov ntawd. Ib zaug ntxiv, lub koob yees duab digital kuv siv los yees duab tsis ua rau kev ncaj ncees. Qhov no zoo nkaus li zoo rau tib neeg lub qhov muag, tshwj xeeb tshaj yog qhov twg tag nrho cov LEDs nyem, tab sis tsis saib ze li zoo li hauv daim vis dis aus. Txaus siab rau: Qhov chaws rau cov zaub loj no suav nrog hauv qab no.
Kauj Ruam 6: Xaus
Tau Ntxiv
I2CI tau tawm ntawm Ob Txoj Kev Siv Hluav Taws Xob (I2C) pins tsis siv hauv qhov tsim no. Muaj ntau qhov kev cia siab uas tuaj yeem siv ob tus pin no. Ntxiv ntawm I2C EEPROM yuav tso cai rau khaws cov lus loj dua. Kuj tseem muaj qhov kev cia siab ntawm kev tsim cov phiaj xwm los tig lub mega8 rau hauv I2C cov khoom siv tau tshaj. Qhov no yuav qhib qhov muaj peev xwm muaj USB ua kom lub cuab yeej los tso saib cov ntaub ntawv ntawm koj cov kab LED los ntawm kev hla nws hla I2C npav. Ntau muaj ntau tus pin sab laug uas tuaj yeem siv rau khawm lossis tus txais IR. Qhov no yuav tso cai rau cov lus los ua haujlwm hauv kab ntawv qhia zaub mov. Ib tus tsuas yog sau cov cim rau ntawm lub vijtsam, lwm tus ua cov ntawv scrolls mus rau cov zaub. Qhov tseem ceeb yuav tsum nco ntsoov yog qhov koj pom hauv lub teeb yog sawv cev hauv cov ntaub ntawv. Yog tias koj los nrog txoj hauv kev hloov pauv cov ntaub ntawv, cov teeb yuav hloov pauv ib yam nkaus. Qhov no tuaj yeem siv ua lub ntsuas ntsuas nrog lub tso suab. Scrolling tuaj yeem ua tiav los ntawm sab saud lossis hauv qab, txawm tias sab laug mus rau sab xis. Hmoov zoo, muaj kev lom zem!
Kauj Ruam 7: Ua Raws Li
Tom qab tso tus tswj hwm lub rooj zaum zaum hauv lub khob cij rau lub hlis kuv thaum kawg tsim thiab kos ob peb lub rooj sib tham kom muab cov qauv no ua ke. Txhua yam ua haujlwm tau zoo, Kuv tsis xav tias muaj ib yam kuv yuav tau ua txawv.
Cov Txheej Txheem Circuit Board
- Cov ntawv teev npe hloov pauv yog nyob ntawm cov laug cam sib txawv uas tuaj yeem ua daisy txuas ua ke kom nce qhov loj me ntawm cov zaub.
- Pawg tswj hwm nws muaj tus tswj hwm lub zog yog li qhov no tuaj yeem ua haujlwm los ntawm txhua lub zog uas muab 7v-30v (9v roj teeb lossis 12v lub rooj zaum muab ob qho tib si ua haujlwm zoo rau kuv).
- 6 tus pin ISP header suav nrog yog li lub microcontroller tuaj yeem rov tsim dua yam tsis tau tshem nws tawm ntawm pawg thawj coj.
- 4-tus pin header muaj rau yav tom ntej siv I2C npav. Qhov no tuaj yeem siv rau eeprom khaws ntau cov lus lossis txawm tias ua qhov no yog cov cuab yeej qhev tswj los ntawm lwm lub microcontroller (RSS ticker leej twg?)
- 3 lub sijhawm thawb khawm tau suav nrog hauv tus tsim. Kuv tuaj yeem hloov kho lub khoos phis tawj yav tom ntej kom suav nrog kev siv cov nyees khawm no.
Los ua ke
Muab plexiglass rau kuv, lub kaum sab xis, 6x32 tshuab ntsia hlau, txiv ntseej, thiab tshuab ntxhua khaub ncaws, ntxiv rau lub kais teeb rau xov qhov thiab kuv tuaj yeem tsim dab tsi.
Qhov khoom plig thib ob hauv Cia Nws Glow!
Pom zoo:
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Ua Si Cov Khoom Ua Si Ua Tau Zoo!: 7 Cov Kauj Ruam (nrog Duab)
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Siv Hluav Taws Xob Ua Tau Zoo!: Qho khoom ua si hloov pauv qhib txoj hauv kev tshiab thiab kev daws teeb meem kom tso cai rau menyuam yaus uas muaj lub cev muaj peev xwm txwv lossis kev xiam oos qhab kev loj hlob los cuam tshuam nrog cov khoom ua si ntawm nws tus kheej. Hauv ntau qhov xwm txheej, cov menyuam yaus uas xav tau cov khoom ua si hloov pauv tsis tuaj yeem nkag mus
Tuchless Hloov rau Cov Khoom Siv Hauv Tsev -- Tswj Koj Cov Khoom Siv Hauv Tsev Tsis Muaj Tuch Ib qho Hloov: 4 Cov Kauj Ruam
Tuchless Hloov rau Cov Khoom Siv Hauv Tsev || Tswj Koj Cov Khoom Siv Hauv Tsev Tsis Muaj Tuch Ib qho Hloov: Nov Yog Qhov Tuchless Hloov Rau Cov Khoom Siv Hauv Tsev. Koj Siv Tau Qhov No Mus Rau Txhua Qhov Chaw Hauv Pej Xeem Kom Pab Tau Tawm Tsam Ib Yam Kab Mob. Lub Circuit Court Raws Li Tsaus Sensor Circuit Ua Los Ntawm Op-Amp Thiab LDR. Qhov Tseem Ceeb Thib Ob Ntawm Qhov Circuit Court SR Flip-Flop Nrog Sequencell
48 X 8 Scrolling LED Matrix Zaub Siv Arduino thiab Hloov Sau Npe: 6 Kauj Ruam (nrog Duab)
48 X 8 Scrolling LED Matrix Display Siv Arduino thiab Shift Cov Ntawv Sau Npe: Nyob zoo txhua tus! Qhov no yog kuv thawj Kev Qhia thiab nws yog txhua yam hais txog kev ua 48 x 8 Programmable Scrolling LED Matrix siv Arduino Uno thiab 74HC595 hloov npe. Nov yog kuv thawj qhov haujlwm nrog Arduino pawg thawj coj txhim kho. Nws yog qhov kev sib tw muab rau m
Tswj Cov Khoom Siv Los Ntawm Arduino Nrog Cov Neeg Siv Khoom Hloov: 8 Cov Kauj Ruam (nrog Duab)
Kev Tswj Cov Khoom Siv Los Ntawm Arduino Nrog Kev Siv Hluav Taws Xob: Lub Arduino tuaj yeem siv los tswj cov cuab yeej los ntawm kev siv cov khoom siv yooj yim hloov pauv hloov chaw
Hloov ATX Cov Khoom Siv Hluav Taws Xob rau hauv Cov Khoom Siv Hluav Taws Xob DC!: 9 Cov Kauj Ruam (nrog Duab)
Hloov ATX Lub Hwj Huam Muab Rau Hauv Ib Lub Sij Hawm DC Lub Hwj Huam!: DC Lub zog hluav taws xob tuaj yeem nyuaj nrhiav thiab kim. Nrog cov yam ntxwv uas ntau dua lossis tsawg dua ntaus lossis ploj rau yam koj xav tau. Hauv Cov Lus Qhia no, Kuv yuav qhia koj yuav hloov pauv lub computer fais fab li cas mus rau DC lub zog hluav taws xob nrog 12, 5 thiab 3.3 v