EOS Lens protocol analyse - anybody intresting? - page 3 - DSLR Hack development - CHDK Forum

EOS Lens protocol analyse - anybody intresting?

  • 44 Replies
  • 40524 Views
*

Offline _MAG_

  • *
  • 47
Re: EOS Lens protocol analyse - anybody intresting?
« Reply #20 on: 05 / September / 2008, 01:28:08 »
Advertisements
all this info i got from IXBT forum. I not sure about safety of my cable. I dont use him.
I close my seaching becouse Seklth say me:
focus and focus confirmation - it is stand-alone module. All info to this stand-alone module transfered by digits. All what firmware do - send comand to this module. What this command do, their lenght.. and all others  is uknown.

Now i working to remowe all unwanted parts from my kit. yesterday i found small part - their closing contacts and limits maximal aperture while you use zoom.
So if remove this part and close contact manualy you  receive zoom with maximal stable aperture 3,5.
Maybe canon do this becouse  80 zoom and 3,5 aperture give big cromation and distorsium - i dont know, i cant re-assemble my kit lens.

Re: EOS Lens protocol analyse - anybody intresting?
« Reply #21 on: 25 / September / 2008, 13:25:14 »
Hello all, I also want to decrypt canon's eos lens protocol for the sole purpose of mounting non-af lenses over special adapters (like M42-EOS). I think that activating the AF-assist via firmware or chdk is the best option because emulating a real lens is very hard (even sigma had problems with some early lenses because of bad reverse engineering).

For some days now I've been trying to get a good look of how the protocol works, but unfortunately hadn't had the necessary tools. I'm probing a 'dandelion' chip from a russian M42-EOS adapter with focus assist which i've connected to a very basic logic analyser.

The analyser is microchip's PicKit 2 uC programmer and it's very limited, with only 1000 samples. From the data I've collected so far (basically pictures of the waveforms since it doesn't have the advanced data-saving and analysing capabilities of REAL logic analysers) it seems that there's an initial chatter between the lens and the body when they're first connected and also when the shutter button is half-pressed. The communication lasts for a couple of SECONDS (at least when the shutter is half pressed), so I can't fully record it.

If any of you are interested to see some of these waveforms... I'll post them, but frankly I don't see how they'll help anyone. As I've stated before, the activation of AF over firmware seems to be the best option given the complexity of doing a hardware emulation.

Cheers ;)

*

Offline _MAG_

  • *
  • 47
Re: EOS Lens protocol analyse - anybody intresting?
« Reply #22 on: 26 / September / 2008, 07:17:43 »
Try to connect OLD canon lens if you have it. Old lens have older protocol with smaller speed.
I sink you see something like "respond".
Analyse this chip this chip is easier way becouse this chip emulate fix-focal lens (45 mm??) with  constant apperture (1.4 ??) in manual focus mode.
I sink need big digital analyser becouse need measure 3 pins simultaneously.
Example (i sink happen somthing like this):
data clock set some value (it is command to chip ready to get data (lens))
data thasfer from body to lens (request id?)
data clock set another value (ready to  get data from lens)
data thasfer from lens to body (lens name, id and outher)
body activate focus confirm

Re: EOS Lens protocol analyse - anybody intresting?
« Reply #23 on: 03 / October / 2008, 14:22:30 »
Well, the logic analyzer has 3 inputs but the problem is that its buffers is not large enough. I'm attaching the output from the lens-body comm when the shutter button is half-pressed.

The waveforms are in this order:

LENS->BODY
BODY->LENS
CLOCK

As you can see, the logic levels are inverted (they stay on 5V all the time) and when something happens, the body signals the lens to begin communication. I don't know what protocol is this, the clock signal is somewhat weird, but it does transmit 8bit commands. Sometimes the body and the lens transmit at the same time... I don't know why is that. These images would be useful for someone who has experience in this area, but again, they're only a fraction of the data sent.

There are 4 windows in this image (I used the 'delay sampling' command, thus the data is continous) and each one is 4ms long, sampled at 250KHz (there is some aliasing present, this would be prevented by sampling at 1MHz or more).

Hope this helps :)


Re: EOS Lens protocol analyse - anybody intresting?
« Reply #24 on: 07 / October / 2008, 23:15:41 »
hash, would you please to share with us on how did you connect the logic analyser and the mount? I have a high-end logic anaylzer to record the large amount of samples, and try to capture the data communications between a Canon 300D body and a EF-S lens.

Re: EOS Lens protocol analyse - anybody intresting?
« Reply #25 on: 12 / October / 2008, 12:35:10 »

*

Offline _MAG_

  • *
  • 47
Re: EOS Lens protocol analyse - anybody intresting?
« Reply #26 on: 13 / October / 2008, 01:46:05 »
If you have broken lens you can dismount rear part and connect directly to pins by cable (see eos_adapter.jpg). Original canon lens have small holes (for debug?) in pins (rear part of lens)

*

Offline dzsemx

  • ****
  • 302
  • [SX40HS][A650][A630]
Re: EOS Lens protocol analyse - anybody intresting?
« Reply #27 on: 13 / October / 2008, 10:09:27 »
The analyser is microchip's PicKit 2 uC programmer and it's very limited, with only 1000 samples. From the data I've collected so far (basically pictures of the waveforms since it doesn't have the advanced data-saving and analysing capabilities of REAL logic analysers) it seems that there's an initial chatter between the lens and the body when they're first connected and also when the shutter button is half-pressed. The communication lasts for a couple of SECONDS (at least when the shutter is half pressed), so I can't fully record it.
last year i made an aquisition board type application with the pickit2 programmer,
using CDC mode (serial port emulated), with transfer rate of around 12000 samples/sec on two channels.
needs no external components if you work within 0-5 volts on the inputs.
the pc application can only shows the waveform at (almost) realtime, but it's quite easy to write a funtion to save the transfer bufffer into a file... do you need it? :)
« Last Edit: 13 / October / 2008, 10:19:40 by dzsemx »


Re: EOS Lens protocol analyse - anybody intresting?
« Reply #28 on: 14 / October / 2008, 09:00:17 »
What's the sample data rate on that? If it's equal to the transfer rate, then I'm afraid 12000 samples/sec won't do the job. The waveforms I posted are at 250Ks/s and there's some aliasing on those so I reckon a minimum of 500k-1Ms/s will be needed.

*

Offline dzsemx

  • ****
  • 302
  • [SX40HS][A650][A630]
Re: EOS Lens protocol analyse - anybody intresting?
« Reply #29 on: 18 / October / 2008, 08:55:52 »
well with analogic data i reached this transfer/sample rate (internal ADC has about max 60 ksample/sec)
with external ADC theoretically i can reach above 200ksample/sec with reduced resolution.
with digital inputs 500 ksample is posssible but never tried (need to write really lightweigth interrupt routine)
« Last Edit: 18 / October / 2008, 09:02:01 by dzsemx »

 

Related Topics