Cov txheej txheem:

Charlieplexing LEDs- Theory: 7 Kauj Ruam (nrog Duab)
Charlieplexing LEDs- Theory: 7 Kauj Ruam (nrog Duab)

Video: Charlieplexing LEDs- Theory: 7 Kauj Ruam (nrog Duab)

Video: Charlieplexing LEDs- Theory: 7 Kauj Ruam (nrog Duab)
Video: Muaj tsis ntshai tuag 7/1/2018 2024, Hlis ntuj nqeg
Anonim
Charlieplexing LEDs- Theory
Charlieplexing LEDs- Theory
Charlieplexing LEDs- Theory
Charlieplexing LEDs- Theory

Cov lus qhia no tsawg dua qhov tsim koj tus kheej txoj haujlwm thiab ntau qhov kev piav qhia ntawm txoj kev xav ntawm charlieplexing. Nws haum rau cov tib neeg uas muaj cov hauv paus ntawm cov khoom siv hluav taws xob, tab sis tsis tiav cov pib. Kuv tau sau nws los teb rau ntau cov lus nug Kuv tau txais hauv kuv li kev tshaj tawm yav dhau los Cov Lus Qhia.

'Charlieplexing' yog dab tsi? Nws tau tsav ntau lub LEDs nrog tsuas yog ob peb tus pin. Yog tias koj xav tsis thoob Charlieplexing muaj npe tom qab Charles Allen ntawm Maxim uas tsim cov txheej txheem. Qhov no tuaj yeem muaj txiaj ntsig zoo rau ntau yam. Koj yuav xav tau los qhia cov xwm txheej xwm txheej ntawm lub microcontroller me me, tab sis tsuas yog muaj ob peb tus pin xwb. Tej zaum koj yuav xav qhia qhov zoo nkauj dot matrix lossis moos tso saib tab sis tsis xav siv ntau yam khoom siv. Qee qhov lwm txoj haujlwm qhia pom kev ntxim nyiam koj yuav xav saib yog: Yuav ua li cas tsav ntau lub LED los ntawm ob peb lub microcontroller pins. los ntawm Westfw:- https://www.instructables.com/id/ED0NCY0UVWEP287ISO/ Thiab ob peb ntawm kuv tus kheej cov phiaj xwm, Lub Microdot saib:- https://www.instructables.com/id/EWM2OIT78OERWHR38Z/ Minidot 2 moos: - https://www.instructables.com/id/E11GKKELKAEZ7BFZAK/ Lwm qhov piv txwv zoo ntawm kev siv charlieplexing yog ntawm: fading/dimming uas yuav tsis tham txog ntawm no. Hloov kho 19 Lub Yim Hli 2008: Kuv tau ntxiv cov ntaub ntawv zauv teb nrog lub Circuit Court uas tuaj yeem siv tau cov lej matlion charliplexing rau lub zog loj LEDs tham (ntawm qhov ntev:)) hauv kab lus. Nws muaj lub laub khawm + txoj haujlwm encoder los ua tus neeg siv cuam tshuam, ntxiv rau kev siv hluav taws xob rau USB lossis RS232 khoos phis tawj tswj. Txhua qhov ntawm txoj kab hluav taws xob siab tuaj yeem teeb rau ib ntawm ob qhov hluav taws xob, hais tias 2.2V rau RED LEDs thiab 3.4V rau ntsuab/xiav/dawb. Qhov hluav taws xob rau txoj kab sab siab tuaj yeem teeb tsa los ntawm trimpot. Kuv xav pom tias 20wire IDC ribbon cable tau txuas rau hauv lub rooj tsavxwm, thiab 20pin IDC txuas txuas ntxiv nrog qhov ntev ntawm txoj hlua, txhua lub rooj tsav xwm LED muaj kev txuas rau cov xov hlau twg hauv cov lej uas xav tau. Lub voj voog nyob hauv Eagle Cad thiab muab tso rau hauv cov duab hauv qab no. Lub vojvoog sab siab tau ua tiav los ntawm kev siv optocouplers uas kuv xav tias yuav haum. Kuv tsis tau sim qhov Circuit no lossis sau ib qho software vim tsis muaj sijhawm, tab sis tau muab nws los tawm tswv yim, Kuv tshwj xeeb yog txaus siab rau qhov kev siv optocoupler. Ib tus neeg siab tawv txaus los muab nws mus … thov tshaj tawm koj cov txiaj ntsig. Hloov tshiab 27th Lub Yim Hli 2008: Rau cov uas tsis siv EagleCad….added hauv qab no yog pdf ntawm cov phiaj xwm

