A digital compensation method for piezoresistive pressure sensor