Circuit for reading non-volatile memories