Can the Propeller Platform Arduino Shield Adapter ADC be used as digital inputs?
blittled
Posts: 681
I'm considering buying the Arduino Touch Screen Shield and it uses the ADC ports as digital inputs for the touch sensor. Can the ADC of the Propeller Platform Arduino Shield Adapter be configured for digital input? I know by setting the Propeller to use the pins as outputs they become digital outputs
Comments
http://mghdesigns.com/wiki/ppasa:start
PS I'm away from keyboard right now. Will post more info later if needed.
The answer is yes, you can use the "analog in" pins on the PPASA as digital inputs. The standard Arduino analog in 0 through 5 will appear to the Propeller on pins P14 through P19 respectively. You can read the digital state on those inputs directly with the Propeller. If you can sacrifice some speed and a cog, you could write some code to read the MCP3208 and have your code look for a high and low threshold to determine the "digital" state of the input. That would be slower than reading the input directly with the Propeller, but could provide adjustable hysteresis, averaging, debouncing, noise cancellation reduction, etc.