Intel (INTC 1.46%) and Texas Instruments (TXN 1.30%) are very different chipmakers. Intel mainly sells CPUs for PCs and data centers, while TI produces cheaper analog and embedded chips for a wide variety of industries. Yet Intel has risen just 7% in 2016 -- underperforming the Philadelphia Semiconductor Index's 21% gain -- while TI outperformed the index with a 24% gain.

Image source: Getty Images.

Will Intel continue lagging behind as TI keeps rising? Or does Intel, as a contrarian play, now have more upside potential than Texas Instruments? To find that answer, we should examine why TI rallied and why Intel slipped behind over the past year.

Why is Texas Instruments on fire?

On the surface, TI's growth doesn't look very exciting. Its revenue fell 0.4% last year, due to headwinds in personal electronics and wireless infrastructure, but is expected to rise 0.5% this year on the growth of its industrial and automotive businesses. Earnings rose 9% last year and are expected to grow another 12% this year.

However, the chipmaker has a strong track record of growing its margins. After abandoning the more competitive mobile application processor and baseband modem markets several years ago, TI pivoted toward the production of low-cost analog and embedded chips. Its recent production shift from 200-millimeter to 300-millimeter wafers also reduced its chip production costs by about 40%. The long-term impact on TI's gross margin over the past five years is easy to see:

TXN Gross Profit Margin (TTM) Chart

Data by YCharts.

Those rising margins generate stronger free cash flow, which has risen at a compound annual growth rate of 7% between 2004 and 2015. TI consistently returns around 100% of its free cash flow to shareholders via buybacks and dividends. It's reduced its total share count by 42% since 2004 and raised its dividend for 12 consecutive years. While TI's forward yield of 2.2% is lower than many other "mature tech" peers, its well-diversified business model, rising margins, and shareholder-friendly goals make it a fairly low-risk semiconductor play.

Why is Intel in trouble?

Intel's sales dipped 1% last year but are expected to rise 6% this year. Earnings rose less than 1% last year, but are expected to grow 11% this year. Five main factors throttled Intel's growth: weak PC sales, sluggish enterprise spending on data centers, falling prices of memory chips (which it sells through its non-volatile memory unit), poor progress in mobile chips, and its lackluster growth in the Internet of Things market.

Intel's top- and bottom-line numbers aren't terrible -- they're just mediocre. Its client computing (PC/mobile) group revenue fell 3% annually last quarter, while its data center revenue rose just 5%. That data center growth figure, which was partly blamed on weak sales in China, disappointed many investors, as Intel previously claimed that the unit could post 15% annual growth between 2015 and 2019.

Intel already controls about 99% of the data center chip market, making it tough for the business to continue growing if enterprise customers postpone chip upgrades. Meanwhile, rival chipmakers like Qualcomm, IBM, and NVIDIA are all looking for ways to dent Intel's market share with cheaper or more specialized server chips. Intel is trying to offset its weakness in PCs and data centers with sales of memory chips and IoT modules, but low margins in both markets have weighed down Intel's gross margins over the past year.

INTC Gross Profit Margin (TTM) Chart

Data by YCharts.

Like TI, Intel is a fairly shareholder-friendly company. Over the past 12 months, it spent 23% of its free cash flow on buybacks and 40% on dividends. It's reduced its share count by 18% over the past decade, and it pays a forward yield of 2.8%. But unlike TI, Intel doesn't have a habit of raising its dividend every four quarters.

Which chipmaker is a better buy today?

Texas Instruments currently trades at 23 times earnings, which is higher than Intel's P/E of 18 and the industry average of 22 for broad line semiconductor companies.

Analysts expect TI's earnings to grow 10% annually over the next five years, which gives it a five-year PEG ratio of 2.3. Since a PEG ratio under 1 is considered cheap, TI doesn't look undervalued relative to its long-term earnings growth potential. Intel is also expected to grow its annual earnings by 10% during that period, but its lower P/E ratio gives it a cheaper PEG ratio of 1.5.

Based on those figures, Intel is the cheaper stock with a higher dividend. Therefore, while I believe TI is still a solid long-term investment for conservative investors, Intel looks like it has more upside potential from current prices. However, that growth will depend heavily on the recovery of the PC market, its ability to continue growing its data center business, recovering memory prices, and its expansions into adjacent markets.