Cov txheej txheem:

PIC Pheej Yig Tswj Lub Koob Yees Duab Siv Sony LANC (Zoo rau Kev Ua Si Heev): 4 Cov Kauj Ruam
PIC Pheej Yig Tswj Lub Koob Yees Duab Siv Sony LANC (Zoo rau Kev Ua Si Heev): 4 Cov Kauj Ruam

Video: PIC Pheej Yig Tswj Lub Koob Yees Duab Siv Sony LANC (Zoo rau Kev Ua Si Heev): 4 Cov Kauj Ruam

Video: PIC Pheej Yig Tswj Lub Koob Yees Duab Siv Sony LANC (Zoo rau Kev Ua Si Heev): 4 Cov Kauj Ruam
Video: Yuav Koob Thaij Sony me tab sig zoo siv. Zeb Tsua Lauj 2024, Hlis ntuj nqeg
Anonim
PIC Pheej Yig Tswj Lub Koob Yees Duab Siv Sony LANC (Zoo rau Kev Ua Si Heev)
PIC Pheej Yig Tswj Lub Koob Yees Duab Siv Sony LANC (Zoo rau Kev Ua Si Heev)

Cov Lus Qhia no yuav qhia koj yuav ua li cas thiaj ua tau lub Koob Yees Duab Pheej Yig pheej yig uas tuaj yeem tswj tau ntawm lub chaw taws teeb kom koj lub koob yees duab tseem ceeb tuaj yeem nyob nyab xeeb hauv koj lub hnab ntim khoom. Cov maub los tuaj yeem txuas rau ib qho ntawm lub xub pwg pluaj ntawm koj lub hnab ntim khoom, thiab yuav tso cai rau koj Sau thiab Nres lub koob yees duab thiab tseem tuaj yeem hloov lub 'mos txwv' lub koob yees duab rau thiab tawm ib yam nkaus. Qhov no yog qhov zoo tshaj plaws rau cov tib neeg uas xav ua yeeb yaj kiab kis las kis las xws li bmxing, snowboarding, skateboarding thiab lwm yam los ntawm thawj tus neeg pom. Daim duab hauv qab no qhia lub koob yees duab mos txwv thiab cov chaw taws teeb tswj nrog rau lub koob yees duab tseem ceeb adn roj teeb pob.

Kauj Ruam 1: Nws Ua Haujlwm Li Cas

Nws Ua Haujlwm Li Cas
Nws Ua Haujlwm Li Cas
Nws Ua Haujlwm Li Cas
Nws Ua Haujlwm Li Cas
Nws Ua Haujlwm Li Cas
Nws Ua Haujlwm Li Cas

Nws yog qhov yooj yim yooj yim los txuas lub me me 'mos txwv' style lub koob yees duab rau koj lub koob yees duab thiab tau txais lub koob yees duab los ua yeeb yaj kiab dab tsi lub koob yees duab mini yog 'pom', tab sis kuv xav kom tuaj yeem tswj hwm cov ntaub ntawv thiab tso tseg cov nyiaj ntawm lub koob yees duab yam tsis tau tawm ntawm kuv lub hnab txhua lub sijhawm. Tom qab tshawb xyuas me ntsis, Kuv pom tias Sony lub koob yees duab muaj LANC txuas rau lawv uas tuaj yeem siv los tswj lub koob yees duab thiab tseem muab cov ntaub ntawv hais txog lub koob yees duab ua dab tsi. Qhov no yog qhov zoo, vim tias thaum koj nyem lub pob nyem nyob deb, koj tuaj yeem nyeem cov ntaub ntawv los ntawm LANC cable kom paub seb lub koob yees duab puas tau pib sau, thiab muaj cov ntaub ntawv teeb pom kev zoo ntawm koj lub maub los. Lub koob yees duab me me tsuas yog 15 phaus los ntawm ebay Lub 2.5mm stero jack tau kwv yees li 1 phaus thiab lwm yam khoom thiab cov khoom tau tsawg dua 5 phaus Yog li kwv yees li 20 phaus, koj tuaj yeem muaj lub luag haujlwm ua haujlwm, chaw taws teeb tswj lub kaus mom. Kuv tus maub los yog yooj yim heev. Nws muaj Cov Ntawv Sau, khawm Nres, lub zog hloov pauv rau lub koob yees duab me me thiab 3 LEDs. (Minicam lub zog, Lub koob yees duab tseem ceeb lub zog thiab cov cim qhia tseg). Qhov no yog txhua yam kuv xav tau rau kuv txoj haujlwm, tab sis qhov chaws uas kuv tau muab yog ncaj ncaj rau pem hauv ntej thiab tuaj yeem hloov kho kom tso cai rau koj tswj txhua yam ntawm lub koob yees duab. --- Kuv tau ntxiv lwm cov kauj ruam, Kauj Ruam 4, nws yog qhov hloov tshiab uas qhia qhov tsis zoo ntawm lub roj teeb thiab qhov kawg ntawm daim kab xev) --- Cov duab: Daim duab 1-Tus qauv (nrog 8 LEDs los pab daws kuv qhov haujlwm) Daim duab 2 - Kaw ze ntawm 'lub mos txwv' lub koob yees duab thiab tus tswj

Kauj ruam 2: Daim duab Circuit Court

Daim duab Circuit Court
Daim duab Circuit Court

Lub Circuit Court yog ib qho yooj yim heev. - PIC tau siv ncaj qha los ntawm LANC cable. - Minicam tau siv los ntawm 12 volt roj teeb pob los ntawm kev hloov pauv - Muaj 2 lub laub khawm rau Cov Ntaub Ntawv thiab Nres - 3 LEDs tau siv los qhia koj li xwm txheej ntawm lub koob yees duab PIC sib txuas: RA0 - LANC los ntawm lub koob yees duab RB7 - Sau LED RB4 - khawm kaw RB5 - Nres khawm (Thov nco tseg, Kauj Ruam 4 yog hloov tshiab rau hauv Circuit Court no, lub hwj chim LED txuas nrog RA5 thiab muaj lwm qhov chaws sib txawv)

Kauj Ruam 3: LANC yog Dab Tsi thiab Txoj Haujlwm Ua Haujlwm Li Cas?

Yog tias koj mus ntsib qhov txuas no, nws yuav qhia koj li cas Sony LANC raws tu qauv ua haujlwm, thiab txhua cov lus txib thiab lub koob yees duab cov ntaub ntawv muaj nyob ntawm LANC raws tu qauv: https://www.boehmel.de/lanc.htm Raws li koj pom, koj tuaj yeem tau txais ntau cov ntaub ntawv los ntawm lub koob yees duab nrog rau kev tswj hwm txhua lub luag haujlwm ntawm lub koob yees duab ntawm LANC qhov chaw sib txuas lus. Kuv tus lej yog qhov yooj yim heev thiab cov ntaub ntawv.asm tuaj yeem thauj mus rau MPLAB (pub dawb los ntawm Micochip.com) thiab programmed siv PicKit2 heev yooj yim. Koj ua haujlwm li cas: Yog tias koj rub lub hauv paus chaws, nws tau sau tseg txhua txoj hauv kev los ntawm kev qhia koj tias muaj dab tsi tshwm sim, tab sis kuv yuav hais qhia luv luv ntawm no ib yam nkaus. Muaj 8 bytes ntawm LANC chaw nres nkoj txhua 20ms (16 6ms rau NTSC). Txhua qhov byte muaj Pib Pib tom qab 8 khoom, txhua qhov ntev ntawm 104uS. Muaj qhov sib txawv ntawm 200uS - 400uS nruab nrab ntawm bytes. Tom qab tag nrho 8 bytes tau 'tshwm sim' ntawm kab LANC, muaj qhov sib txawv ntev (5 - 8 ms) qhov twg LANC kab yog 'tuav' siab, thiab tom qab ntawd zoo ib yam 8 bytes 'tshwm' dua.- Thaum qhov haujlwm pib, nws tseem txheeb xyuas LANC cov tswv yim kom txog thaum nws 'pom' nws siab rau lub sijhawm ntev dua 1000uS, qhov no txhais tau tias peb nyob hauv qhov sib txawv nruab nrab ntawm 8 byte thiab thawj byte.- Tom ntej no txoj haujlwm tos kom pom Pib Pib (logic) 0) ntawm kab. Thaum qhov no tshwm sim qhov kev zov me nyuam tos rau 52uS (ib nrab qhov ntev me ntsis) thiab tshuaj xyuas dua kom paub tseeb tias tseem muaj qhov laj thawj 0 ntawm kab LANC. Yog li, peb paub tias peb muaj Qhov Siv Tau Pib Pib thiab npaj txhij nyeem cov byte.-Tam sim no peb tos 104uS (qhov ntev ntawm 1 ntsis), yog li peb yuav raug nyob hauv nruab nrab ntawm qhov ntxiv tom ntej ntawm kab LANC. Peb nyeem qhov no me ntsis, tos 104uS thiab rov nyeem dua. Qhov no txuas ntxiv rau txhua 8 qhov. Tam sim no peb muaj Byte 0.-Txoj haujlwm ntawd tos rau Pib Pib Tom ntej thiab ua haujlwm tib yam kom tau txais Byte 1, 2, 3, 4, 5, 6 thiab 7. Byte 4 yog qhov kuv siv hauv qhov program tau txais cov ntaub ntawv hais txog qhov xwm txheej kaw ntawm lub koob yees duab, tab sis raws li koj tuaj yeem pom hauv qhov txuas kuv tau muab, muaj ntau cov ntaub ntawv muaj! Txoj cai, uas yog nyeem kab LANC tham txog, dab tsi txog kev sau ntawv rau nws los tswj lub koob yees duab? - Thaum lub pob nyem, 2 cov ntawv sau npe tau ntim nrog cov bytes xav tau los ua lub luag haujlwm tshwj xeeb thiab sau npe hu ua 'Sender' tau ntim nrog tus lej 5 (Kuv yuav piav qhia vim li cas tom qab). Thaum qhov haujlwm tau mus rau 'npaj nyeem cov bytes' ib feem, yog tias sau npe 'Sender' tsis yog 0 nws hloov tus lej RA0 rau qhov tso tawm thiab pib tso tawm thawj byte. Tom qab ntawd nws zoo rau tom ntej Pib me ntsis thiab tso tawm tom ntej byte. Cov ntawv sau npe 'Sender' tau txo qis los ntawm 1 thiab RA0 tau hloov pauv rov qab mus rau cov lus nkag los nyeem qhov kawg 6 bytes. ob peb mus. Qee qhov chaw hais tsuas yog 3 qhov tsim nyog, tab sis raws li 1 lub voj voog tsuas yog siv 20ms, xa nws 5 zaug (kom nyob rau sab nyab xeeb) tsuas yog siv 100ms kom tiav. kaus mom hlau cams. Xav tias hloov pauv kuv cov cai kom haum rau koj cov kev xav tau, tab sis thov credit kuv rau tus lej yog tias koj tshaj tawm nws nyob txhua qhov chaw.

Kauj ruam 4: Hloov kho…

Hloov tshiab…
Hloov tshiab…

Kuv hloov kho qhov program hauv PIC kom nyem lub zog LED thaum lub roj teeb ntawm lub koob yees duab tseem ceeb qis thiab kom nyem cov ntaub ntawv LED yog tias daim kab xev nyob ntawm qhov kawg. Kuv tau ntxiv daim duab kab hluav taws xob tshiab thiab qhov chaws. Tsuas yog qhov sib txawv hauv daim duab kab xev yog Qhov xwm txheej LED (yog lub zog coj) tam sim no txuas nrog RA5 hloov +5v

Pom zoo: