• Herzlich willkommen im "neuen" DSLR-Forum!

    Wir hoffen, dass Euch das neue Design und die neuen Features gefallen und Ihr Euch schnell zurechtfindet.
    Wir werden wohl alle etwas Zeit brauchen, um uns in die neue Umgebung einzuleben. Auch für uns ist das alles neu.

    Euer DSLR-Forum-Team

  • In eigener Sache!

    Liebe Mitglieder, liebe Besucher und Gäste
    ich weiß, es ist ein leidiges Thema, aber ich muss es ansprechen: Werbung, Werbeblocker und Finanzierung des Forums.
    Bitte hier weiterlesen ...

  • DSLR-Forum Fotowettbewerb neu erfunden!
    Nach wochenlanger intensiver Arbeit an der Erneuerung des Formates unseres internen Fotowettbewerbes ist es Frosty als Moderator
    und au lait als Programmierer gelungen, unseren Wettbewerb auf ein völlig neues Level zu heben!
    Lest hier alle Infos zum DSLR-Forum Fotowettbewerb 2.0
    Einen voll funktionsfähigen Demowettbewerb kannst du dir hier ansehen.
  • Neuer Partner: AkkuShop.de
    Akkus, Ladegeräte und mehr (nicht nur) für Digitalkameras und Drohnen
  • Neuer Gutscheincode unseres Partners Schutzfolien24:
    DSLR-Forum2024
    Dauerhaft 10% Rabatt auf alle Displayschutzfolien der Eigenmarken "Upscreen", "Brotec", "Savvies".
    Der Code ist für alle Geräteklassen gültig.
  • Stimmt ab über die Sieger des DSLR-Forum Fotowettbewerbs April 2024.
    Thema: "Sprichwörtlich"

    Nur noch bis zum 30.04.2024 23:59!
    Jeder darf abstimmen!
    Zur Abstimmung und Bewertung hier lang
WERBUNG

Canon-EOS-Protokoll

Sehr interessantes Projekt.

Bei der 5D mit Tamron 28-75 ist mir aufgefallen, dass die Kamera sogar im "OFF"-Zustand mitbekommt, wenn der AF/MF-Schalter betätigt wird, denn die CF Lampe leuchtet beim Umschalten jeweils auf.

Auch sobald man das Objektiv losdreht merkt die Kamera das.

Zu den unbekannten Zahlen:
1. Gibt es eine Fokussierrichtung? Erst zu unendlich dann zurück bzw. andersherum? (gerade auch bei der Schärfesuche)
2. Schlichtweg verwirrende Mülldaten?
3. IS an, IS aus?
4. AF-Stopp-Taste?

Wird jetzt am Objektiv der AF/MF Schalter betätigt muss das die Kamera ja irgendwie mit bekommen, so zieht das Objektiv seine Datenleitung auf 0 und das bedeutet für die Kamera da will mir einer was sagen, ich lass mal die Clock laufen.

Technisch seid ihr da wesentlich weiter, als ich nur erahnen kann, trotzdem konnte ich vielleicht eine Idee geben.
 
Hi all,

sorry, i absolutelly speak no german (even if i learned it 2 years at school, but...), so if this not disturb you, i'll continue in (bad) english.

I am completelly interested in "discovering" Canon protocol. I'm using a DIY logic analyzer wich is not totally enaugh for that work, but it help quite well. I need to know how to drive aperture and focusing.

It sounds a little bit strange to me to "speak" in decimal. Anyway, as you, i found that :

0xA0 (160) request 2 bytes answer from lens : higher and lower value of focal lenght (direct decimal value in 16 bits, so 2x 8 bits)

0xCA (202) request i think 6 bytes answer : First and 2nd bytes are minimum focal lenght in 16 bits, 3th and 4th are the maximum focal lenght, in 16 bits too.

Maybe we can build a list of commands...

Thx.
 
0xA0 (160) request 2 bytes answer from lens : higher and lower value of focal length (direct decimal value in 16 bits, so 2x 8 bits)
I would call it actual focal length. Interesting only with zoom lenses.

0xCA (202) request i think 6 bytes answer : First and 2nd bytes are minimum focal lenght in 16 bits, 3th and 4th are the maximum focal lenght, in 16 bits too.
202 nor 0xCA is in my list. Minimum and maximum focal length is part of the "init" command (128 10 or 0x80 0x0A). The answer is: lensID (8bit), minimum focal length (16bit), maximum focal length (16bit), EOS language version understood by lens (8 or 16bit or perhaps bit pattern)

Maybe we can build a list of commands...
Is planed.
 
Sorry Nightshot, didn't see you got the 202... for me it's starting with the focal lentgth....

I maybe have an idea for aperture command, but i have to check it.... :ugly:
 
