Many Fool writers know companies whose businesses were always so unattractive that they would never want to own the stock. Micron (NYSE:MU) has always been in that camp for me. But I think it may finally have become a company for which the positives outweigh the negatives. In fact, I now find the business attractive enough that I purchased some shares a couple of months ago.

Micron is a producer of dynamic random access memory (DRAM) -- the stuff computers use as their main memory source. The amount of DRAM inside computers has grown by leaps and bounds, but excess manufacturing capacity has suppressed prices and prevented Micron investors from earning good returns over the past decade. Lately, though, Micron has been trying to end its heavy reliance on the commodity DRAM market and diversify its business into NAND flash memory, CMOS image sensors, and specialty memory products. In the company's most recent two quarters, these products have amounted to 45% of net sales. So let's talk about the positive improvements at Micron, and we'll touch on the negatives at the end.

IM Flash Technologies
If you follow the semiconductor markets at all, you probably know that Intel (NASDAQ:INTC) and Micron have formed a joint venture called IM Flash Technologies (IMFT) to produce NAND flash memory. Micron owns 51% of the entity, and Intel owns 49%. NAND flash memory has proved to be the right technology at the right time -- it provides a non-volatile storage option (meaning the data aren't lost when the power is turned off) for portable devices yet consumes little power. Large producers of NAND flash include Korean electronics juggernaut Samsung, Hynix, SanDisk (NASDAQ:SNDK), and Toshiba. Intel and Micron should prove to be formidable competitors to those companies after IMFT ramps up production in the second half of this year.

Of course, Micron's entry into the NAND flash market would not matter much if NAND flash was sold at margins as low as DRAM is. Luckily, NAND flash demand continues to soar ahead of increases in supply, thus supporting margins that are much higher than those of DRAM. SanDisk, for example, recorded gross margins of 38% in its most recent quarter. That's much higher than Micron's gross margin from DRAM sales, which was less than 16% in the latest quarter.

Another positive development, in my view, is Micron's pending purchase of Lexar Media (NASDAQ:LEXR), which makes NAND flash-based storage products -- even though Lexar has been struggling to maintain market share and profitability against stiff competition from SanDisk. One of SanDisk's advantages is its involvement in flash manufacturing through its partnership with Toshiba. By being involved in manufacturing, SanDisk directly benefits from improvements that result in lower manufacturing costs.

On the other hand, Lexar buys all of its NAND flash memory from others. When supply gets tight, as it was in 2005, Lexar gets squeezed and can lose gobs of money when it's forced to match price drops that SanDisk institutes. My guess is that the Lexar management team saw a sale to Micron as one of its few viable alternatives. If the acquisition goes through, Micron will be able to supply Lexar with flash memory, which should go a long way in leveling the playing field.

So we know how Lexar should gain from the purchase. Micron should benefit from the Lexar purchase in at least a couple of ways. First, it will have an outlet for much of its flash production and will have less reason to extend overly favorable terms to large NAND flash customers in the future. In addition, it will gain a retail sales business and thereby give itself a more SanDisk-like business model.

A potential wrench in the works is that SanDisk is investigating the possibility of making a competing bid for Lexar. The only reason I can come up with for SanDisk to have any interest in Lexar -- SanDisk has been eating Lexar's lunch, after all -- would be to prevent Micron's purchase from going through. It should be interesting to see what happens, but I certainly hope that Micron's bid stands.

CMOS image sensors
Micron's manufacturing of CMOS image sensors is another area of the business that I see as holding promise. A CMOS image sensor is a silicon-based device that converts light to an electric charge. Historically, the CMOS was often snubbed in favor of CCD image sensors, which are also silicon-based devices but generated images superior to those of CMOS sensors. CCDs, however, had the downside of using more power and being more expensive to manufacture. Recent advancements in the imaging quality of CMOS sensors have allowed them to displace CCD sensors and have led to their increasing use in inexpensive camera cell phones and digital cameras.

Other applications for CMOS image sensors include automobiles, medical devices, and security cameras, but by far the largest market should continue to be camera cell phones. Micron expects the worldwide CMOS sensor market to grow from 540 million units in 2005 to 1.7 billion in 2010, for about 25% annual growth.

So far, Micron's sales of CMOS sensors have grown much faster than 25% annually. In 2003, sales amounted to just $16 million, but by 2005 they had grown to $303 million. Strong growth is continuing this year and totaled more than $313 million (12% of Micron's overall sales) in just the first two quarters of fiscal 2006. In a very short time, Micron has scooted out in front of Omnivision Technologies (NASDAQ:OVTI) and owns the industry-leading market share. Furthermore, the gross margins were more than 43% for the image sensor business -- much higher than the 15.6% gross margin for the combined DRAM and specialty memory segment.

As you might suspect, the strong growth in CMOS sensors hasn't gone unnoticed, and many competitors are pursuing their own chunk of the market. While Omnivision and Micron together control about 60% of the market, the remaining 40% is split among companies such as Toshiba, MagnaChip, Sony (NYSE:SNE), ST Micro, and Avago. While I don't expect that the competition will go away, Micron will most likely remain a significant player in the market for CMOS sensors.

The negatives
I mentioned earlier that DRAM manufacturing is a tough low-margin business, and I don't expect the DRAM business to suddenly morph into a real moneymaker, despite the some of the industry's having converted its capacity to produce NAND flash. While this conversion should have helped, Micron's gross margin for DRAM has been worse this year (17.8%) than last year (30.2%). Even Microsoft's (NASDAQ:MSFT) 2007 release of Windows Vista probably won't change the situation much. Vista promises to be a real memory hog, but new DRAM capacity is being brought on line in Asia.

There's also a chance that NAND flash capacity will catch up with demand. This hasn't happened yet because of the elasticity of demand. In other words, the effect of price declines is that demand rises to soak up the new capacity. The DRAM markets don't behave this way because DRAM is usually sold inside a computer, and a drop in the price of the DRAM doesn't change the price of the computer very much. The result is that price declines don't really drive additional demand for DRAM. However, a lot of NAND flash is sold directly to consumers in external cards for use inside digital cameras and in USB flash drives. Consumers are comfortable spending $50 on a flash memory card, so when prices fall, we still spend our $50, but we end up with a card of larger capacity.

Some believe that the NAND flash market will, at some point, become less elastic. If so, then NAND flash producers may suffer from declining profitability.

One last risk is that this company is certainly vulnerable to any slowdown in consumer spending. Given current high energy costs and the end of mortgage refinancing, it seems as though consumers should have to pull back their spending. On the other hand, this always seems to be a worry, and who knows when this fear will come to pass.

Foolish bottom line
There are no guarantees, but with the addition of the NAND flash business and a growing CMOS image sensor business, I believe that Micron is on the right track. While I wouldn't invest 20% of my money in it, I think it deserves a place in a diversified portfolio like mine.

Related Foolishness:

Med-tech, high-tech, nanotech, any tech -- if it's tech-related, Motley Fool Rule Breakers covers it. For more profitable ideas in the world of medical devices, check out Motley Fool Rule Breakers with a 30-day free trial.

Microsoft and Intel are both Motley Fool Inside Value recommendations.

Fool contributor Dan Bloom owns shares of Micron and Intel. He welcomes your comments. The Motley Fool has a disclosure policy.