Cov txheej txheem:

Ua XOR Rooj vag Tawm ntawm Transistors: 6 Kauj Ruam
Ua XOR Rooj vag Tawm ntawm Transistors: 6 Kauj Ruam

Video: Ua XOR Rooj vag Tawm ntawm Transistors: 6 Kauj Ruam

Video: Ua XOR Rooj vag Tawm ntawm Transistors: 6 Kauj Ruam
Video: Five Amazing Humanoid Encounters 2024, Hlis ntuj nqeg
Anonim
Ua XOR Rooj vag Tawm ntawm Transistors
Ua XOR Rooj vag Tawm ntawm Transistors

LOSSIS lub rooj vag muaj txiaj ntsig zoo, tab sis lawv muaj ib qho tshwj xeeb uas tuaj yeem ua haujlwm zoo xwb, tab sis hauv qee qhov kev thov tuaj yeem ua teeb meem. Qhov ntawd yog qhov tseeb tias yog tias ob qho tib si ntawm cov tswv yim yog ib qho, ces cov zis kuj yog ib qho. Yog tias peb muaj daim ntawv thov uas peb tsis xav tau qhov no, tej zaum peb tab tom tsim cov adder, peb yuav siv qee yam hu ua Exclusive Or Gate, uas yog luv XOR lossis EOR.

Kauj Ruam 1: Tsim

Tsim
Tsim
Tsim
Tsim
Tsim
Tsim

Ib txoj hauv kev kom ua tiav XOR tus cwj pwm yog coj mus tas li LOSSIS lub qhov rooj, tom qab ntawd hais nrog rooj plaub uas ob qhov kev nkag mus tau zoo. Yog tias peb khi AND lub rooj vag rau cov tswv yim, peb tuaj yeem tau txais lub teeb liab thaum qhov teeb meem tshwm sim. Peb tuaj yeem nqa lub teeb liab ntawd, ntxeev nws, tom qab ntawd khi qhov ntawd thiab tso tawm ntawm lub qhov rooj OR mus rau lwm lub rooj vag THIAB. Qhov no yuav ua rau kom txhua lub sijhawm nws tsis yog rooj plaub uas ob lub tswv yim nkag mus, LOSSIS lub rooj vag yuav yooj yim hla lub qhov rooj THIAB thib ob, tab sis thaum ob qho kev nkag mus siab, thawj THIAB rooj vag yuav kaw qhov thib ob THIAB rooj vag thiab khaws tso tawm tsis hais lub xeev ntawm lub rooj vag OR.

Ib qho kev hloov pauv kuv tau ua tiav hauv qhov kawg ntawm kev sib pauv yog hloov THIAB/TSIS sib xyaw rau NAND rooj vag, uas tsuas yog ib qho rov qab THIAB rooj vag. Txoj hauv kev ua haujlwm no yuav pom tseeb tom qab.

Tam sim no cia sau cov phiaj xwm tib yam, tab sis nrog transistors thiab resistors. Hom transistor kuv siv yog 2N2222 BJT, uas yog ib qho ncaj ncees (2N4401 thiab 2N3904 kuj ua haujlwm). Kuv siv 6 transistors, 3 20k ohm resistors, 3 47k ohm resistors, 1 510 ohm resistor, ob lub khawm thiab LED. Kuv xaiv cov ntsuas qhov ntsuas no raws li kuv lub zog 5v, thiab 0.1mA, lossis 0.0001A yam tsawg kawg tam sim no rau 2N2222. yog tias koj siv Ohm txoj cai lij choj los xam qhov tseeb tiv thaiv hauv av rau cov txiaj ntsig ntawd koj tau txais 50, 000 ohms. 47k ohms nyob ze txaus rau qis NAND rooj vag, tab sis vim li cas tus nqi qis dua rau LOSSIS lub rooj vag, thiab thawj qhov nkag ntawm qhov thib ob THIAB rooj vag? Qhov laj thawj yog vim tias tus xa tawm ntawm cov transistors ua rau LOS YOG lub rooj vag tau sib txuas los ntawm lub hauv paus ntawm lwm lub transistor yog li ntawd khiav los ntawm tus tiv thaiv thib ob, tsis ncaj qha rau hauv av. (Tam sim no txwv kev tiv thaiv ntawm LED yog tus nqi txaus txaus uas nws tsis tseem ceeb hauv qhov kev suav no).

Kauj Ruam 2: Ntxiv Transistors, Khawm, thiab LED

Ntxiv Transistors, Khawm, thiab LED
Ntxiv Transistors, Khawm, thiab LED

Kauj ruam 3: Ntxiv Resistors

Ntxiv Resistors
Ntxiv Resistors

Kauj Ruam 4: Ntxiv Cov Hluav Taws Xob

Ntxiv Cov Xov
Ntxiv Cov Xov
Ntxiv Cov Xov
Ntxiv Cov Xov

Txoj kev uas kuv tab tom ua kom kuv lub rooj tsav xwm tau sib txuas lub zog txuas mus rau lub rooj zaum hauv lub chaw tso khoom siv hluav taws xob teeb tsa ntawm 5v thiab 500mA max tam sim no. Tib yam kev tawm tswv yim tuaj yeem ua tiav los ntawm kev txuas lub zog rau Arduino's 5V thiab thiab GND pins, tab sis tiag tiag yog 5v lub zog siv hluav taws xob ua haujlwm (txawm hais tias tam sim no txwv ib qho yog pom zoo kom txo qhov kev pheej hmoo ntawm tshuab tuaj ua ke).

Kauj Ruam 5: Kuaj thiab Teeb Meem

Tam sim no nws tau sib txuas, Kuv yuav cia koj sim koj tus kheej. Yog tias ib lossis lwm yam ntawm cov nyees khawm raug thawb, LED yuav tsum teeb. Yog tias ob qho tib si raug thawb, txawm li cas los xij, tom qab ntawd LED yuav tua.

Teeb meem tshwm sim

  1. Yog tias ib lub tswv yim zoo li tsis ua haujlwm zoo li nws yuav tsum tau ua, thiab cov ntaub ntawv uas ob lub tswv yim tseem nyob hauv tseem muab xoom, txheeb xyuas qhov hluav taws xob ntawm qhov nkag ntawm THIAB lub rooj vag uas los ntawm LOSSIS lub rooj vag thaum lub pob ntawd raug thawb. Yog tias nws qis (<2V), txo qhov tsis kam ntawm tus tiv thaiv tawm ntawm LOSSIS mus rau THIAB rooj vag.
  2. Yog tias lub qhov rooj tseem ua haujlwm zoo li tsuas yog lub qhov rooj OR, txhais tau tias thaum ob qho tib si nkag mus rau ntawm qhov tso tawm, txheeb xyuas qhov hluav taws xob nkag mus rau hauv lub tswv yim THIAB lub qhov rooj uas los ntawm NAND rooj vag. Yog tias qhov siab thaum ob lub nyees khawm raug nias, xyuas kom tseeb tias koj lub transistors hauv THIAB lub qhov rooj ua haujlwm, thiab txheeb xyuas qhov tsis kam los ntawm qhov ntawd mus rau hauv av thaum ob lub khawm raug nias. Yog tias qhov kev tiv thaiv siab, thiab/lossis qhov hluav taws xob qis, hloov ob lub transistors, lossis txo qhov tsis kam ntawm cov khoom siv mus rau NAND rooj vag.

Kauj Ruam 6: Xav Tau Ntxiv?

Yog tias koj nyiam phau ntawv no mus tom ntej thiab txheeb xyuas kuv phau ntawv ntawm Amazon hu ua "Phau Ntawv Qhia Pib rau Arduino." Nws mus dhau cov hauv paus ntsiab lus ntawm kev siv hluav taws xob ib yam li mus hla C ++ txoj cai siv rau program Arduino.

Pom zoo: