2015-01-31 10:13 AM
Hello, I have log. 1 on a pin and switch it off. After switching off I need immediately measure voltage on this pin. How can I do this?
One possibility is to configure pin to output, set log. 1, configure the same pin to input and measure voltage by ADC. But this switching takes a lot of time and I need to measure it immediately. How can I do it with two connected pins - one ADC input and one output? How should I configure output pin? Thank you for answeres.2015-01-31 11:37 AM
Define a ''lot of time'' in SI units.
You'd want to switch the output pin to an input (ideally an analogue input as this disables a schmitt trigger on the digital input). I'd perhaps suggest starting the ADC conversion, and then changing the pin mode, and having a sufficient sample time configured on the ADC, so the point at which the actual conversion process starts is sufficiently ''immediate''