Kauj Ruam 1: Qee Qhov Kev Ntseeg LED

Ib co LED Theory
Ib co LED Theory
Ib co LED Theory
Ib co LED Theory

Charlieplexing tso siab rau ntau qhov muaj txiaj ntsig ntawm LEDs thiab cov tswj hwm niaj hnub no.

Ua ntej tshaj dab tsi tshwm sim thaum koj txuas lub LED rau hluav taws xob. Daim duab tseem ceeb hauv qab no qhia txog dab tsi hu ua Yog Yog V Vf nkhaus ntawm qhov ib txwm muaj 5 hli qis zog LED. Yog hais tias 'rau tam sim no tam sim no' Vf sawv rau 'rau pem hauv ntej qhov hluav taws xob' Cov kab ntsug hauv lwm lo lus qhia txog qhov tam sim no uas yuav ntws los ntawm LED yog tias koj tso kab rov tav axis qhov hluav taws xob hla nws lub dav hlau. Nws ua haujlwm lwm txoj hauv kev ib yam nkaus, yog tias koj ntsuas tias qhov tam sim no muaj nqis, koj tuaj yeem saib hla mus rau kab rov tav thiab pom qhov hluav taws xob LED yuav nthuav tawm thoob plaws nws lub dav hlau. Daim duab thib ob qhia pom qhov ua piv txwv ntawm LED nrog Yog thiab Vf sau npe. Los ntawm daim duab tseem ceeb kuv tseem tau sau cov cheeb tsam ntawm kab lus uas tau txaus siab. - Thawj qhov chaw yog qhov LED 'tawm'. Qhov tseeb dua qhov LED tso lub teeb kom tsaus ntuj koj yuav tsis tuaj yeem pom nws tshwj tsis yog tias koj muaj qee yam super-duper duab nrawm dua. - Thaj chaw thib ob muaj LED tsuas yog tso tawm me ntsis lub teeb ci. - Cheeb tsam thib peb yog qhov uas LED feem ntau ua haujlwm thiab tso tawm lub teeb ntawm cov tuam txhab ntsuas. - Thaj tsam thaj tsam yog qhov uas LED ua haujlwm dhau nws qhov kev txwv kev ua haujlwm, tej zaum yuav ci ntsa iab heev tab sis ua rau lub sijhawm luv luv ua ntej cov pa luam yeeb sab hauv khiav tawm thiab nws yuav tsis ua haujlwm ntxiv …… piv txwv li hauv cheeb tsam no nws kub hnyiab vim ntau dhau tam sim no ntws los ntawm nws. Nco tseg tias Yog/Vf nkhaus lossis nkhaus ua haujlwm ntawm LED yog qhov nkhaus 'tsis-tawm'. Ntawd yog, nws tsis yog txoj kab ncaj … nws muaj khoov lossis kink hauv nws. Thaum kawg daim duab no yog rau qhov raug 5 hli liab LED tsim los ua haujlwm ntawm 20mA. LEDs sib txawv los ntawm cov tuam txhab sib txawv muaj txoj kab nkhaus ua haujlwm sib txawv. Piv txwv hauv daim duab no ntawm 20mA qhov hluav taws xob rau pem hauv ntej ntawm LED yuav yog kwv yees li 1.9V. Rau qhov xiav 5mm LED ntawm 20mA qhov hluav taws xob rau pem hauv ntej yuav yog 3.4V. Rau lub zog siab dawb luxeon LED ntawm 350mA qhov hluav taws xob rau pem hauv ntej yuav nyob ib puag ncig 3.2V. Qee lub pob LEDs tej zaum yuav yog ob peb LEDs hauv kab lossis ua ke, hloov Vf/Yog tias nkhaus dua. Feem ntau cov chaw tsim khoom yuav hais qhia qhov ua haujlwm tam sim no uas muaj kev nyab xeeb los siv LED ntawm, thiab qhov hluav taws xob mus rau qhov tam sim no. Feem ntau (tab sis tsis tas li) koj tau txais daim duab zoo ib yam rau hauv qab no hauv cov ntawv teev npe. Koj yuav tsum tau saib ntawm daim ntawv qhia rau LED txhawm rau txiav txim siab tias qhov hluav taws xob rau pem hauv ntej yog nyob ntawm kev khiav haujlwm sib txawv. Vim li cas daim duab no thiaj tseem ceeb? Vim tias nws qhia tau tias thaum qhov hluav taws xob hla lub LED, qhov tam sim no uas yuav ntws yuav raws li daim duab. Txo qhov hluav taws xob thiab tsawg dua tam sim no yuav ntws….. thiab LED yuav yog 'tawm'. Nov yog ib feem ntawm txoj kev xav ntawm charlieplexing, uas peb yuav mus txog hauv cov kauj ruam tom ntej.

