Converting to a Coded M Lens Mount

Last updated on March 21, 2013


  1. Introduction
  2. Installation
  3. Testing
  4. Conclusion


In order to get the most from your lenses on digital M cameras, you need to have a lens code on the mount flange of each lens. If you've purchased only the latest lenses from Leica this is likely not going to be a problem. But what about older lenses - or third-party lenses? Leica lenses older than 2006 will not have coding, as that's when it was introduced with Leica announcing the M8. Third-party lenses such as those from Voigtländer or Zeiss won't have coding at all, regardless of age.

This article covers the conversion of certain relatively new and uncoded Leica lenses to use a third-party mount which can then be customized for the appropriate lens code with black and white (optional) paint. In our case today, we're covering the conversion of a Leica Elmarit-M 90mm f/2.8 lens. It is quite popular and relatively recent - but now discontinued. We sourced our new mount flange from a vendor on eBay (e.g. jinfinance) - or you could run a search for them. Make sure the screw pattern matches between your lens and the new mount flange! This is critical, hopefully for obvious reasons.

Note: There are Zeiss ZM and Voigtländer flanges available as well, but like the Leica versions - apply to a small group of compatible lenses. The problem is that each manufacturer and even each lens can have a different screw pattern. We'll be converting a Tele-Elmar-M 135mm f/4 lens next and potentially others as well - and will continue to update this article.

The package arrived in a few days from China in a generic brown box. Within, under bubble wrap was this white box - which contained the ring in a re-usable plastic bag. So basically, unless your package got trapped and run through the gears of progress somewhere... You should be okay and have something that looks not unlike this:


Everything you need to do the job is seen in the photo up top... Namely black (and optionally white) paint, a toothpick for coding the pits - and a proper screwdriver. A rag is a good idea too. Ready? Let's go.

The first step is to apply the 6-bit code to the new mount flange with paint. It's easier to do it at this stage, reduces risk to the lens to a minimum - and you can bake the paint so you don't have to wait. Because we all hate waiting, right? You want to use black paint at a minimum, otherwise the coding won't work. The white paint is a good idea and makes it look better; but it is totally optional. The silver of the chrome plating is enough for the camera to register it as "off." Take a moment to clean out the pit area with hot soapy water or alcohol and dry thoroughly. This is less important with oil-based paint as we used.

It's important to note that reading the code on the mount flange is from the 12 O'Clock position, in a clockwise direction. In the image below - you'll notice that the coding area is upside down, and therefore you must paint in your code starting from the right, not left. Since we're coding for the Leica Elmarit-M 90mm f/2.8 the code is "100110" - but is seen as "011001" in the photo. Just happens that this is the easiest way to paint the pits.

Take your toothpick and dip it into the black paint. You don't want a big drop; just a nice, wet tip. Touch the tip into the appropriate pits on the rim of the mount flange that are supposed to be "on" (as seen by the "1" or black location on the lens codes chart for your lens (or however you wish to code it). Dip the toothpick into the paint before doing each pit. Don't worry too much about paint that's on the flange itself (out of the pits) but if it spills into a neighboring pit that's supposed to be white... Stop now. Either remove all paint with a rag and start over - or use white paint to cover this up later. Since we weren't going to use white paint, we just wiped off any misses.

Once you're reasonably certain that each pit is filled well, close up the paint and wipe off (but hold onto) the toothpick, in case you need to adjust later. Often a second coat isn't a bad idea. If your paint is going to take some time to dry, you can gently bake it. This is done by placing the mount into a toaster oven, allowed to get to operating temperature and shut off. Do not open the door at this point, as you want all solvents to evaporate and the paint to harden. Just let it cool naturally in the oven as we move on.

Before we go any further, make a note of where the "landmarks" are on the mount flange and lens and their relation; for example, the catch/notch and the red dimple. You'll need this for reassembly in the next step. Now let's go ahead and take off the old mount flange. It is imperative that you use a proper screwdriver for the removal and re-installation of the six screws! Using one that is too small, too large or just poorly fitting is asking for stripped screws. We like to do things cleanly - or not at all.

Our screws were actually rather easy to back out; no thread-locking compound was found and thus no need for acetone. Take your time and go all the way around, backing out each of the six screws - but leaving them in the mount flange. Once all screws are loosened, remove the flange and screws, and off to the side - turn it upside down to carefully capture them. A rear lens cap works great for this.

In the photo below, you can see where the lens was previously coded, temporarily - using a black permanent "Sharpie" marker. It worked well except that the marks would repeatedly wear off. The more often the lens was (un)mounted, the quicker this would happen. The worst part is not realizing it until you get home and your images show either incorrect lens information - or none at all. Having had enough of that, we went this route.

Set aside the old mount flange and grab the new one along with the six screws from the previous step. Place the new mount flange in the correct position, lining up the screw holes. Holding the screwdriver in one hand, put the tip into one of the screwheads and hold it there with a finger or fingernail. Approach the lens from the side slowly (never across the middle) and place the screw into the hole carefully as you apply slight pressure from the screwdriver. This will make placing the screws easy, fast and avoid risk to the rear lens element. Do not tighten the screws fully - just get them started, working around all six.

Once they're all in place, tighten down one screw until it just contacts the mount flange. Go to the opposite screw and do the same. Then 90º from that screw and again the opposite... Again, once more... Basically as you would tighten the wheel of a car. You want to tighten down opposites rather than going in a circle, to apply even torque. Now go around and tighten each screw firmly and fully, the same way. Done!

Don't throw out your original mount flange. Put it in the plastic bag and box that the third-party one came in and toss it in the lens box/pouch if you have it. Should you ever go on to sell your lens, you can offer it along with it. Always a good thing. Plus, if there's ever a problem - you have a spare.


And now, the moment you've been waiting for! Mount the newly coded lens, turn the camera on and hit the INFO button (for M9, M9-P, M Monochrom and M users). If your LCD reads the same as ours does below - it looks like we have a successful conversion!

If you're not getting the results you expected, shut off the camera and unmount the lens. Take a good look at the coding on the mount flange and see if it's clean. Each pit should be distinctively black or white (or bare chrome). Touch up the paint as needed. Do the framelines match with the proper code? You need both for a successful coding. It would be fairly obvious by now, but did you mount the flange in the correct position? If all else fails, you may have a defective mount flange. Contact the vendor for a return/refund.


While this won't work for every lens, it's the cheapest option for coding a lens permanently! You can't beat $15 in cost and a 15 minute job that you can do yourself. Sending your lens to Leica will cost substantially more and you will be without your lens for many weeks. If you have an older, unsupported Leica lens or any third-party lens you'll have to send it to a repairperson. While slightly cheaper than Leica, you'll still be without your lens for quite a while. This procedure isn't for those that have two left hands (not mechanically inclined) but if you have some basic skills and take your time - this is a win! Enjoy.