Shop OBEX P1 Docs P2 Docs Learn Events
Can the Propeller Platform Arduino Shield Adapter ADC be used as digital inputs? — Parallax Forums

Can the Propeller Platform Arduino Shield Adapter ADC be used as digital inputs?

blittledblittled Posts: 681
edited 2013-03-22 06:44 in Propeller 1
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

  • Martin HodgeMartin Hodge Posts: 1,246
    edited 2013-03-21 11:21
    Blittled, yes the ppasa provides up to eight analog inputs using its onboard mc3208 ADC. See the wiki page for details.

    http://mghdesigns.com/wiki/ppasa:start

    PS I'm away from keyboard right now. Will post more info later if needed.
  • Martin HodgeMartin Hodge Posts: 1,246
    edited 2013-03-21 17:07
    Boy did I misread your original post. (Never post forum messages in the middle of stuffing your face at Arby's)

    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.
  • blittledblittled Posts: 681
    edited 2013-03-22 06:44
    Martin, thanks for the info. I'm bummed though since I have a $50 gift card to Radio Shack and they only sell the Seeed Touch Screen V1.0 and I want V2.0! I have the Adapter, Arduino Duemilanove, FEZ Domino, and Uno32 and I wanted to try touch screens on all of them.
Sign In or Register to comment.