Integrated apparatus for measuring current or voltage