Cov txheej txheem:

Teb Dialer PIC Interface: 7 Kauj Ruam
Teb Dialer PIC Interface: 7 Kauj Ruam

Video: Teb Dialer PIC Interface: 7 Kauj Ruam

Video: Teb Dialer PIC Interface: 7 Kauj Ruam
Video: How to change settings background | Background me photo kaise lagaye 2024, Kaum ib hlis
Anonim
Teb Dialer PIC Interface
Teb Dialer PIC Interface

Kuv tau pom kuv tus kheej nrog ntau ntawm cov xov tooj teb. Qhov tseeb, lawv nyob txhua qhov chaw kuv saib. Hauv kev cia siab tias qee zaum kuv yuav pom lawv tsawg dua, Kuv tau pib cais lawv thiab rov siv cov khoom rau lwm lub hom phiaj.

Rau qee qhov laj thawj kuv tau txais nws mus rau hauv kuv lub hlwb uas cuam tshuam kev tswj kev sib hloov nrog PIC nti yuav yog lub tswv yim zoo. Kuv tsuas tuaj yeem xav txog ob peb qhov kev siv tsis meej rau nws tam sim no thiab tsis muaj qhov tshwj xeeb muaj txiaj ntsig, tab sis kuv vam tias yuav ua qee yam txias nrog qhov no yav tom ntej.

Kauj ruam 1: Mus Tau Cov Khoom

Mus Tau Cov Khoom
Mus Tau Cov Khoom

Koj yuav xav tau: 1 - Lub xov tooj teb 3 - 220 ohm resistors2 - 0.1uF capacitors 2 - 20K resistor (tuaj yeem hloov dab tsi ntawm 10K thiab 47K) 2 - LEDs1 - PIC pawg thawj coj loj (Kuv tau siv Basic Micro development ib puag ncig) 1 - 20 MHZ resonator lossis siv lead ua 1 - Breadboard1 - 5V lub zog siv 1 - Ib txhais ko taw lossis txuas ntawm xaim txuas 1 - Ntsia Hlau 1 - Cov hlua hlau

Kauj Ruam 2: Txheeb Tus Xov Tooj

Dissect Xov Tooj
Dissect Xov Tooj
Dissect Xov Tooj
Dissect Xov Tooj
Dissect Xov Tooj
Dissect Xov Tooj

Qhib koj lub xov tooj tig. Ntawm sab hauv koj yuav pom ob peb ntu yooj yim; lub xov tooj tig, lub suab nrov, ob lub jack, qhov sib txuas sib txuas thiab cov xov tooj cua yooj yim uas feem ntau tau ntim rau hauv cov hlau sib txuas-lub thawv-zoo li yam.

Yuav muaj plaub lub xov hlau khiav los ntawm lub xov tooj tig mus rau qhov sib txuas zoo li lub thawv no. Cov xov hlau yuav tsum nyob hauv qhov chaw me ntsis ntau dua li cov ntsia hlau nruj. Qhib cov ntsia hlau thiab tshem cov xov hlau. Tom qab ntawd, tshem tawm lub xov tooj uas tig rov los ntawm lub xov tooj nws tus kheej.

Kauj Ruam 3: Txheeb Xyuas Cov Hluav Taws Xob Ua Dab Tsi

Txiav txim seb Cov Hluav Taws Xob Ua Dab Tsi
Txiav txim seb Cov Hluav Taws Xob Ua Dab Tsi
Txiav txim seb Cov Hluav Taws Xob Ua Dab Tsi
Txiav txim seb Cov Hluav Taws Xob Ua Dab Tsi

Hlau ob lub LEDs raws li qhia hauv daim duab hauv qab no.

Ob lub xov hlau dawb yuav tsum yog khub uas kaw qhov hloov pauv uas qhia rau koj paub thaum lub xov tooj tig. Cov xaim xiav thiab ntsuab yuav tsum yog khub uas tso cai rau koj paub tus lej uas tau hu. Xws li, thaum koj tig lub xov tooj, LED txuas nrog cov xov hlau dawb yuav tsum qhib, thiab thaum koj tso mus ntawm lub xov tooj, LED txuas nrog rau cov xaim xiav thiab ntsuab yuav tsum ntsais thiab tawm ntau zaus raws li tus lej koj hu (saib video). Piv txwv li, yog tias koj hu 8, LED txuas nrog rau ntsuab thiab xiav xaim yuav tua thiab nyob rau 8 zaug. Qhov no tshwm sim vim tias ib txoj hauv kev rau hu tus lej xov tooj yog txhawm rau txhawm rau txhawm rau txuas tus lej ntawm lub sijhawm rau tus lej koj tab tom sim hu. Yog li, dua, txhawm rau hu 8 koj yuav tsum tau ua kom nrawm qhov kev sib txuas 8 zaug.

Kauj Ruam 4: Txuas Dialer rau PIC Chip

Txuas Dialer rau PIC Chip
Txuas Dialer rau PIC Chip
Txuas Dialer rau PIC Chip
Txuas Dialer rau PIC Chip

Txuas lub xov tooj tig mus rau PIC nti raws li pom hauv daim duab. Daim ntawv ceeb toom tias kuv tab tom nyeem hauv lub xeev ntawm lub xov tooj tig los ntawm kev siv RC-sijhawm. Hauv lwm lo lus, PIC nti suav nrog ntau zaus nws siv sijhawm rau lub tshuab hluav taws xob tso tawm (uas hloov pauv thaum tsis kam ntxiv).

Ntawd yog qhov twg 20K resistor los rau hauv. Ntxiv qhov no rau cov tswv yim tso cai rau qhov sib txawv meej ntawm lub teeb liab los ntawm kev kaw thiab qhib kev sib hloov hloov pauv.

Kauj Ruam 5: Sib Sau Ua Ke

Sib dhos Txoj Cai
Sib dhos Txoj Cai

Txhawm rau ua haujlwm rau nti, Kuv siv MBasic ib puag ncig kev txhim kho muaj los ntawm Basic Micro. MBasic, yooj yim heev, yog qhov hloov pauv ntawm Basic tsim rau siv nrog PIC chips. Nws tau hloov pauv tau yooj yim mus rau ntau hom lus (muaj txiaj ntsig). Txoj cai yog qhov tseem ceeb txiav txim siab thaum ib tus neeg tau tig lub xov tooj thiab tom qab ntawd ua rau ntug kev txheeb xyuas ntawm lub teeb liab (txiav txim siab kev hloov pauv qis) kom txog thaum lub xov tooj rov zoo li nws lub xeev pib. Tom qab tallying tus naj npawb ntawm lub sijhawm nws ntsuas lub teeb liab hloov pauv, nws tom qab ntsais LED raws li. Piv txwv li, yog tias koj hu 3, PIC yuav suav peb qhov kev hloov pauv qis thiab tom qab ntawd ntsais ib qho LED 3 zaug. LED, raws li koj yuav tau pom, yog qhov tsis tseem ceeb rau qhov no los ua haujlwm thiab tsuas yog nyob ntawd kom muab cov lus pom pom rau koj. Koj tuaj yeem hloov kho cov cuab yeej tso tawm uas koj xav tau. ********************* Nov yog qee qhov chaws: ********************* CPU = 16F877MHZ = 20CONFIG 16254clicker var wordstartcountin var wordcountclicks var wordrepvar var wordclacker var wordlargefig var wordmain: countclicks = 0repvar = 0'sets/resets valueshigh B2rctime B2, 1, startcountincountclicks = 0if startcountin> 10 ces tau txais mus rau suav mus rau subroutine yog tias nws tau mus rau lub ntsiab '================ suav nrog: siab B1rctime B1, 1, clacker'sets sib piv valuegoto countmeuploop' =========== ===== countmeuploop: siab B1rctime B1, 1, clicker'checks suav valuelargefig = clacker + 100'sets tus nqi rau qhov pib uas yuav loj dua 'ntau dua 0 tab sis tsawg dua qhov ua tau pin-high valuesif bigfig <clicker thencountclicks = countclicks + 1endif'adds 1 tus nqi txhua lub sijhawm qis mus rau qhov hloov pauv siab tau sau tseg B2rctime B2 siab, 1, pib suav suav suav pib suav <10 tom qab ntawv suav suav> 0 thengoto blinkelsegoto mainendifendif'checks kom pom yog tias lub xov tooj tau rov qab los rau nws nitial lub xeev 'yog nws muaj thiab tus lej tau hu nws mus rau LED niaj hnub' tsis tas li, yog tias tsis muaj tus lej raug hu nws mus rau mainclacker = clicker'resets qhov sib piv tus nqi rau tus lej tus lej tam sim no goto countmeuploop'no tsis nres ib qho tag nrho hauv qhov niaj hnub no ! '================ blinker: repvar = repvar + 1'counts txhua qhov rov ua dua ntawm qhov niaj hnub no siab B3pause 1000low B3pause 1000'blinks LEDif repvar = countclicks thenrepvar = 0goto mainendif'if rov ua dua sib npaug tus naj npawb ntawm lub sijhawm LED yuav tsum ntsais tom qab ntawd nws rov qab mus rau qhov tseem ceeb niaj hnub mus rau blinker

Kauj Ruam 6: Xeem

Kev Xeem
Kev Xeem

Yog tias koj ua txhua yam zoo ib yam li kuv, nws yuav tsum ua haujlwm (saib video).

Yog tias nws tsis ua haujlwm, nco ntsoov tias koj tau txuas txhua yam kom raug thiab cov cai tau theej theej tawm kom raug. Tsis tas li, nco ntsoov tias koj lub resonator (lossis siv lead ua) yog 20 MHZ. Yog tias koj tau sau koj tus kheej cov cai kom ntseeg tau tias tsis muaj kev ncua nyob hauv cov txheej txheem uas txheeb xyuas qhov hloov pauv qis-siab.

Kauj Ruam 7: Mus Ntxiv

Mus Tshaj
Mus Tshaj

Txheeb tawm qee yam ntawm lwm yam kev siv rau lub xov tooj teb uas tsis yog ntsais muag LED.

Pom zoo: