There is plenty of articles and forums threads regarding 6bit coding of Leica M mount lenses. It takes time searching and navigating through all that info though, which I was doing over last few months. In this article I'm going to condense and structure together most important key points, which should hopefully save you some time and help to avoid common mistakes if you choose to DIY 6bit code your lens.
A bit of a history
First of all I'd like to first thank to people who started exploring possibility of DIY 6bit coding since the time Leica M8 appeared. If you are curious - here's a great thread on Leica Forum started in 2006 - Proof of concept regarding self coding of lenses (note, to see pictures you need to register there).
Over time many custom paper/cardboard (M8 Coder on BoPhoto) and later plastic cut stencils appeared available, in DIY and also commercial formats. One of the most well known commercial kit was made by Match Technical and called M-Coder. It's hard to find one these days since they got discontinued years ago.
Fortunately the new era of accessible 3D printing opened new opportunities. I'd like to thank the author of 3D printable model called
Leica M Coding Tool on Printables. These days it's very cheap to print, or order online from the companies providing 3D print service - pure cost of material/printing of such template starts from only about $1 (depending on the print material). Also thanks to Fred Miranda who pointed attention to this template, which made me give it a try. Perhaps it was print precision or something else but I ended up designing a brand new 3D model for 6bit coding using as a reference Leica 90mm F2.8 lens, making it with much higher precision of 6bit sockets. The resulting
3D model of more precise 6bit coding template can be also downloaded for free personal non-commercial use from Printables.
Leica M - 6bit Lens Detection system
There are few important points about how Leica M cameras are scanning 6bit code from the lens mount.
Yes, there is a sequence of six black/white painted sockets. Leica M camera mount has dedicated sensor with six elements reading paint color next to it.
What many people may not notice is - earlier Leica M cameras had 6bit sensor cells positioned in a straight line. The latest Leica M10 / M11 camera models have sensor cells positioned in a curve (same distance to mount center). That is why black/white 6bit sockets are not circles but having rectangular shape with rounded corners (and actually slightly wider edge near lens mount border).
When ANY lens has particular sequence of black/white paint next to Leica M 6bit sensor - camera is reading that code and mapping it to camera internal database of lenses. For that "Lens Detection" should be set to "Auto" in camera settings.
NOTE: some Leica M cameras require latest firmware update to recognize latest produced Leica M lenses (or codes of that lenses).
List of 6bit codes for Leica M lenses
When you find and read some article on 6bit Leica M lens coding, typically the list of lenses is relatively short and is not covering all possible code combinations (which are only 64 for 6 bits).
Thanks to many people on Leica Forum and FredMiranda forum (and many other resources, since it took more than decade of collecting and documenting all codes) there is almost a complete list available. Thanks to Thury from FredMiranda forum for compiling one of the most complete version of codes list I saw.
This list was used as a start reference, then a bit of research of lenses pictures on markets allowed to enhance the list to even more complete form. You may find online document of the list re-compiled here: sorted by lens
192 combinations of 6bit coding
In fact there are 192 codes available, not just 64. The answer was right on the surface when we found that same "001100" code is used for coding of two different lenses:
- Leica 35mm F1.4 Summilux-M Steel Rim Reissue
- Leica 90mm F2.2 Thambar-M
The key here is the lens focal length difference, involving the Leica M mount mechanically triggering another set of framelines.
I practically tested the assumption with Leica M10-P body and CV 35mm F1.4 II S.C 6bit coded to "001100". When lens is mounted on camera it is selecting 35/135 framelines by the lens mount.
With that I can also move framelines lever and observe how lens is then re-detected by camera in a second after switching to other frameline size:
35/135 - "1.4 / 35mm"
55/75 - "Uncoded"
28/90 - "2.2 / 90mm"
Leica M digital body is reading selected framelines and using that for choosing combination of 6bit code and framelines value in lens database. It's making effectively 3x64 = 192 total unique combinations can be stored in the lens database.
Lens mount compatibility with 6bit coding - flat surface
Shortly saying - flat surface of lens mount does not allow to perform 6bit coding. Any layer of paint added on top of such lens mount surface will be scratched off and ruined by Leica M camera mount.
To address this limitation some third party companies are manufacturing lens mount replacements with pre-machined sockets for 6bit coding. Though the challenge is to find lens mount replacement with:
- same mount thickness
- it only works for lenses that have easy detachable lens mount ring with flat inner surface
- mount bolt sockets should fit the lens mounting sockets
- mount ring should have adjustment for particular Leica M frame lines closer to adapted lens
Another way is to request 6bit coding of flat mount by machining sockets directly on it in professional lens repair shops who can provide such service.
Easy DIY 6bit coding options
Many third party Leica M mount lenses produced by one of the oldest and reputable Cosina company (Voigtlander and Carl Zeiss) have mount ring with groove. Fortunately that groove is positioned right next to latest models curved 6bit sensor of Leica M cameras. It is allowing to simply adding very thin layer of black/white paint (often adding only black paint works well too).
That is perfect scenario where minor cost investment is required to 6bit code your Leica M mount lens. You can 3D print (or order print) of the 6bit coding template, purchase recommended opaque black color paint marker, and apply paint inside the lens mount groove.
Mapping third party Leica M mount lens to Leica lens
Usually people are choosing 6bit code of lens that has similar focal length and max aperture matching the lens to be coded. In most cases it's good idea, though practical shooting is showing that sometimes vignette correction of different Leica lens may fit better.
Self-centering 6bit coding template
UPDATE (June 13 2024) typical C-shaped 6bit coding template has one significant design flaw - if you print it with slightly increased/decreased inner diameter, the position of 6bit sockets will be slightly radially shifted on lens during coding. It may result to incorrect 6bit code detection by camera.
To address this flaw I was working on self-centering design of 6bit coding template. It's based on full circle frame and allowing to very precisely control future position of 6bit code on lens.
Current prototype is tested on large number of Voigtlander lens + Leica M10P camera with 100% rate of correct 6bit detecting. On the right side there is a lock pin area that need to be slightly bended after 3D printing, to catch the lens mount lock socket. That lock is allowing visually control radial centering of 6bit template ring.
TO BE CONTINUED. . .