TAIPEI, Taiwan — Taiwan Semiconductor Manufacturing Co., the world's largest contract chip manufacturer, reported a 24 percent jump in second quarter profit Thursday, driven by sales growth in smartphones and tablet computers that it warned is likely to fade in coming quarters.

The company said that April-June profit totaled NT$52 billion ($1.7 billion) on revenue of NT$156 billion.

But it acknowledged that rapid sales growth in high-end smartphones over the past two years was tapering off, affecting the company's revenue and profit margin.

The company said mid- and low-end handsets have experienced faster sales growth, but they do not contribute as much to profit because they use less sophisticated processors.

TSMC forecast modest growth in the third quarter, with revenue expected to reach NT$161-164 billion.

Revenue could drop as much as 7 percent in the fourth quarter compared with a year earlier, TSMC Chairman Morris Chang said.

Overall, the company said personal computers sales are expected to decline further in the second half, while smartphones and tablet computers will suffer a modest decline.

Faced with intense competition, the company has moved into the cutting-edge 20 and 16 nanometer technologies, which allow for production of smaller chips that run faster at lower power.

TSMC is planning a record $10 billion of capital investment in 2013 to fend off competition, mainly from South Korea's Samsung Electronics Co. as well as Intel Corp., which has been speeding up its expansion into contract manufacturing following slow PC chip sales.

Chang said trial production using the advanced 20 nanometer technology began in the first quarter, with mass production beginning in 2014.

The company is building a new factory that uses the cutting-edge technologies, saying it is confident demand will remain strong despite competition.

"We do not build capacity until we're reasonably, highly confident of the demand" of customers, Chang said.