Shop OBEX P1 Docs P2 Docs Learn Events
Newbie C programmer wanna be — Parallax Forums

Newbie C programmer wanna be

w4fejw4fej Posts: 264
edited 2014-02-20 12:16 in Learn with BlocklyProp
DISCLAIMER: I know squat about "C" but am excited about learning the language.

I have the Simple IDE installed and libs updated. The default example runs just fine. ("Hello") I loaded up the "joystick.c" example and have it wired up to a MCP3202. It doesn't work. The same hookup works fine in Spin. I know the example was written with the Prop Activity board, I'm using the Prop Pro Dev board. The activity board uses a different ADC chip but appears to work just like the the 3202.(SPI etc) If I hook up the 3202 to the pins with the same function names (ie: CS, SCL etc) shouldn't the program work or is there a difference between the two ADC chips that's keeping it from working??

I get no errors when I compile the example.

Any help would be appreciated.

Mike B.

Comments

  • jazzedjazzed Posts: 11,803
    edited 2014-02-13 11:39
    I don't think the ActivityBoard ADC124S021 protocol is compatible with the MCP3202. One has 4 channels while the other has 2 channels. The SPI bit command requirements are also different between the two devices.
  • w4fejw4fej Posts: 264
    edited 2014-02-13 11:58
    jazzed wrote: »
    I don't think the ActivityBoard ADC124S021 protocol is compatible with the MCP3202. One has 4 channels while the other has 2 channels. The SPI bit command requirements are also different between the two devices.

    OK, thanks again Jazzed. Looks like I have a lot to learn.... Is there an "exchange" for includes much like the OBEX for Spin??


    I lloked in vain trying to figure out just "where" the bit twiddling was taking place so I could build a 3202 function but will do some more digging...

    Mike B.
  • TymkrsTymkrs Posts: 539
    edited 2014-02-20 12:16
    You may be interested in First C - goes through the C examples with simpleIDE via podcast format: http://www.tymkrs.com/shows/category/first-c/ and goes from a beginner's level.
Sign In or Register to comment.