Kauj Ruam 2: Txoj Cai (ntawm Electronics)

Txoj Cai (ntawm Electronics)
Txoj Cai (ntawm Electronics)
Txoj Cai (ntawm Electronics)
Txoj Cai (ntawm Electronics)
Txoj Cai (ntawm Electronics)
Txoj Cai (ntawm Electronics)

Tseem tseem tsis tau muaj qhov txuj ci tseem ceeb ntawm charlieplexing tseem tsis tau …. peb yuav tsum mus rau qee qhov pib ntawm kev cai lij choj hluav taws xob. Lub thawj txoj cai ntawm kev txaus siab hais tias tag nrho cov hluav taws xob hla txhua kab ntawm cov khoom sib txuas hauv cov hluav taws xob hluav taws xob yog sib npaug ntawm cov tib neeg voltages hla cov khoom. Qhov no tau qhia hauv daim duab tseem ceeb hauv qab no qhov no muaj txiaj ntsig thaum siv LEDs vim tias koj lub roj teeb nruab nrab lossis tus tswj hwm tus lej tso tawm tus pin yuav tsis yog qhov ncaj qha qhov hluav taws xob kom khiav koj LED ntawm qhov pom zoo tam sim no. Piv txwv li microcontroller feem ntau yuav khiav ntawm 5V thiab nws cov pins tso tawm yuav nyob ntawm 5V thaum nyob. Yog tias koj tsuas yog txuas lub LED mus rau tus pin tso tawm ntawm micro, koj yuav pom los ntawm txoj haujlwm nkhaus hauv nplooj ntawv dhau los ntau dhau tam sim no yuav ntws hauv LED thiab nws yuav kub thiab hlawv tawm (tej zaum yuav ua rau lub micro zoo ib yam) Txawm li cas los xij yog tias peb nthuav qhia ntu thib ob hauv kab nrog LED peb tuaj yeem rho qee qhov ntawm 5V kom qhov hluav taws xob sab laug tsuas yog txoj cai los khiav LED ntawm qhov ua haujlwm raug tam sim no. Qhov no feem ntau yog tus tiv thaiv, thiab thaum siv txoj hauv kev no hu ua tam sim no txwv kev tiv thaiv. Txoj kev no tau siv ntau zaus thiab coj mus rau qhov hu ua 'ohms txoj cai' …. Yog li npe tom qab Mr Ohm. Ohms txoj cai ua raws kab zauv V = I * R qhov twg V yog qhov hluav taws xob uas yuav tshwm sim hla kev tiv thaiv R thaum tam sim no kuv yog ntws los ntawm tus tiv thaiv. V yog nyob rau hauv volts, Kuv nyob hauv amps thiab R yog hauv ohms. So yog tias peb muaj 5V siv, thiab peb xav tau 1.9V hla lub LED kom nws khiav ntawm 20mA ces peb xav kom tus tiv thaiv muaj 5-1.9 = 3.1 V hla nws. Peb tuaj yeem pom qhov no hauv daim duab thib ob. Vim li cas tus tiv thaiv tau nyob ua ke nrog LED, tib yam tam sim no yuav ntws los ntawm tus tiv thaiv raws li LED, piv txwv li 20mA. Yog li rov kho qhov sib npaug peb tuaj yeem pom qhov kev tawm tsam peb xav tau los ua txoj haujlwm no. V = I * RsoR = V / Isubstituting tus nqi hauv peb qhov piv txwv peb tau: R = 3.1 / 0.02 = 155ohms (nco 20mA = 0.02Amps) Tseem nrog kuv tam sim no … txias. Tam sim no saib ntawm daim duab 3. Nws muaj lub teeb ci LED ntawm ob lub resistors. Raws li thawj txoj cai tau hais los saum no, peb muaj qhov xwm txheej zoo ib yam ntawm daim duab thib ob. Peb muaj 1.9V hla LED yog li nws tau ua haujlwm raws li nws daim ntawv tshwj xeeb. Peb kuj muaj txhua tus tiv thaiv rho tawm 1.55V txhua (rau tag nrho ntawm 3.1). Ntxiv qhov hluav taws xob ua ke peb muaj 5V (tus pin microcontroller) = 1.55V (R1) + 1.9V (LED) + 1.55V (R2) thiab txhua yam sib npaug tawm. Ua raws txoj cai ohms peb pom cov resistors yuav tsum yog 77.5 ohms txhua, uas yog ib nrab ntawm qhov suav los ntawm daim duab thib ob. Koj hauv kev xyaum koj yuav nyuaj nias kom pom 77.5ohm resistor, yog li koj tsuas yog hloov tus nqi nyob ze, hais 75ohms thiab xaus nrog me ntsis ntxiv tam sim no hauv LED lossis 82ohms kom muaj kev nyab xeeb thiab muaj tsawg dua. Vim li cas hauv ntiaj teb no peb yuav tsum ua qhov resistor xuab zeb uas tsav lub teeb ci yooj yim….. yog tias koj muaj ib lub LED nws yog txhua yam ua dag me ntsis, tab sis qhov no yog cov lus qhia ntawm charlieplexing thiab nws los tau yooj yim rau cov kauj ruam tom ntej.

