Digital EOS Protocol
Digital EOS is using modifier SPI protocol. Modified is CLOCK signal where after each packet is CLOCK driven LOW for at least 78us to separate packets. Data are read on CLOCK rising edge and receiving side always drive its data pin LOW during reception.
Below is quoted post from Hans, original link https://pickandplace.wordpress.com/2011/10/05/canon-ef-s-protocol-and-electronic-follow-focus/#comment-402 (thanks Elliot for link), anyway it may be useful for deeper protocol commands decoding:
This is the a log from an EOS500 and a EF100LIS lens The lens is much newer than the Body, and it’s therefore expecting a “newer” startup sequence than used by the body You wil HENCE not find a lens info sequence like the one at the top.. *Telegram DCL DLC 0x000000 0A FF ;Sync command 0x000001 00 AA ;Sync reply 0x000002 90 FF ;Note the lens ignores 0x000003 B9 FF ;all further coms until 0x000004 00 FF ;the second sync command 0x000005 12 FF ;@ telegram #13 0x000006 80 FF 0x000007 B0 FF 0x000008 00 FF 0x000009 00 FF 0x00000A 00 FF 0x00000B A0 FF 0x00000C 00 FF 0x00000D 00 FF 0x00000E B2 FF 0x00000F 00 FF 0x000010 00 FF 0x000011 00 FF 0x000012 80 FF ;The body tries to ask for lens info 0x000013 0A FF ;using 80 0A 00 00 00 00 00 00 0x000014 00 AA ;but since the lens is not correctly 0x000015 00 00 ;initiated according to a newer 0x000016 00 00 ;version of the EOS protocol 0x000017 00 00 ;it mistakes the 0A for a sync 0x000018 00 00 ;command, replies with an AA 0x000019 00 00 ;and starts up (replies with 00) 0x00001A A0 00 ;The body ask for current Fl 0x00001B 00 00 ; 0x00001C 00 64 ;Lens answers 00 64 = 100mm 0x00001D B2 00 ;Don’t know what the B2 command 0x00001E 00 60 ;is but it relates to change 0x00001F 00 00 ;in aperture on zooms 0x000020 00 01 0x000021 0C 00 0x000022 C0 0C ;Request current position of focus group 0x000023 00 00 ;reply is 16 bit signed int 0x000024 00 00 0x000025 F0 00 ;Unknown 0x000026 00 60 0x000027 0E 00 ;Some sort of init sequence id 0x000028 0F 0E ;same… 0x000029 0A 0F ;Sync command 0x00002A 00 AA 0x00002B 90 00 ;Status request command first byte 0x00002C B9 00 ;same.. second byte 0x00002D 00 00 0x00002E B0 00 ;Aperture info 0x00002F 00 30 ;Display Av 0x000030 00 20 ;Min Av 0x000031 00 58 ;Max AV 0x000032 A0 00 ;Request Fl 0x000033 00 00 0x000034 00 64 0x000035 B2 00 ;Unknown 0x000036 00 60 0x000037 00 00 0x000038 00 01 0x000039 0C 00 0x00003A C0 0C ;Request focus position 0x00003B 00 00 0x00003C 00 00 0x00003D F0 00 0x00003E 00 60 0x00003F F8 00 ;Best Focus Correction value 0x000040 00 D3 0x000041 50 00 ;Set speed 0x000042 2D 50 0x000043 0C 50 0x000044 06 0C 0x000045 0F 06 ;Search toward MFD @ set speed 0x000046 0A 0F ;Sync command 0x000047 00 AA 0x000048 90 00 ;Status request command first byte 0x000049 B9 00 0x00004A 00 10 ;status reply: lens at end stop 0x00004B B0 00 0x00004C 00 30 0x00004D 00 20 0x00004E 00 58 0x00004F A0 00 0x000050 00 00 0x000051 00 64 0x000052 B2 00 0x000053 00 60 0x000054 00 00 0x000055 00 01 0x000056 F0 00 0x000057 00 60 0x000058 90 00 ;Status request command first byte 0x000059 B9 00 0x00005A 00 10 ;status reply: lens still at end stop 0x00005B 0C 00 0x00005C 05 0C 0x00005D 0F 05 ;Search toward INF @ set speed 0x00005E 0A 0F ;Sync command 0x00005F 00 AA 0x000060 90 00 ;Status request command first byte 0x000061 B9 00 0x000062 00 24 ;focus group is moving and accelerating 0x000063 B0 00 0x000064 00 30 0x000065 00 20 0x000066 00 58 0x000067 A0 00 0x000068 00 00 0x000069 00 64 0x00006A B2 00 0x00006B 00 60 0x00006C 00 00 0x00006D 00 01 0x00006E F0 00 0x00006F 00 60 0x000070 90 00 0x000071 B9 00 0x000072 00 04 0x000073 C0 00 ;Request focus position 0x000074 00 00 ; 0x000075 E0 5E ;focus position = 00 5E 0x000076 00 BC 0x000077 00 15 0x000078 C0 00 ;Request focus position 0x000079 00 01 ;focus position = 01 CB 0x00007A E0 CB ;Lens extension correction 0x00007B 00 BC 0x00007C 00 E4 . . . . . As for the 44 command not being used (a bit further down in the same log): 0x00014E 90 00 ;Status request command first byte 0x00014F B9 00 0x000150 00 00 ;status reply: focus group at rest 0x000151 F8 00 0x000152 00 AC 0x000153 E0 00 0x000154 00 BD 0x000155 00 11 0x000156 EA 00 0x000157 00 A3 0x000158 00 D7 0x000159 00 8C 0x00015A 00 04 0x00015B 00 00 0x00015C 00 00 0x00015D E4 00 ;Lens extension factor 0x00015E 00 A1 0x00015F 00 C6 0x000160 44 00 ;Move focus group 0x000161 06 44 ;06 01 = 1537 steps 0x000162 01 44 ;toward INF 0x000163 0F 44 0x000164 0A 0F 0x000165 00 AA 0x000166 90 00 ;Status request command first byte 0x000167 B9 00 0x000168 00 24 ;status reply: focus group moving + acc . . . For comparison here’s the start up of the same lens with a 650D DSLR body The key difference is that this body does not send the lens info 80 0A command until after it has sent the 0A sync command twice and the lens therefore does not mistake the second byte of the 80 0A telegram for a sync command… 0x000000 00 FF 0x000001 0A AA 0x000002 00 AA 0x000003 0A 00 0x000004 00 AA 0x000005 80 00 0x000006 0A 81 0x000007 98 FE 0x000008 01 00 0x000009 00 64 0x00000A 00 00 0x00000B 00 64 0x00000C 00 77 0x00000D 00 9A 0x00000E 14 00 0x00000F 7F 02 0x000010 01 72 0x000011 00 B9 0x000012 94 00 0x000013 41 FF 0x000014 B0 00 0x000015 00 21 0x000016 00 20 0x000017 A0 58 0x000018 00 00 0x000019 E4 64 0x00001A 00 A1 0x00001B 68 C6 0x00001C 93 F0 0x00001D 04 93 0x00001E 05 93 0x00001F 0A 93 0x000020 91 93 0x000021 86 00 0x000022 00 00 0x000023 00 04 0x000024 0C 00 0x000025 0F 0C 0x000026 0A 0F 0x000027 00 AA ……. And btw, I do not think you are really seeing a C2 command as it relates to the TTL2 distance used by much newer bodies than the EOS500 ~ hans ~
Following informations, software, hardware and procedures are not official and can damage your equipment or cause injury. Be aware of this as I'm not responsible of how you will use following material. I made this based on my own requirements to bring my old lenses (most of them from ebay) back to life. Till now nothing was damaged by this modification in my hands, but I can guarantee any third party usage.
Also please note that this SW was tested on my lenses and camera body which I had in time of writing, I can't guarantee that it will work on every combination of equipment on the world. I will be happy to cooperate with others and tune SW for maximum performance but at moment it is doing what I need.
|Logic analyzer output using SW v.1.0.0 . Trace 1 - clock, trace 2 - data from camera to interface, trace 3 - data from interface to lens|
Because camera is powering MCU even turned off, it was important for me to reduce power consumption. To achieve this I choose newer low power MCU and add sleep timer, if there are no incoming data for 5sec MCU is put into power down mode.
Important part of program is timeout value which depends on bus speed and duration between packets. For EOS 450D, 550D and 50D which I was able to test was CLOCK frequency 78kHz and duration between packets was 230us. For proper packet separation was chosen 150us. But if there are some "faster" cameras from Canon it will be necessary to lower this value.
|Interface development, EOS 450D, Sigma 28-70, Saleae analyzer, AVR Dragon and one mad man.|
I choose smallest MCU from Atmel to fit hardware into most lenses (and some of them really lacks some free space) ATTINY10. It have also much smaller power consumption in active state against ATTINY24A and in power down mode it consumes few uA. As you can see below, difference is significant. Oscilloscope plot of VDD voltage is here if someone will be interested.
Power consumption measurement fclk=8MHz:
ATTINY24A - 7.3mA active, 3mA sleep.
ATTINY10 - 2.85mA active, 0.022mA sleep.
Because this MCU have size 3x3mm including leads it is nearly impossible to produce reliable design only with wire work. Because of this I created two versions of PCB (model A for vertical and model B for horizontal installation).
|If you like you can order boards on e-mail||.|
Both models are available with programmed MCU. You will get PCB board assembled with programmed MCU and capacitors, I'm not responsible for installation into lens and effect of this board on lens or camera body. This is very tiny board which can be very easily soldered improperly which could cause camera or lens damage.
Total price is 14EUR for 1 board including regular shipping (Or 17EUR including registered shipping with tracking number). Outside EU is shipping +1EUR. Paypal fee is paid by buyer. Shipping is combined for multiple boards and quantity discount for larger volumes, please ask for price.
Of course it is possible to send your lens to me and I can do modification for you. Please contact me on e-mail above for more details.
This is not a business, I'm offering boards for nearly production costs for others to give them possibility to modify their lenses, please keep that in mind.
|Atmel ICE Basic programmer/debugger|
Both boards are double sided and designed to solder directly to lens connector pins. Actual size and photos of installed boards will be as soon as board will arrive from manufacture.
Because ATTINY10 supports only TPI interface for programming (not PDI), you have to check if your actual programmer supports that in case you want to program MCU by yourself. As far as I found following programmers should support it:
- Atmel ICE Basic
- AVRISP MkII
I have to remind you again, boards are as tiny as was possible, proper soldering skills are required to accomplish this successfully.
Model A board installation on Sigma 28-70 2.8-4:
Model B board installation on Sigma 28-70 2.8-4:
Model B board installation on Sigma 28-70 2.8:
For more photos CLICK HERE.
Till now was successfully installed 15 boards. I want to thank all the people who share their experiences with my boards and allow me to do this compatibility chart:
|Canon EOS body|
|7D MK II|
|5D mk II|
|5D MK III|
|1D MK II|
|1D MK III|
|1Ds MK II|
|1Ds MK III|
|Sigma 28-70mm f2.8|
|Sigma 28-70mm f2.8-4|
|Sigma 70-210mm f2.8|
|Sigma HSM APO Macro 400mm f5.6|
|Sigma APO AF Macro 400mm f5.6|
|Sigma APO AF 500mm f4.5|
|Quantaray macro 50mm f2.8|
|Sigma APO AF 500mm f7.2|
|Sigma AF 18mm f3.5|
|Sigma APO AF Macro 300mm f4|
|Sigma APO HSM AF Macro 300mm f4|
|Sigma 100-300mm f/4.5 –f/6.7 UC Zoom|
|Sigma 28-105mm f/4-f/5.6 UCII|