Ok... I was not sure because the 1Ds gives '19' and the 1000F '18'... so this is normal.... curious but apparently normal.... so what does mean bit 0...

And did you get informations for driving focusing ?

Is there any think i can do to help ?

Did you get the .176 (B0) function ?
I think it's in 3 bytes actual aperture, minimal aperture and maximal aperture, but not sure.
aperture value is IL*8.
f1 is 8 , f2,8 is 32 and so on.
For driving aperture, value is done in IL difference from max aperture, from the same logic, value is IL*8. Wide open value is 128 (0x80) ?
 
And did you get informations for driving focusing ?
68 followed by the number of steps in 16bit.

Is there any think i can do to help ?
At the moment I'm programming a lens simulator. This is necessary to find the last values. I don't think you can help without such a simulator.

Did you get the .176 (B0) function ?
I think it's in 3 bytes actual aperture, minimal aperture and maximal aperture, but not sure.
The first one I would call real aperture used for photometry, second is minimum aperture for display on camera and third is maximum aperture.
aperture value is IL*8.
f1 is 8 , f2,8 is 32 and so on.
For driving aperture, value is done in IL difference from max aperture, from the same logic, value is IL*8. Wide open value is 128 (0x80) ?
Correct.
 
Funny, i'm doing the inverse, something like a body simulator :D based on PIC microcontroller (very easy to find in much shops here, b:Dt also very easy to programm). I just have to check one detail because my communication with lenses is not ok... I think I have a little mistake at the end of 8 bits...
Seems to be pin out (Body2Lens) send 1 for 8 us, then pin in, and the lens send 0 until it is ready for next operation. Something like a busy status.

So do not hesitate to ask me any PIC programming ;)
 
68 followed by the number of steps in 16bit

Sure ? I saw body send 34 (0x22) then 16 bits value (distance or number of motor steps ? ), and 68 as a respons of the lens (3 times so) something like : i'm in af status...
I'll check, i'm maybe wrong.

For the lens id sentence, you are right. It starts with 128 (0x80)
Digital body sends just after 10 (0x0A) and 202 (0xCA).
Answer is 7 (or 8 ?) bytes. Second is lens id, but it is maybe linked also with first byte, because lens id in exif of the 15-85 IS is 488...
We have then max and min focal, ef protocol type, and 1 (or 2) value.
But i was disturbed because my old EOS 1000F send only 128 then six time 0 for 6 answers...
 
Seems to be pin out (Body2Lens) send 1 for 8 us, then pin in, and the lens send 0 until it is ready for next operation. Something like a busy status.
Correct. Look at the clock while the lens has to close aperture. This is busy.

So do not hesitate to ask me any PIC programming ;)
Good to know, which one are you using?

Sure ? I saw body send 34 (0x22) then 16 bits value (distance or number of motor steps ? ), and 68 as a respons of the lens (3 times so) something like : i'm in af status...
I'll check, i'm maybe wrong.
34 is not in my command list, it is 68. The 16bit value is the number of motor steps. With 192 you can read USM position counter and 80 changes the AF speed.

For the lens id sentence, you are right. It starts with 128 (0x80)
Digital body sends just after 10 (0x0A) and 202 (0xCA).
128 10 means: lens, please send me your parameters
What is followed afterwards is the camera ID. 148 1 is the Canon 5D and some other none EOS1.

Answer is 7 (or 8 ?) bytes. Second is lens id, but it is maybe linked also with first byte, because lens id in exif of the 15-85 IS is 488...
Interesting. The 15-85 is the first lens with an ID higher than 255. Do you have one for testing?

We have then max and min focal, ef protocol type, and 1 (or 2) value.
But i was disturbed because my old EOS 1000F send only 128 then six time 0 for 6 answers...
I have only an old EOS500 but not looked for the camera ID.
 
Good to know, which one are you using?

I have several models.
For the moment, i am prototyping with PIC16F887 @ 4Mhz, it's enough, even if 8 MHz is internally possible, because i linked a little lcd screen for messages and showin values.

Interesting. The 15-85 is the first lens with an ID higher than 255. Do you have one for testing?

Not me directly, but i can ask my friend to give it to me for some period for measurments... In fact, i can do it in 5 mn, so next time i see him, i'll ask it ;)
 
I made some other measurements, and you were right nightshot. AF command is 68, I probably forgot a 0 at the end....

Something is also curious to me.
The 176 command (B0) gives me sometime for answer 36 then 0. The body sends again 176 command wich gives aperture informations... This during focusing.
Did you see that also ? af status ?
I don't know if it is clear on the picture...
Anhang anzeigen 1297049
 
No, AF status is integrated in the global status command 144. The answer of 176 can change when the aperture chances with focus position. This is common for macro lenses.
 
Okey....

My first prototype of lens controller is set.
It just consist for the moment to read focal length and to show it on a lcd screen.
Based on a PIC16F887 and a Toshiba HD44780 chiped screen.
Made to be fitable on any PIC, from 10 series to 18.

If needed .... ;)
 
194 (0xC2) gives the focusing distance in cm, coded on 16 bits (2x8 bits). Works only with usm lenses. Micro-usm didn't get that function.

I don't understand the 224 function. It's coded on 16 bits, but is linked to zooming only ? (oops... i maybe did'nt try with usm lens...)

before focusing i have this sentence :
224
232 or 234
sometimes 228
80 status on 300D, nothing on the old 1000F
and 68 af function.

Some functions don't work if you don't have a 10 (0x0A) calling... something like "ready to get orders" ?
 
194 (0xC2) gives the focusing distance in cm, coded on 16 bits (2x8 bits). Works only with usm lenses. Micro-usm didn't get that function.
It's independent of the used USM, it depends on ETTL2 ready or not. In the init command you get the last two bytes which specify the EF version understood by the lens. For the 194 command you need at least version 4.

I don't understand the 224 function. It's coded on 16 bits, but is linked to zooming only ? (oops... i maybe did'nt try with usm lens...)
224 is lens extension coefficient. This is needed to do the conversion between measured phase difference of the AF module and motor steps to go.
To understand this, is the project I'm working on at the moment and I can tell you it's hard work. The value is signed 16bit and the last 3bits of the high byte have to be inverted if the value is negative. Sounds strange??? Then you need log10 to get it linearized and two scaling factors which I'm trying to figure out.

Correction factors for 224 to make it more complicated.

Not understood.

80 status on 300D, nothing on the old 1000F
AF speed.
 
It's independent of the used USM, it depends on ETTL2 ready or not. In the init command you get the last two bytes which specify the EF version understood by the lens. For the 194 command you need at least version 4.

Strange... it's ok on the 35-135 usm, version 4, but doesn't work on the 35-105, ver. 4 too, but micro-usm.... i'll check it.... :confused:

224 is lens extension coefficient. This is needed to do the conversion between measured phase difference of the AF module and motor steps to go.
To understand this, is the project I'm working on at the moment and I can tell you it's hard work. The value is signed 16bit and the last 3bits of the high byte have to be inverted if the value is negative. Sounds strange??? Then you need log10 to get it linearized and two scaling factors which I'm trying to figure out.
Inversion of lasts 3 bits of high byte ? ... yes curious... too curious...

As my PIC lens controller is ready with its lcd screen, you can ask me any measurements you need.
 
As said, af drive is given in numbers of motor steps.
You have positive and negative values using the 2's complement (see http://en.wikipedia.org/wiki/Two's_complement ).
The sign will not give you go front or go back, but turn clockwise or counter-clockwise to the internal motor. That means that on some lenses positive value will go to infinite, and on others to minimal focus.
There must be a bit that say the rotation direction, but i don't know where...

There must be also somewhere the definition of the maximal number of steps. On some lenses, you can reach quickly the infinite, and on others, you need more steps.

I still don't know how the lens says to body that end position is reached...

to be continued...
 
oops, sorry, i was wrong, positive values goes to infinite, and negative to closer.

Concerning 224 function, i find out that the respons is 2 bytes and not 1 16bits byte.

* The first byte gives the focal length... !!!! I have no lens over 135mm :D but i can imagine that over 255mm it will give 0xFF... don't know.
* Second byte is still unclear...
On ef and micro-usm, it's always the same, value depending on focal length, but not always the same. 35-105 gives 0x3D @ 50, and the 50 II gives 0x40...
For pure usm lenses, the second byte is corrected also by focus distance... @ 50mm, it goes from 0x34 to 0x39 (@48, it goes also from 0x34 to 0x39).
But the 24-70 2,8 gives me crazy informations for that second byte... from 0xC7 to 0xBA, but not linear... sometimes up, sometimes down... :ugly:

hmmmm forget that, mistake is mine in programming... sorry

Let's go for other functions....
 
Zuletzt bearbeitet:
For the lens id function 0x80 0x0A (128 10),

*i have first byte 0x95 for usm lenses, and 0x85 for the 50 II
* for the 7th byte, it's 0x04 for EF and micro-usm lens, 0x07 for usm, and 0x67 for the 24-70 2,8
in bin, that gives :
0x04 : 00000100
0x07 : 00000111
0x67 : 01100111

So, maybe bit 2 means af able, bits 0 and 1 like distance possible (for function 194, wich works only with pure usm lenses) and modify focusing able. The 24-70 have 2 bits enable more...
 
WERBUNG
Zurück
Oben Unten