A programmable analog circuit includes a plurality of analog inputs, a
differential analog buffer, a digital-to-analog converter, an
analog-to-digital converter, and an operational amplifier having an
inverting input and a non-inverting input. An analog switching network is
coupled between the plurality of analog inputs, the differential analog
buffer, the digital-to-analog converter, the analog-to-digital converter,
and the operational amplifier and is configured to allow programmable
connections from any of the plurality of analog inputs, the differential
analog buffer, and the digital-to-analog converter to the inverting input
and a non-inverting input; of the operational amplifier. An array of
programmable logic is programmably coupled to the input to the
digital-to-analog converter and the output of the analog-to-digital
converter.