An integrated high-voltage pulser with improved HD2 and programmable amplitude