Image source: Getty Images.

You probably already know InvenSense (NYSE:INVN) and Intel (NASDAQ:INTC) are very different companies.

Intel built its $163 billion company by dominating the PC processor business, but infamously missed the mobile segment. InvenSense, on the other hand, is worth just $615 million, and has bet most of its future on the mobile market with its microelectromechanical systems (MEMS). 

Intel missed the mobile boom, but InvenSense bet the farm on it. And neither of those paths has worked out especially well for the companies. 

But only Intel is bouncing back, while InvenSense has been left floundering. 

Diversification is the key

InvenSense earns 46% of its total revenue from its sales of gyroscope sensors it makes for Apple (NASDAQ:AAPL) (InvenSense doesn't explicitly say Apple is its largest customer, but it's a bit of an open secret).

When an iPhone user tilts their device to play a game or move it to their ear and the display goes dark, that's InvenSense's motion-sensing technology at work. InvenSense has made similar technology for Samsung's high-end devices as well.

InvenSense's sensors are some of the best in the business, but both Apple and Samsung have been able to drive down the selling prices of those sensors because of their massive size. InvenSense gave up some price negotiations in order to get its tech in the most popular smartphones in the world. It's paid dearly for it. 

InvenSense has failed to offset pricing pressures with significantly more revenue in its other business segments. As a result, its revenues have been plummeting. In fiscal Q1 2017,  InvenSense reported just $60.6 million in revenue -- a 43% drop year-over-year.  

It's not as if InvenSense doesn't see the problem. The company's management said on the latest earnings call that it's looking to the Internet of Things (IoT), virtual reality headsets, and lower-end smartphones to drive future sales of its MEMS. 

It's already starting to gain traction, too. InvenSense's "other" revenue segment (which includes IoT) now accounts for 25% of the company's total revenue.  

But InvenSense is still too dependent on Apple, and the company can't match Intel's diversification.

Once Intel fully realized how big its problem of missing out on mobile was, it set a course for the next big thing: the Internet of Things. IoT has become one of Intel's biggest focuses, and no one can accuse the company of failing to deliver. 

Over the past few years, Intel has either bought or partnered with companies that make wearable devices, connected smart cities, driverless cars, computer vision, and much more. 

Just last month, Intel partnered with BMW and Mobileye to create an open, self-driving car platform for carmakers. The company's Atom and Xeon processors power the technology, along with Intel's cloud platform and machine learning systems. 

It's just one example of Intel diversifying away from PCs and moving toward the mind-boggling $7 trillion IoT market. 

It's not that Intel is making all that much from IoT revenue. It earned $572 million from the segment in Q2 2016, up just 2% year-over-year, and just a drop in the bucket compared to its total quarterly revenue of $13.5 billion.  

But the advantage that Intel has over InvenSense is that it's much more diversified across its IoT opportunities. Even its PC business (still Intel's biggest money maker) is spread across many major customers. InvenSense's fate is essentially tied to Apple and little else. 

This isn't even close

InvenSense's losses mean that the company doesn't have a positive P/E ratio right now. Meanwhile, Intel's P/E is just under 17, much lower than the technology industry average of 26. Intel isn't experiencing skyrocketing earnings right now either, but it's at least diversifying itself far more than InvenSense.

Intel is still working on its transition away from PCs, and not everything is going smoothly. For instance, the company just recalled its Basis smartwatches because of overheating problems.  

But compared to InvenSense, Intel looks like a no-brainer. Intel's revenues aren't dominated by just one major player; InvenSense can't say the same. And for that reason, I think Intel is a much better buy for investors. 

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.