Shop OBEX P1 Docs P2 Docs Learn Events
Prop ASC A/D problem/question — Parallax Forums

Prop ASC A/D problem/question

kfuremkfurem Posts: 19
edited 2013-07-08 07:54 in Propeller 1
I"m using a Propeller ASC with a BOE shield. I"m having problem with the analog inputs.

Using the "mcp3208" object as a driver with the following settings.

DataPin= 26
ClkPin= 25
CSPin=27
Mode =1

and the following statement to start it: adc.start(DataPin, ClkPin, CSPin, 1)

The problem is, it will only read Analog Input 0, which it does fine. Am I missing something here?

Thanks,

Comments

  • PublisonPublison Posts: 12,366
    edited 2013-05-04 04:20
    kfurem wrote: »
    I"m using a Propeller ASC with a BOE shield. I"m having problem with the analog inputs.

    Using the "mcp3208" object as a driver with the following settings.

    DataPin= 26
    ClkPin= 25
    CSPin=27
    Mode =1

    and the following statement to start it: adc.start(DataPin, ClkPin, CSPin, 1)

    The problem is, it will only read Analog Input 0, which it does fine. Am I missing something here?

    Thanks,
    ''   mode  = channel enables in bits 0..7, diff mode enables in bits 8..15
    
    adc.start(dpin, cpin, spin, 255)  'Start the MCP3208 object and enable all 8 channels as
                                      'single-ended inputs.
    

    Looks like Mode=1 only starts one channel.
  • kfuremkfurem Posts: 19
    edited 2013-05-04 06:04
    yeah, that's it--thanks:smile:
  • kfuremkfurem Posts: 19
    edited 2013-07-08 07:54
    should also be noted that it's a bit by bit enable, so if you enter a 2, will enable the first 2 input, easiest to do mode in binary
Sign In or Register to comment.