Cov txheej txheem:

CharliePlexed RGB LED Tsuav: 3 Cov Kauj Ruam
CharliePlexed RGB LED Tsuav: 3 Cov Kauj Ruam

Video: CharliePlexed RGB LED Tsuav: 3 Cov Kauj Ruam

Video: CharliePlexed RGB LED Tsuav: 3 Cov Kauj Ruam
Video: Голубая стрела (1958) фильм 2024, Hlis ntuj nqeg
Anonim
CharliePlexed RGB LED Tsuav
CharliePlexed RGB LED Tsuav
CharliePlexed RGB LED Tsuav
CharliePlexed RGB LED Tsuav
CharliePlexed RGB LED Tsuav
CharliePlexed RGB LED Tsuav

Cov lus qhia no yuav qhia yuav ua li cas thiaj tsim cov dice uas muaj xim siv cov txheej txheem ntawm charlieplexing nrog RGB LEDs. tau raug tswj los ntawm 4 I/O pins ntawm ATTiny13V Microcontroller. Tab sis raws li kev xav ntawm CharliePlexing, peb tsuas tuaj yeem tswj 12 {n (n-1)} LEDs los ntawm 4 I/O Pins. Qhov tseeb kev teeb tsa ntawm LEDs hauv daim ntawv ntawm tsuav yog qhov uas lawv tuaj yeem faib ua plaub pawg. Three muaj ob lub LEDs ib leeg thiab ib qho muaj tib lub LED. Cov LEDs ntawm txhua pab pawg tau ON thiab OFF ib txhij thiab tuaj yeem txuas nrog tib I/O pins nrog tib qhov ua tau. x 3 = 12 yog li charlieplexing tuav) '5 I/O tus pin ntawm Tus Tswj Tus Kheej yog siv rau Hloov uas thaum nias tsim cov lej sib txawv los ntawm 1 txog 6 thiab thaum tso tawm tsim cov xim tsis sib xws (6 hauv txhua qhov)

Kauj Ruam 1: Kev piav qhia Circuit

Kev piav qhia Circuit
Kev piav qhia Circuit

Lub Circuit Court muaj me me 13, 7 RGB LEDs, ob peb resistors thiab microswitch sib nrug los ntawm kev sib txuas hluav taws xob. Qhov txheej txheem hauv PDF thiab SCH hom ntawv muaj nyob ntawm no Cov resistors siv hauv Circuit yog nyob rau hauv daim ntawv ntawm arrays raws li qhia hauv daim duab hauv qab no. CHARLIEPLEXINGCharlieplexing cov txheej txheem siv tag nrho peb lub xeev ua tau: 0, 1 lossis Z (High Impedance state) ntawm tus lej I/O tus pin ntawm lub microcontroller. Nws tswj hwm N*(N-1) LEDs siv N digital pins. Hauv cov txheej txheem no tsuas yog ib qho LED tuaj yeem tswj tau ntawm ib lub sijhawm thiab vim li no txhua lub LEDs los tswj yuav tsum tau rov ua dua tshiab ntawm qhov tsim nyog kom lawv tshwm sim nyob ruaj khov. uas nws tau txuas nrog) tshaj tawm raws li kev tso tawm thiab tag nrho lwm cov pins tau tshaj tawm ua tswv yim (High Impedance lossis 'Z' xeev)

Kauj Ruam 2: Ua Haujlwm Duab ntawm Tsuav

Cov Duab Ua Haujlwm ntawm Tsuav
Cov Duab Ua Haujlwm ntawm Tsuav
Cov Duab Ua Haujlwm ntawm Tsuav
Cov Duab Ua Haujlwm ntawm Tsuav
Cov Duab Ua Haujlwm ntawm Tsuav
Cov Duab Ua Haujlwm ntawm Tsuav

Nov yog ob peb daim duab ntxiv ntawm cov tsuav hauv kev nqis tes ua.

Saib cov xim sib txawv nws tuaj yeem tsim tau. !!!!!!!!!!!

Kauj ruam 3: Source Code

Nov yog qhov chaws ntawm txoj haujlwm sau ua lus C. Tus neeg siv ua ke yog WINAVR GCC

Makefile thiab. Hex cov ntaub ntawv kuj tau txuas nrog

Pom zoo: