Shop OBEX P1 Docs P2 Docs Learn Events
MCP3202 Problems — Parallax Forums

MCP3202 Problems

GreenTHHNGreenTHHN Posts: 11
edited 2010-06-15 02:51 in Propeller 1
I have the Parallax 2-axis joystick connected to a MCP3202 12-bit ADC. I am using MCP3202.spin and MCP3202_Demo.spin by Ken and Chip Gracey. I have my ADC connected to P16, P17, and P18 and have modified the code to match. On the Parallax Serial Terminal, the output from both channels is always 0. I have connected the joystick and ADC to a BS2 with the PBASIC demo code and it works on it. I would like to use it on the Propeller but haven't figured out what I am doing wrong.

Comments

  • TubularTubular Posts: 4,717
    edited 2010-06-10 06:27
    Have you checked the voltage right on the ADC pins? What range does it swing over as you move the joystick? Do you have the DI and DO bridged together like the documentation suggests?

    I know this stuff is kind of obvious, but its usually something simple like this. I've used the MCP3304 with great results with the Prop so happy to assist where practical
  • John AbshierJohn Abshier Posts: 1,116
    edited 2010-06-10 14:38
    I think there are errors in that driver.· It has been a while.· I think the attached file will work but don't have an ADC chip set up to test it right now.



    John Abshier
  • GreenTHHNGreenTHHN Posts: 11
    edited 2010-06-10 19:55
    Ok, thanks. I'll try this file and let you know how it works.

    I wondered if my problem may have been an error in the program. I do have DO and DI bridged. I do have changing voltages from the joystick at the CH0 and CH1 inputs. When I had it hooked up to the BS2, I got changing voltages on the debug screen while moving the joystick.
  • GreenTHHNGreenTHHN Posts: 11
    edited 2010-06-15 02:51
    Yes, there must be errors in the driver on the object exchange. I tried it again with the MCP3202x.spin and now I can read the outputs from the joystick. Thank You.
Sign In or Register to comment.