MCP3201 problems


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    461


    Did you find this post helpful? Yes | No

    Default Re: MCP3201 problems

    You missed the following from that post...
    Code:
    Sensor = (Sensor & $FFF) * 5000
    The AND with $FFF masks out the unused bits. The multiply by 5000 is to scale it to 5V, so you can skip that part.

    Look at the diagram in post #4 of that thread and you'll see that the first few bits of data are invalid. To be honest it looks to me like even that code from Darrel isn't quite right since it also shows getting a duplicate B1 bit into the LSB. I would think the result should be shifted right by 1 before doing the AND.

    I don't think your original problem with the pic ADC had anything to do with the internal adc being inaccurate so none of this may help much. You say it worked fine until you put it into the vehicle. That should be a clue.

  2. #2
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: MCP3201 problems

    Despite all the modification, the "adapter" still work foolish ... No change to the initial code.
    ...
    "You say it worked fine until you put it into the vehicle. That should be a clue. "
    I think so ! But I have not been able to identify and eliminate the cause so far.That's why I've been thinking about using this MCP ....
    Last edited by fratello; - 4th December 2017 at 15:24.

  3. #3
    Join Date
    Aug 2011
    Posts
    461


    Did you find this post helpful? Yes | No

    Default Re: MCP3201 problems

    Do the raw ADC readings out the serial port make sense? I'd concentrate on getting those right first.

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: MCP3201 problems

    It would be a lot easier to use another pic with 3 extra I/O pins. Then your 6 push buttons would be reliable. But if you are minimalist and want a challenge go for it.

  5. #5
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: MCP3201 problems

    @tumbleweed : I don't understand what you mean ...
    @Mark's : It's impossible another approach ! The steering wheel commands don't allow ...
    Attached Images Attached Images  

Similar Threads

  1. Shiftin problem (16f877A with MCP3201)
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th November 2013, 04:10
  2. IF ....THEN.... problems
    By bursach in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 24th February 2011, 20:42
  3. New and I'm having problems!
    By Roddy Wayne in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 12th April 2009, 07:38
  4. IR problems
    By Snap in forum General
    Replies: 10
    Last Post: - 6th August 2007, 07:20
  5. A/D Problems!
    By scottl in forum General
    Replies: 4
    Last Post: - 20th May 2006, 16:49

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts