How do you set and read ADC/DAC pin values?

pedwardpedward Posts: 1,581
edited 2013-03-22 - 02:58:14 in Propeller 2
I must be missing something, but I don't see how you set the DAC value or read the ADC value from pins.

Anyone know the answer?

Comments

  • pedwardpedward Posts: 1,581
    edited 2013-03-22 - 01:33:17
    Heyyy, I found some instructions:

    SETDACn for DAC output, there are 4 per COG.
  • pedwardpedward Posts: 1,581
    edited 2013-03-22 - 01:37:35
    I don't see any instructions for ADCs, but I'd guess there are 4 registers per COG as well...
  • TubularTubular Posts: 3,846
    edited 2013-03-22 - 01:49:58
    cfgpins... it has a mask to choose what pins you want to change, and options to choose a wide variety of modes including current source,pullup/down,etc
  • AribaAriba Posts: 2,230
    edited 2013-03-22 - 02:58:14
    pedward wrote: »
    I don't see any instructions for ADCs, but I'd guess there are 4 registers per COG as well...

    I think ADCs are still done per Sigma-Delta modes of the counters, only the feedback and input resistors are now internally available for every pin.

    EDIT: after looking into the Docs, it is more like that:
    The pins implement a Sigma-Delta modulator (Comparator, Latch, Feedback filter) if you configure them so. They send then a bitstream of 0/1 according the input voltage.
    To get an ADC value from that you need a counter that counts the ones over a certain period.

    Andy
Sign In or Register to comment.