Kauj Ruam 3: Taw qhia 'Tsav Ntxiv'

Plaug 'ntxiv tsav'
Plaug 'ntxiv tsav'

Lwm lub npe uas yog qhov tseeb los piav qhia 'charlieplexing' yog 'tsav ntxiv'.

Hauv koj qhov microcontroller nruab nrab koj tuaj yeem hauv firmware qhia rau micro teeb tsa tus pin tso tawm kom yog '0' lossis '1', lossis nthuav tawm 0V qhov hluav taws xob ntawm qhov tso tawm lossis 5V qhov hluav taws xob ntawm qhov tso tawm. Daim duab hauv qab no tam sim no qhia pom qhov sib txawv ntawm LED nrog tus khub thim rov qab …. Hauv thawj ib nrab ntawm daim duab, lub micro tso tawm 5V rau tus pin A, thiab 0V rau tus pin B. Tam sim no yuav ntws los ntawm A mus rau B. ci. Nws yog qhov uas hu ua thim rov qab. Peb muaj qhov sib npaug ntawm qhov xwm txheej hauv nplooj ntawv dhau los. Peb tuaj yeem pib tsis quav ntsej LED2. Cov xub qhia qhov ntws tam sim no. Ib qho LED yog qhov tseem ceeb ntawm lub diode (li no Lub Teeb Emitting Diode). Lub diode yog lub cuab yeej uas tso cai rau tam sim no ntws hauv ib qho kev taw qhia, tab sis tsis nyob rau lwm qhov. Cov txheej txheem ntawm cov teeb pom kev ntawm LED qhia qhov no, tam sim no yuav ntws mus rau hauv kev taw qhia ntawm xub xub …… tab sis raug thaiv lwm txoj kev. Yog tias peb qhia cov micro tam sim no tso tawm 5V rau tus pin B thiab 0V ntawm tus pin A peb muaj qhov rov qab. Tam sim no LED1 tau thim rov qab tsis ncaj ncees, LED2 tau mus rau qhov tsis ncaj ncees thiab yuav tso cai rau tam sim no. LED2 yuav ci thiab LED1 yuav tsaus ntuj. Tam sim no yuav yog lub tswv yim zoo los saib cov duab ntawm ntau txoj haujlwm uas tau hais hauv qhov kev taw qhia. Koj yuav tsum pom tag nrho ntau ntawm cov khub ua tiav hauv cov lej. Tau kawg hauv qhov piv txwv hauv qab no peb tab tom tsav ob lub LED nrog ob lub microcontroller pins….you tuaj yeem hais tias yog vim li cas thab plaub. Zoo ntu ntu tom ntej yog qhov uas peb nkag mus rau lub siab ntawm charlieplexing thiab yuav ua li cas nws ua kom muaj txiaj ntsig siv lub microcontrollers tso cov koob.

Kauj Ruam 4: Thaum kawg….a Charlieplex Matrix

Thaum kawg….a Charlieplex Matrix
Thaum kawg….a Charlieplex Matrix
Thaum kawg….a Charlieplex Matrix
Thaum kawg….a Charlieplex Matrix

Raws li tau hais hauv kev qhia, charliplexing yog txoj hauv kev yooj yim ntawm kev tsav ntau lub LEDs nrog tsuas yog ob peb tus pin ntawm lub microcontroller. Txawm li cas los xij hauv cov nplooj ntawv dhau los peb tsis tau khaws ib qho pins tiag tiag, tsav ob lub LEDs nrog ob tus pin….big whoop!

Zoo peb tuaj yeem txuas ntxiv lub tswv yim ntawm kev sib tw tsav mus rau hauv charlieplex matrix. Daim duab hauv qab no qhia txog qhov tsawg kawg nkaus charlieplex matrix suav nrog peb lub resistors thiab rau LEDs thiab siv tsuas yog peb tus pin microcontroller. Tam sim no koj puas pom tias txoj hauv kev no yooj yim npaum li cas? Yog tias koj xav tsav rau rau ntawm LEDs ib txwm ua….you xav tau rau rau tus pin microcontroller. Qhov tseeb nrog N pins ntawm microcontroller koj tuaj yeem muaj peev xwm tsav N * (N - 1) LEDs. Rau 3 tus pin no yog 3 * (3-1) = 3 * 2 = 6 LEDs. Cov khoom teeb nrawm nrog ntau tus pin. Nrog 6 tus pin koj tuaj yeem tsav 6 * (6 - 1) = 6 * 5 = 30 LEDs….wow! Tam sim no mus rau charlieplexing me ntsis. Saib daim duab hauv qab no. Peb muaj peb khub ua ke, ib khub ntawm txhua qhov ua ke ntawm cov pins tso tawm micro. Ib khub ntawm A-B, ib khub ntawm B-C thiab ib khub ntawm A-C. Yog tias koj txuas tus pin C rau tam sim no peb yuav muaj qhov xwm txheej zoo ib yam li ua ntej. Nrog 5V ntawm tus pin A thiab 0V ntawm tus pin B, LED1 yuav ci, LED2 yog thim rov qab thiab yuav tsis coj tam sim no. Nrog 5V ntawm tus pin B thiab 0V ntawm tus pin A LED2 yuav ci thiab LED1 tau thim rov qab. Qhov no ua raws rau lwm cov koob micro. Yog tias peb txuas tus pin B thiab teeb tus pin A rau 5V thiab tus pin C rau 0V ces LED5 yuav ci. Rov qab yog li tus pin A yog 0V thiab tus pin C yog 5V ces LED6 yuav ci. Tib yam rau qhov ua tiav khub ntawm tus pin B-C. Tos, kuv hnov koj hais. Cia saib ntawm rooj plaub thib ob kom ze dua. Peb muaj 5V ntawm tus pin A thiab 0V ntawm tus pin C. Peb tau txuas tus pin B (nruab nrab). OK, yog li tam sim no ntws los ntawm LED5, tam sim no tsis ntws los ntawm LED6 vim tias nws tau thim rov qab los (thiab yog li ntawd yog LED2 thiab LED4) … tsis muaj? Vim li cas cov LEDs no tsis ci ib yam nkaus. Nov yog lub plawv ntawm cov phiaj xwm charlieplexing. Tseeb muaj qhov tam sim no ntws ob qho tib si LED1 thiab LED3, txawm li cas los qhov hluav taws xob hla ob qho ntawm cov kev sib xyaw no tsuas yog sib npaug rau qhov hluav taws xob hla LED5. Feem ntau lawv yuav muaj ib nrab qhov hluav taws xob hla lawv uas LED5 muaj. Yog li yog tias peb muaj 1.9V hla LED5, tsuas yog 0.95V yuav hla LED1 thiab 0.95V hla LED3. Los ntawm Yog/Vf nkhaus tau hais thaum pib ntawm kab lus no peb tuaj yeem pom tias tam sim no ntawm qhov ib nrab qhov hluav taws xob tau qis dua ntau dua 20mA….. thiab cov LEDs yuav tsis ci pom kev. Qhov no yog hu ua kev nyiag tam sim no. Yog li feem ntau ntawm cov tam sim no yuav ntws txawm hais tias LED peb xav tau, txoj kev ncaj tshaj plaws los ntawm tsawg kawg ntawm LEDs (piv txwv li ib qho LED), ntau dua li ib qho ua ke ntawm LEDs. Yog tias koj saib cov dej ntws tam sim no rau ib qho kev sib xyaw ntawm kev tso 5V thiab 0V ntawm ib qho ntawm ob txoj kab tsav ntawm charlieplex matrix, koj yuav pom tib yam. Tsuas yog ib qho LED yuav ci ib zaug. Raws li kev tawm dag zog, saib thawj qhov xwm txheej. 5V ntawm tus pin A thiab 0V ntawm tus pin B, tshem tus pin C. LED1 yog txoj kev luv tshaj plaws rau tam sim no coj mus, thiab LED 1 yuav ci. Ib qho me me tam sim no tseem yuav dhau los ntawm LED5, tom qab ntawd rov qab LED4 rau tus pin B….. tab sis ntxiv, ob lub LEDs hauv koob yuav tsis tuaj yeem siphon txaus tam sim no piv rau LED 1 kom ci ci. Yog li lub zog ntawm charlieplexing tau paub. Saib daim duab thib ob uas yog lub tswv yim rau kuv Microdot saib…..30 LEDs, nrog rau 6 tus pin xwb. Kuv Minidot 2 moos yog qhov pib nthuav dav ntawm Microdot….sam 30 LEDs tau teeb tsa hauv ib pawg. Txhawm rau ua tus qauv hauv kab, txhua qhov LED kom pom kev yog luv luv hloov pauv, tom qab ntawd lub micro txav mus rau tom ntej. Yog tias nws tau teem sijhawm kom pom kev nws tau rov qhib dua rau lub sijhawm luv luv. Los ntawm kev tshuaj xyuas nrawm los ntawm LEDs sai txaus lub hauv paus ntsiab lus hu ua 'kev nyob ruaj khov ntawm lub zeem muag' yuav tso cai rau ib qho ntawm LEDs los qhia tus qauv zoo li qub. Kab lus Minidot 2 muaj kev piav qhia me ntsis txog lub hauv paus ntsiab lus no. Tab sis tos….. Kuv zoo li tau ci ntsa iab me ntsis hauv cov lus piav qhia saum toj no. Dab tsi yog qhov 'disconnect pin B', 'disconnect pin C' lag luam. Tshooj tom ntej thov.

Kauj Ruam 5: Tri-xeev (tsis yog Tricycles)

Tri-states (tsis yog Tricycles)
Tri-states (tsis yog Tricycles)
Tri-states (tsis yog Tricycles)
Tri-states (tsis yog Tricycles)

Hauv cov kauj ruam dhau los peb tau hais txog lub microcontroller tuaj yeem ua haujlwm kom tso tawm 5V qhov hluav taws xob lossis 0V qhov hluav taws xob. Txhawm rau ua kom charlieplex matrix ua haujlwm, peb xaiv ob tus pin hauv qhov matrix, thiab tshem tawm lwm tus pin.

Tau kawg kev txuas tus kheej txuas tus pin yog qhov nyuaj ua, tshwj xeeb tshaj yog tias peb tau tshuaj xyuas yam sai heev los siv qhov kev nyob ruaj khov ntawm qhov pom kev los qhia tus qauv. Txawm li cas los xij microcontroller cov zis pins kuj tseem tuaj yeem ua haujlwm los ua tus pin nkag ib yam. Thaum lub micro pin tau teeb tsa los ua tswv yim, nws nkag mus rau hauv qhov hu ua 'high-impedence' lossis 'tri-state'. Ntawd yog, nws nthuav tawm qhov kev tiv thaiv siab heev (ntawm qhov kev txiav txim ntawm megaohms, lossis ntau lab ntawm ohms) rau tus pin. Yog tias muaj kev tiv thaiv siab heev (saib daim duab) ces peb tuaj yeem suav hais tias tus pin yog raug txuas, thiab yog li cov phiaj xwm charliplex ua haujlwm. Daim duab thib ob qhia txog tus lej cim lej rau txhua qhov ua ke tuaj yeem ua kom pom kev zoo ntawm 6 LEDs hauv peb qhov piv txwv. Feem ntau ib lub xeev tri yog qhia los ntawm 'X', 5V yog qhia raws li '1' (rau qhov laj thawj 1) thiab 0V ua '0'. Hauv micro firmware rau '0' lossis '1' koj xav tau program pins los ua qhov tso tawm thiab nws lub xeev tau txhais zoo. Rau peb-xeev koj program nws los ua tswv yim, thiab vim nws yog cov tswv yim peb tsis paub tiag tias lub xeev yuav yog dab tsi…. Txawm hais tias peb yuav faib tus pin los ua peb lub xeev lossis cov tswv yim, peb tsis tas yuav nyeem nws. Peb tsuas yog siv qhov zoo ntawm qhov tseeb tus pin nkag rau ntawm lub microcontroller yog qhov siab tshaj.

Kauj Ruam 6: Qee Qhov Teeb Meem Tseem Ceeb

Kev ua khawv koob ntawm charlieplexing tso siab rau qhov tseeb tus kheej qhov hluav taws xob nthuav tawm hla ntau LEDs hauv koob yuav ib txwm muaj tsawg dua li hla ib qho LED thaum ib leeg LED sib npaug nrog cov ua ke. Yog tias qhov hluav taws xob tsawg dua, tam sim no tsawg dua, thiab cia siab tias qhov tam sim no hauv kev sib xyaw ua ke yuav qis heev uas LED yuav tsis pom qhov no. rau pem hauv ntej qhov hluav taws xob ntawm 1.9V hauv koj cov lej thiab xiav LED nrog lub zog txuas ntawm 3.5V (hais LED1 = liab, LED3 = liab, LED5 = xiav hauv peb 6 LED piv txwv). Yog tias koj teeb lub xiav LED, koj yuav xaus nrog 3.5/2 = 1.75V rau txhua tus LEDs liab. Qhov no yuav nyob ze rau qhov ua haujlwm dim ntawm LED. Koj yuav pom cov LEDs liab yuav ci ci thaum lub teeb xiav tau ci. Nws yog lub tswv yim zoo yog li ntawd kom ntseeg tau tias qhov ua ntej qhov hluav taws xob ntawm ib qho xim sib txawv LEDs hauv koj lub matrix yog kwv yees zoo ib yam ntawm kev ua haujlwm tam sim no, lossis lwm yam siv tib xim LEDs hauv cov lej hauv Kuv qhov Microdot/Minidot cov haujlwm kuv tsis tas yuav txhawj txog qhov no, Kuv tau siv qhov ua tau zoo xiav/ntsuab SMD LEDs uas hmoov zoo muaj ntau qhov zoo ib yam rau pem hauv ntej raws li liab/daj. Txawm li cas los xij yog tias kuv siv tib yam nrog 5mm LEDs qhov tshwm sim yuav muaj teeb meem ntau dua. Hauv qhov no kuv yuav tau siv qhov xiav/ntsuab charlieplex matrix thiab xim liab/daj sib cais. Kuv yuav tsum tau siv tus pin ntau dua….tab sis koj mus. Qhov teeb meem ntxiv yog saib koj daim duab tam sim no los ntawm micro thiab seb koj xav tau lub teeb ci li cas. Yog tias koj muaj cov lej loj, thiab nrawm nrawm rau nws, tom qab ntawd txhua lub LED qhib rau tsuas yog lub sijhawm luv luv. Qhov no nws yuav tshwm sim me ntsis piv rau cov zaub zoo li qub. Koj tuaj yeem dag los ntawm kev nce qhov tam sim no los ntawm LED los ntawm kev txo cov kev txwv tam sim no, tab sis tsuas yog mus rau ib qho. Yog tias koj kos ntau dhau los ntawm micro ntev ntev koj yuav ua rau cov pins tso tawm puas. Yog tias koj muaj cov lej sib hloov maj mam, hais qhia qhov xwm txheej lossis cov cua daj cua dub, koj tuaj yeem khaws qhov tam sim no mus rau qib nyab xeeb tab sis tseem muaj lub teeb ci LED vim tias txhua lub LED nyob rau lub sijhawm ntev dua, tej zaum zoo li qub (nyob rau hauv rooj plaub ntawm Qee qhov zoo ntawm charlieplexing:- siv tsuas yog ob peb tus pin ntawm lub microcontroller los tswj ntau LEDs- txo cov khoom suav raws li koj tsis xav tau ntau tus tsav tsheb chips/resistors thiab lwm yam Tsis zoo:- koj micro firmware yuav xav tau los teeb tsa ob lub xeev qhov hluav taws xob thiab lub xeev nkag/tawm ntawm tus pin- yuav tsum tau ceev faj nrog sib xyaw xim sib txawv- PCB teeb tsa nyuaj, vim tias LED matrix nyuaj dua.

Kauj Ruam 7: Cov neeg ua tim khawv

Muaj ntau cov ntaub ntawv hais txog charlieplexing ntawm lub vev xaib. https://www.maxim-ic.com/appnotes.cfm/appnote_number/1880A wiki nkag mus

Pom zoo: