Cov txheej txheem:

Yooj Yim & Pheej Yig Analog rau Digital Converter: 5 Kauj Ruam
Yooj Yim & Pheej Yig Analog rau Digital Converter: 5 Kauj Ruam

Video: Yooj Yim & Pheej Yig Analog rau Digital Converter: 5 Kauj Ruam

Video: Yooj Yim & Pheej Yig Analog rau Digital Converter: 5 Kauj Ruam
Video: Часы G-Shock до 250 долларов-15 лучших часов Casio G до 250 доллар... 2024, Kaum ib hlis
Anonim
Yooj Yim & Pheej Yig Analog rau Digital Converter
Yooj Yim & Pheej Yig Analog rau Digital Converter
Yooj Yim & Pheej Yig Analog rau Digital Converter
Yooj Yim & Pheej Yig Analog rau Digital Converter
Yooj Yim & Pheej Yig Analog rau Digital Converter
Yooj Yim & Pheej Yig Analog rau Digital Converter
Yooj Yim & Pheej Yig Analog rau Digital Converter
Yooj Yim & Pheej Yig Analog rau Digital Converter

Txij lub sijhawm ADC tau kim thiab tsis tshua muaj, los kho cov cuab yeej kho vajtse-software daws cov ntaub ntawv rau PCs. Raws li qhov chaw nres nkoj Joystick qub los ntawm IBM-sib xws, cov txheej txheem ua rau muaj ntau lub tshuab ua haujlwm monostable tiv thaiv kev hloov pauv (thermistor, photocell, lim gauge, thiab lwm yam) thiab tom qab suav ntau npaum li cas nws dhau mus ua ntej cov zis ntawm cov multivibrator mus siab yog qhov zoo heev yooj yim los siv rau feem ntau PC platforms thiab ntawm ntau hom lus. Cov ntaub ntawv piv txwv VisualBasic thiab Qbasic tau qhia.

Kauj Ruam 1: Lub Joystick Port

Chaw nres nkoj Joystick
Chaw nres nkoj Joystick

Tau ntau xyoo hauv tsev IBM tau tshaj PCs tuaj nrog Joystick chaw nres nkoj uas muaj X axis, Y axis, A & B khawm teeb liab pins. Qhov txuas me me DB-15 tuaj yeem nkag mus rau ntawm chaw nyob 200h & 201h. Tus joystick nws tus kheej tsuas yog ob lub potenciometers thiab ob lub khawm. Sab hauv lub motherboard ntawm PC, ob qhov rov ua dua qub monostable multivibrators (RMM rau luv) nrog cov tsau ruaj ruaj thiab IN/OUT pins tau nyob. Lub sijhawm RC tas li tau teeb tsa los ntawm cov potenciometers thiab cov capacitors. Txhawm rau pib lub teeb liab hloov pauv, koj yuav ua WRITE mus rau chaw nres nkoj chaw nyob 200h thiab tom qab ntawd pib suav kom txog thaum koj tau txais me ntsis HIGH los ntawm kev nyeem ua ntej mus rau chaw nyob chaw nyob 200h. Qhov no tuaj yeem ua tiav hauv txhua yam lus (yooj yim, pascal, c).

Kauj Ruam 2: Joystick Port hauv VB

Chaw nres nkoj Joystick hauv VB
Chaw nres nkoj Joystick hauv VB

Nov yog tus qauv piv txwv kuv siv los ntsuas kuv tus lej junkyard joystick: Private Sub Timer1_Timer () Dim V, H As Integer Out & H201, & HFF For H = 1 To 3000 If (Inp (& H201) And & H1) / & H1 = 0 Then Exit For Tom ntej H Kab rov tav. Text = H Tawm & H201, & HFF Rau V = 1 Txog 3000 Yog (Inp (& H201) Thiab & H2) / & H2 = 0 Tom qab Tawm Rau Tom ntej V Vertical. Text = V Yog (Inp (& H201) Thiab & H10) / & H10 = 0 Then Shape1. FillColor = & HFF If (Inp (& H201) And & H20) / & H10 = 0 Then Shape2. FillColor = & HFF If (Inp (& H201) And & H10) / & H10 = 1 Then Shape1. FillColor = & HC0C0C0 Yog (Inp) (& H201) Thiab & H20) / & H20 = 1 Tom qab ntawd Shape2. FillColor = & HC0C0C0 Shape3. Kab ntawv kab rov tav thiab ntsug yuav qhia tus nqi cuam tshuam nrog X thiab Y txav ntawm koj tus pas. Tsis tas li ntawd lub xwmfab yuav txav ib puag ncig hauv lub thawv loj los sawv cev rau koj qhov kev txav mus los. Nias lub A thiab B cov nyees khawm yuav tig nyeem lub voj voog grey. Tus qauv suav ua cov ntaub ntawv EXE, cov cai hauv paus thiab INPOUT32. DLL lub tsev qiv ntawv nyob hauv. RAR cov ntaub ntawv.

Kauj Ruam 3: Siv Nws Siv Qhov Chaw Nkag Mus Nkag Hauv DOS

Siv Nws Siv Qhov Chaw Nkag Nkag Nkag Nkag Hauv DOS
Siv Nws Siv Qhov Chaw Nkag Nkag Nkag Nkag Hauv DOS

74 LS 123 yog qhov kuv tau siv kom zoo ib yam li qhov chaw nres nkoj joystick. Nws muaj ob RMM. Hauv cov ntawv PDF koj tuaj yeem pom cov ntawv teev tseg thiab ib qho yooj yim Circuit Court los txuas rau koj qhov chaw nres nkoj sib luag. Kuv yog tus kiv cua Qbasic (vim tias nws muaj dav siv) yog li cov cai tau sau rau hauv nws. Cov txheej txheem yog tib yam li hauv VB tus qauv: LPTdata = & H378 LPTstatus = LPTdata + 1: LPTcontrol = LPTdata + 2YMAXX = 500SCREEN 2LINE (9, 1)-(630, 170),, B, & H3333VIEW (10, 2)- (629, 169) WINDOW (0, YMAXX)-(620, 0) MAXX = 620DIM D (MAXX) HNUB INKEY $ = "" OUT LPTcontrol, & H1 OUT LPTcontrol, & H0 FOR Y = 1 TO YMAXX YOG (INP (LPTstatus) THIAB & H10) / & H10 = 1 THIAB EXIT FOR NEXT Y LOCATE 23, 1 PRINT USING "####"; Y LINE (0, 0) - (MAXX, YMAXX), 0, BF FOR I = 1 TO MAXX LINE (I, D (I - 1)) - (I, D (I)) D (I - 1) = D (I) NEXT ID (MAXX) = YWEND Ib tus pin tso tawm tau siv los ua kom MMR thiab ib tus pin nkag los nyeem cov zis ntawm nws.

Kauj Ruam 4: Txuas Ciruit rau LPT

Txuas tus Ciruit rau LPT
Txuas tus Ciruit rau LPT
Txuas tus Ciruit rau LPT
Txuas tus Ciruit rau LPT
Txuas tus Ciruit rau LPT
Txuas tus Ciruit rau LPT

Lub kaw lus tau ua tiav raws li ib nrab kho vajtse thiab ib nrab software. Kev hloov pauv ntawm qhov sib txawv tsis kam mus rau lub sijhawm ncua yog siv los suav cov noob thiab suav no yog peb qhov txiaj ntsig xav tau. Qbasic cov ntaub ntawv yuav npaj los tshuaj xyuas lub teeb liab thiab tom qab ntawv nyem nws kom raug.

Kauj ruam 5: Siv nws

Nov yog IC ib txwm tab sis lwm yam monostables kuj tseem tuaj yeem siv tau. Coob leej neeg uas nyob hauv qhov chaw yog ADC nyuaj nrhiav, tej zaum yuav nyiam siv cov phiaj xwm no los ua lub tsev kawm ntawv phiaj xwm phiaj xwm ntsuas kub lossis lwm yam khoom ntev li ntev tau uas koj tuaj yeem ua rau MMR hloov nws qeeb thaum koj lub ntsuas cua ua.

Pom zoo: