Chipmakers Qualcomm (QCOM -2.36%) and Texas Instruments (TXN -2.44%) went down two very different paths in 2017. Qualcomm took investors on a roller-coaster ride, starting the year in the high $60s, then dropping to the high $40s, then rebounding for an anemic year-to-date gain of 4%. Texas Instruments steadily rose with a 34% gain and outperformed the NASDAQ's 28% rally.

I compared these two chipmakers last October and concluded that Qualcomm's lower valuation, higher dividend, and expansion into adjacent markets made it a better investment than TI. I was clearly wrong, since I didn't expect a barrage of probes and lawsuits to derail Qualcomm's growth over the past year. But is TI still the better choice after its year-long rally?

An illustration of a semiconductor.

Image source: Getty Images.

How does Qualcomm make money?

Qualcomm is the world's largest mobile chipmaker, and its massive portfolio of wireless patents entitles it to a cut of all smartphone sales worldwide. Its chipmaking business -- which sells its flagship Snapdragon SoCs (system on chips) -- generates most of its revenue, but most of its profits come from the higher-margin licensing business.

Qualcomm faces challenges in both markets. Its chipmaking business ceded market share to cheaper rivals like MediaTek and first-party chipsets from companies like Huawei over the past few years. Its licensing business has been targeted by major customers like Apple (AAPL -1.22%) and government regulators in China, South Korea, Taiwan, Europe, and the US -- which all claim that Qualcomm's cut (up to 5% of the wholesale price of each phone) is too high.

To diversify away from mobile devices, Qualcomm developed new chips for Internet of Things (IoT) devices, wearables, drones, and connected cars. It's also trying to buy NXP Semiconductors (NXPI -1.93%), the biggest automotive chipmaker in the world.

How does Texas Instruments make money?

TI produces a wide range of analog and embedded chips for connected cars, industrial machines, wireless infrastructure, consumer electronics, enterprise systems, and other devices. Producing these chips requires less capital than the production of higher-end application processors like Qualcomm's Snapdragon.

Shifting production from 200mm to 300mm wafers over the past few years also cut TI's average production costs by about 40%. That's why TI continually expanded its gross margin as Qualcomm struggled:

TXN Gross Profit Margin (TTM) Chart

Source: YCharts

TI's diverse business mix of chips across multiple industries allows it to offset softer orders in one industry with stronger orders in another. In recent quarters, its robust growth in the industrial and automotive markets offset softer demand in personal electronics and communications equipment.

Like Qualcomm, TI is a major Apple supplier. Sales of its chips to Apple accounted for 11% of its revenues in fiscal 2015, but that figure dropped below 10% last year. That lower dependence on Apple and the growth of its automotive and industrial unit arguably make TI a more well-balanced semiconductor play than Qualcomm.

Which chipmaker is growing faster?

Analysts expect Qualcomm's revenue and earnings to respectively fall 2% and 17% this year due to its unsettled fines in South Korea and Taiwan, its unresolved probes in the US and Europe, and multiple lawsuits against Apple. Apple, along with a second OEM (likely Huawei), also recently suspended its licensing payments to Qualcomm.

Wall Street expects TI's revenue and earnings to respectively grow 12% and 31% this year, fueled by rising demand for automotive and industrial chips along with its continuing shift toward 300mm production. Unlike Qualcomm, TI doesn't face any major litigation or regulatory probes.

However, Qualcomm has a lower valuation and a higher dividend than TI. Qualcomm trades at 18 times next year's earnings, compared to TI's forward P/E of 22. Qualcomm pays a forward dividend yield of 4.2%, which is supported by a payout ratio of 83%.

TI pays a lower forward yield of 2.5%, but it's also supported by a lower payout ratio of 47%. Those figures indicate that TI's dividend, while lower, is more sustainable than Qualcomm's.

TI looks like a better buy, but Broadcom could still buy Qualcomm

Texas Instruments' well-diversified business, higher margins, and more sustainable dividends all make it a better long-term investment than Qualcomm, which might need to make major changes to its high-margin licensing business to appease regulators. Its bruising battle with Apple could cause its components to be dropped from future iDevices, and the NXP deal remains in limbo due to the legal chaos.

However, investors should also remember that Broadcom (AVGO -4.31%) also wants to buy Qualcomm -- that's why its stock rallied nearly 30% over the past month. Qualcomm flatly rejected the initial $103 billion bid, but Broadcom is reportedly willing to sweeten the deal.

That might give Qualcomm a shot in the arm, but investors shouldn't buy stocks based on takeover buzz alone. Therefore, Texas Instruments still seems like a better buy than Qualcomm.