Chip maker Analog Devices reported a better-than-expected increase in second-quarter profit, driven by an 18 percent rise in sales and improved gross margins.