A barometric-pressure-sensor device for a portable electronic device, having a pressure sensor of a MEMS type designed to supply a barometric-pressure measurement, and with a processing circuit coupled to the pressure sensor that is designed to supply an altitude measurement as a function of the barometric-pressure measurement. The pressure sensor and the processing circuit are integrated in a single chip, and the processing circuit is a dedicated circuit of a purely hardware type. The processing circuit executes altimeter-setting operations through a plurality of reference registers containing respective pressure references.