Cov txheej txheem:

Picaxe Raws Li Cov Ntsuas Kub Nrog Max thiab Min: 13 Kauj Ruam
Picaxe Raws Li Cov Ntsuas Kub Nrog Max thiab Min: 13 Kauj Ruam

Video: Picaxe Raws Li Cov Ntsuas Kub Nrog Max thiab Min: 13 Kauj Ruam

Video: Picaxe Raws Li Cov Ntsuas Kub Nrog Max thiab Min: 13 Kauj Ruam
Video: Musicians talk about Buckethead 2024, Hlis ntuj nqeg
Anonim
Picaxe Raws Li Cov Ntsuas Kub Nrog Max thiab Min
Picaxe Raws Li Cov Ntsuas Kub Nrog Max thiab Min
Picaxe Raws Li Cov Ntsuas Kub Nrog Max thiab Min
Picaxe Raws Li Cov Ntsuas Kub Nrog Max thiab Min
Picaxe Raws Li Cov Ntsuas Kub Nrog Max thiab Min
Picaxe Raws Li Cov Ntsuas Kub Nrog Max thiab Min

(Thov tawm lus, tab sis tsis txhob ua qhov hnyav dhau, qhov no yog kuv thawj zaug qhia !!)

Nov yog tus pas ntsuas kub uas kuv tau ua rau peb lub cav tsheb, los qhia qhov ntsuas kub sab nraud. Nws yog raws li Picaxe nti vim lawv pheej yig thiab siv tau yooj yim. Yog tias qhov no yog rau lub tsheb, saib qhov ntsuas qhov ntsuas hluav taws xob qhia paub yuav ua li cas tswj hwm qhov hluav taws xob. Cov phiaj xwm ua tiav thiab cov duab kos yog cov duab hauv qab no lossis, yog tias koj tsis yog tus tswv cuab, ntawm ob nplooj ntawv kawg. Koj yuav xav tau: 1X Breadboard (lossis koj tuaj yeem muab nws tso rau ntawm lub rooj tsav xwm, tab sis kuv yuav sim nws ntawm daim ntawv tais ua ntej.) 1X Axe033 LCD zaub lossis 2x16 LCD npo xws li ib qho muag los ntawm Milford Instruments (6-111) nrog tus tsav tsheb board1X Picaxe 14M (lossis lwm yam picaxe nti, yog tias koj siv qhov sib txawv koj yuav tsum tau saib cov pinouts) 1X Digital kub sensor1X picaxe programming cable Ib co Verro board (lub tso suab ntsaws tsis ua haujlwm ntawm lub khob cij) 2X 10K resistor 1X 22K resistor 1X 47K resistor 1X 3.5mm lub tso suab ntsaws 1X thawb hloov 1X 4.5V roj teeb pobPicaxe Programming Editor

Kauj Ruam 1: Txuas Cov Roj Teeb

Txuas Cov Roj Teeb Pob
Txuas Cov Roj Teeb Pob

Kauj Ruam Ib: Txuas lub roj teeb pob mus rau ob txoj kab sab nraud ntawm lub khob cij.

Kauj ruam 2: Txuas rau Chip

Txuas hauv Chip
Txuas hauv Chip

Kauj Ruam 2: Txuas Chip rau hauv, ntxig rau hauv nruab nrab ntawm pawg thawj coj saib, kom ob txhais ceg nyob ntawm ob sab ntawm qhov sib txawv ntawm nruab nrab.

Kauj Ruam 3: Txuas Lub Hwj Chim rau Chip

Txuas lub Hwj Chim rau Chip
Txuas lub Hwj Chim rau Chip

Kauj Ruam 3: Txuas thawj ceg deb ntawm V+ ntawm lub nti rau V+, thiab 0V rov qab rau 0V..

Kauj Ruam 4: Ua Qhov Programming Interface

Ua qhov Programming Interface
Ua qhov Programming Interface
Ua qhov Programming Interface
Ua qhov Programming Interface

Kauj Ruam 4: Txiav lub verro board kom cov ciav hlau khiav mus ntev. Cov laug ntawm lub tso suab tso suab kom nws me ntsis khoov ntawm ntug. Solder hauv 10K resistor nruab nrab ntawm ob sab sab nraud ntawm lub tso suab tso suab. Solder 22K resistor ntawm sab tes xis tus pin thiab cov khoom seem. Solder peb cov xov hlau, ib qho rau tus pin nruab nrab ntawm lub qhov (socket), ib qho mus rau qhov kawg ntawm 10K resistor thiab ib qho mus rau qhov kawg ntawm 22K resistor.

