Teensyduino 1.49 Beta #4

Status
Not open for further replies.
The modification of analog input pin like INPUT_DISABLE, INPUT_PULLUP, etc. before reading should remain possible, because sometimes it may be useful to read a low impedance signal with a pullup attached, for instance to detect a signal failure caused by a crackling potentiometer or a broken connection, etc., while having the easy option to detach the pullup in software so get the best reading.
To define a fixed default behavior would waste this feature altogether and require additional circuits or freaky coding in such use cases.
 
Could someone explain why this works. Should the library have set this?

thanks

Looking at INPUT_DISABLE it changes the hysteresis handling of the pin. That explains why it was resistant to change mid-value as shown in post #10

Code:
		} else { // INPUT_DISABLE
			*(p->pad) = IOMUXC_PAD_DSE(7) | IOMUXC_PAD_HYS;

Something about this passed before - perhaps in the beta - Paul knows … how it gets applied will be forthcoming ...
 
I was paying with DMA for ADC, did not get it working (adc_timer_dma.ino), but as result one of the potentiometers have now clear dead area, couple of degrees. Maybe possibele that the Potentiometer is somehow broken, but it is high quality, and new and just worked fine, I will measure it tomorrow.

Is there a way to disable the hysteresis, I have tried what is mentioned here, does not help.

In some cases the hysteresis is also good. is there way to control the amount of it?

This is Teensy 4.0 and Teensyuino 1.53
 
Status
Not open for further replies.
Back
Top