热re99久久精品国产99热-热re99久久精品国99热-热re99久久国产精品-热re91久久精品国产91热-热er99久久6国产精品免费-热99这里只有精品

世界播報:佳能EF鏡頭SPI控制
2023-05-31 01:25:19 來源:面包芯語 編輯:


(相關(guān)資料圖)

使用廉價的MCU,搭配SPI協(xié)議驅(qū)動你的佳能攝像頭。逆向Canon EF卡口鏡頭,這個是昨天的文章。ASCOM EF Lens Controller – control unit for Canon EF/EF-S lenses. It allows you to control lens using the ASCOM platform tools.Features (supported by driver):focus control;aperture value control;temperature measure (additional sensor required, e.g. popularDS18B20).This device uses SPI interface. Description of lens commands were taken from published articles about reverse engineered internal Canon protocol.Connection to lens is easy. It is only necessary to know pinout of itscontacts. This information is available on the Web. Just ?google? canon efpinout. I recommend to use a scheme, shown below.This picture describes electric pins on lens or special macro-adapter which issuitable for soldering wires. You can buy adapters in any photo shop or onweb stores such as EBay. It looks something like this.Next component – microcontroller, which support SPI interface. It may beATmega, STM32, PIC or board, based on its controllers. Factory PCB has allrequired components and will be easy for beginners while simplemicrocontroller allows you to make own custom device.I used Arduino Nano based on ATmega328P controller. Its performance isenough for our purpose. Small size and low cost - its advantage.Pinout diagram above shows the designations of Arduino Nano contacts. Sowe need:Note: only huge lenses may require external power supply. I tested mylenses (EF-S 18-55, EF 50/1.8, EF200/2.8L) and measured their currentconsumption. It was less than 200 mA. It means that these lenses can bepowered directly from 5V Arduino pin. Entire system will be powered fromUSB, and there is no need for additional wires.You can experiment on the breadboard but for the final design it is better touse a more respectable solution.I want to point out one feature associated with Arduino. Now, these boardsuse the Automatic (Software) Reset, which is convenient for firmware uploadbut do not really need us. The fact is that:One of the hardware flow control lines (DTR) of the FT232RL is connected to thereset line of the ATmega168 or ATmega328 via a 100 nanofarad capacitor. Whenthis line is asserted (taken low), the reset line drops long enough to reset the chip.This means that each connection (?Connect? button in MaximDL orFocusMax) to the device will cause it to reboot. Result is 3-5 sec delay. Ifyou are not satisfied, simplest solution is to unsolder DTR pin to preventtransfer of reboot signal. I used ?ChinaDuino?, it has CH340G as UART chip.Original Arduino uses FT232RL.These schemes allow you to easily find the DTR pin. After making thesechanges, device connects immediately.SoftwareSoftware consists of two main parts:Arduino sketch (firmware) is responsible for interaction with lens;ASCOM device driver.Unit relations shown in the figure below:The red highlighted functionality implemented in addition to the mainfunctions realized in driver pattern. Focuser driver has no iris controlfunctions by default. But aperture value control is important feature.代碼使用我就不寫了,后面我會上代碼:Use P# to get current focus position (5000 by default)Use Mxxxx# to move focus, e.g. M5270#Use Axx# to change aperture value, where xx – count of steps (1/3EV). 0 – wide open on your lens.

下載這個控制軟件,有一種年老失修的美

ASCOM

Click ?Properties?, you can see driver setup dialog. Set requiredparameters:

COM Port Number – controller connection port;

Lens Model – choose your lens from drop-down list. In fact youcan use any lens. Just add it to lens.txt which is in driverinstallation folder and insert all aperture values of lens;

Aperture Value – select required aperture value. Changes will besaved in EEPROM of Arduino chip.

After all changes are saved, you can connect to the controller.Temperature will be displayed only if you connect a sensor. I usedanalog KTS-1 sensor. GET TEMPERATURE section in my sketch work with this sensor. You can use any other. Do not forget to correct your sketch. If you do not need to measure temperature just comment this strings.

關(guān)鍵詞:

相關(guān)閱讀
分享到:
版權(quán)和免責(zé)申明

凡注有"環(huán)球傳媒網(wǎng) - 環(huán)球資訊網(wǎng) - 環(huán)球生活門戶"或電頭為"環(huán)球傳媒網(wǎng) - 環(huán)球資訊網(wǎng) - 環(huán)球生活門戶"的稿件,均為環(huán)球傳媒網(wǎng) - 環(huán)球資訊網(wǎng) - 環(huán)球生活門戶獨家版權(quán)所有,未經(jīng)許可不得轉(zhuǎn)載或鏡像;授權(quán)轉(zhuǎn)載必須注明來源為"環(huán)球傳媒網(wǎng) - 環(huán)球資訊網(wǎng) - 環(huán)球生活門戶",并保留"環(huán)球傳媒網(wǎng) - 環(huán)球資訊網(wǎng) - 環(huán)球生活門戶"的電頭。

主站蜘蛛池模板: 亚洲精品青青草原avav久久qv | 无人在线观看免费高清视频播放 | 艹b视频在线观看 | 男女男在线精品网站免费观看 | 男人把大ji巴放进女人小说 | 国内精品自产拍在线观看91 | 成人涩涩屋福利视频 | 美女全身体光羞羞漫画 | 国产精品久久免费 | 四虎免费在线观看视频 | 天天综合色网 | 亚洲精品第一国产综合 | 亚洲国产天堂久久综合网站 | 国产精品久久久久这里只有精品 | 97色资源| 日本乱子| 亚洲成人影院在线 | 欧美伊人影院 | 毛片在线网址 | 美女扒下内裤让男人桶的图片 | ai换脸杨颖啪啪免费网站 | 青青草国产精品久久久久 | 亚洲AV久久无码精品九号 | 国产精品高清一区二区三区不卡 | 精品国产美女福利在线 | 四虎影院网址大全 | 黑人biglackon10十 | 久久全国免费久久青青小草 | 精品国产一区二区三区久久久蜜臀 | 人人干97| 日本激情网站 | 青草青草久热精品视频在线网站 | 好吊色青青青国产综合在线观看 | 国产成人免费高清激情视频 | 99精品国产自在现线观看 | 四虎一影院区永久精品 | 国产一区二区三区在线 | 国产一卡2卡3卡四卡精品网 | 夫承子液by免费阅读 | 国产精品一区二区在线观看完整版 | 国产一区精品 |