Kauj Ruam 5: Plug rau hauv Programming Interface

Plug rau hauv Programming Interface
Plug rau hauv Programming Interface

Kauj Ruam 5: Txuas cov xaim xaim ua tus pin nruab nrab rau cov ntawv tso tawm. Txuas cov xaim los ntawm 22K tus tiv thaiv mus rau cov lej nkag. Txuas lwm cov xaim mus rau 0V.

Kauj Ruam 6: Txuas Qhov Kub Kub Sensor

Txuas Qhov Kub Kub Sensor
Txuas Qhov Kub Kub Sensor

Kauj Ruam 6: Txuas lub ntsuas hluav taws xob rau hauv lub khob cij nrog lub ntsej muag sib npaug taw tes tawm. Txuas sab tes xis mus rau V+. Txuas sab tes laug mus rau 0V. Txuas ob txhais ceg nruab nrab mus rau qhov txuas 1. Txuas 47K resistor los ntawm tus pin tib yam ntawm lub nti rau V+.

Kauj Ruam 7: Txuas Txuas

Txuas lub Hloov
Txuas lub Hloov

Kauj Ruam 7: Txuas ib kawg ntawm qhov hloov mus rau V+. Txuas lwm qhov kawg rau 0V nrog 10K resistor thiab input 2 nrog 1K resistor.

Kauj ruam 8: Txuas lub Vijtsam

Txuas lub Vijtsam
Txuas lub Vijtsam

Kauj Ruam 8: Txuas lub xaim txuas rau cov ntaub qhwv cim "Hauv", "V+" thiab "0V" ntawm qhov screen. Txuas V+ thiab 0V rau, koj yuav tsis twv, V+ thiab 0V. Txuas hauv Cov xov hlau mus rau cov zis 1.

Kauj Ruam 9: Kho qhov Screen

Kauj Ruam 9: Yog tias koj siv lub vijtsam los ntawm Milford Instruments ces hla mus rau kauj ruam 11. Txuas lub xov tooj cua mus rau hauv lub computer nrog lub xov tooj. Qhib Picaxe Programming Editor. Teem nws mus rau 14M thiab qhov chaw nres nkoj COM raug rau lub cable. Ntaus hauv cov cai no: pib: ncua 500 lub ntsiab lus: serout 1, N2400, (253, 1, "Sab Nraud:") ncua 1000 serout 1, N2400, (253, 2, "Kub") ncua 1000 serout 1, N2400, (253, 3, "Max. Temp:") ncua 1000 serout 1, N2400, (253, 4, "Min. Temp:") ncua 1000 kawg Qhib lub hwj chim. Xovxwm txoj haujlwm. Txoj cai no sau plaub cov lus rau hauv lub vijtsam lub cim xeeb kom txuag spave ntawm lub nti. Lawv yuav raug hu nyob rau hauv txoj haujlwm uas yuav khiav ntawm lub nti. Nco ntsoov tig lub hwj chim thaum sim ua qhov program.

Kauj ruam 10: Program Chip

Ntaus hauv qhov chaws no:

pib: ncua 500` tos rau lub vijtsam kom pib ua ntej yog li cov ntaub ntawv tsis ploj serout 1, N2400, (1) `tso saib cov lus khaws tseg 1:" Sab nraud: "nyob rau sab saum toj kab ncua 5 'tos nws ua haujlwm serout 1, N2400, (2) `tso saib cov lus khaws tseg 2:" Kub "ntawm kab hauv qab readtemp 1, b1` nyeem qhov kub pib kom tau txais kev nyeem ntawv rau qhov kub tsawg kawg b6 = b1`set qhov kub tsawg tshaj li tam sim no yog li nws tsis tso tawm 0 setint %00000100, %00000100`set cuam tshuam rau tus lej nkag (tus lej 2)

Kev cuam tshuam: gosub Maxmin` mus rau qhov ntsuas pom qhov siab tshaj plaws thiab qhov kub tau teeb tsa %00000100, %00000100` rov teeb tsa kev cuam tshuam vim tias nws tau tso tseg thaum nws raug tsoo

Maxmin: serout 1, N2400, (3) `tso saib cov lus khaws tseg 3:" Max. Temp: "nyob rau kab saum toj ncua 5 'tos nws ua haujlwm serout 1, N2400, (4)` tso saib cov lus khaws tseg 4: "Min. Temp: "ntawm kab hauv qab ncua 5 'tos nws ua haujlwm serout 1, N2400, (254, 140, #b5," C ")` qhia qhov kub siab tshaj plaws (sib txawv b5) tom qab ntawd "C" ncua 5' tos rau nws ua haujlwm serout 1, N2400, (254, 204, #b6, "C") `qhia qhov ntsuas kub tsawg kawg (sib txawv b6) tom qab ntawd" C "tos 10`tau 10 vib nas this kom tso cai rau sijhawm nyeem serout 1, N2400, (1) ' tso tawm cov lus khaws tseg 1: "Sab nrauv:" ntawm kab sab saum toj ncua 5 'tos kom nws ua haujlwm serout 1, N2400, (2) `tso saib cov lus khaws tseg 2:" Kub "ntawm kab hauv qab

Celcius: readtemp 1, b1 serout 1, N2400, (254, 140, #b1, "C") serout 1, N2400, (254, 140) yog b1> b5 ces tau txais GT 'kuaj seb puas muaj qhov kub siab tshiab yog tias b1 <b6 tom qab ntawd tau txais LT `ntsuas seb puas muaj qhov ntsuas kub tsawg dua tshiab Celcius GT: b5 = b1` teeb tsa qhov ntsuas kub tshiab tshaj plaws goto Celcius LT: b6 = b1 `teeb tsa qhov ntsuas kub tshiab me ntsis

Nyem khiav thiab program lub nti. Nco ntsoov tig lub zog rau lub nti thaum ua haujlwm. Yog tias tsis muaj dab tsi tshwm sim tom qab ntawd kho qhov sib txawv nyob tom qab ntawm pawg tsav tsheb. Nws yog lub zog me me.

Kauj Ruam 11: Lwm Txoj Cai Screen

Program lub nti nrog cov cai no.

pib: ncua 1000 `tos rau lub vijtsam kom pib ua ntej yog li cov ntaub ntawv tsis ploj serout 1, N2400, (" Sab Nraud: ") serout 1, N2400, (254, 192," Kub ") readtemp 1, b1 b6 = b1` teeb tsa yam tsawg kawg nkaus kub li tam sim no yog li nws tsis tso tawm 0 setint %00000100, %00000100 `teeb cuam tshuam rau cov lej nkag nkag (input 2) goto Celcius

Kev cuam tshuam: serout 1, N2400, (254, 128, "Max. Temp:") serout 1, N2400, (254, 192, "Min. Temp:") serout 1, N2400, (254, 140, #b5, " C ")` qhia qhov kub siab tshaj plaws (sib txawv b5) tom qab ntawd "C" serout 1, N2400, (254, 204, #b6, "C") `qhia qhov kub tsawg kawg (sib txawv b6) ces" C "tos 5` tos 5 vib nas this kom tso cai rau sijhawm nyeem serout 1, N2400, (254, 128, "Sab Nraud:") ncua sijhawm 10 serout 1, N2400, (254, 192, "Kub") `mus rau qhov screen qhia pom qhov siab tshaj plaws thiab min kub setint %00000100, % 00000100 `rov pib cuam tshuam vim tias nws raug tshem tawm thaum nws raug thim rov qab 'rov qab mus rau qhov uas nws cuam tshuam

Celcius: readtemp 1, b1 serout 1, N2400, (254, 140, #b1, "C") serout 1, N2400, (254, 140) yog b1> b5 ces gosub GT 'kuaj seb puas muaj qhov kub siab tshiab yog tias b1 <b6 ces gosub LT goto Celcius

GT: b5 = b1 `teeb tsa qhov kub siab tshaj tawm tshiab

LT: b6 = b1 `teeb tshiab min kub rov qab Nyem khiav thiab teeb tsa lub nti. Nco ntsoov tig lub zog rau lub nti thaum ua haujlwm. Yog tias tsis muaj dab tsi tshwm sim tom qab ntawd kho qhov sib txawv nyob tom qab ntawm pawg tsav tsheb. Nws yog lub zog me me

Kauj Ruam 12: Daim duab Circuit Court

Daim duab Circuit Court
Daim duab Circuit Court

(Rau cov tsis yog tswv cuab!)

Pom zoo: