Ok I am using AT32UC3A1256 its doing a fair bit of stuff....one of which is monitoring a float switch that is at the end of about 2-3meters lead. Lead is not shielded.
I am not sampling the float IO all the time, only when a query is made through Modbus tcp...I then read the IO and update the Modbus table value just read.
At times, throughout the day I see the IO is showing LOW (reported via Modbus table, LOW indicates float switch active) even though there is no water in the underground pit. The IO is pulled up via the micro controller GPIO interface. There is no physical pull-up resistors on PCB. There are two diode clamps and a zenner diode clamping to ground for any voltage spikes. The other two diodes clamp to Vcc and Gnd level...I have enabled the GPER register for the IO and set it as Input type.
Any idea folks?