MCP41xxx Digital pot issue


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: MCP41xxx Digital pot issue

    Hi,
    With MODE 5 the clock should idle high and go low and return high for each bit of data.
    You don't say which PIC this is but you have the Clock output on PortA where analog stuff is normally located. Check and double check that analog functions are turned OFF for the pins used as Clock and data.

    /Henrik.

  2. #2
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: MCP41xxx Digital pot issue

    PIC 18F2550

    There is data from each pin so the pins are correctly set to digital outputs. The clock does idle high and goes low for each bit. I'm stumped. I've followed code I've used before that has worked. No idea what is wrong this time.

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: MCP41xxx Digital pot issue

    You have ADCON1 = %00000000 which for the 18F2550 means ALL analog inputs enables, that includes PortA.5 where you have your SDO pin - that doesn't look quite right to me. Then, looking at the datasheet for MCP41xxx it's pretty clear that it clocks the data in on the rising edge of the clock so you probably have the wrong polarity selected in the SHIFTOUT command.

    /Henrik.

  4. #4
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: MCP41xxx Digital pot issue

    The mode is correct but I did miss the analog setting. Thank you.

Similar Threads

  1. Digital Pot
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd January 2012, 08:54
  2. Digital Pot
    By Tastature in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th July 2008, 17:20
  3. Controlling A Digital Pot
    By TonyA in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th April 2006, 22:30
  4. Digital Pot
    By Scott in forum General
    Replies: 6
    Last Post: - 14th September 2005, 02:31
  5. Microchip MCP41xxx Digital Potentiometer Code Trouble
    By CocaColaKid in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st August 2005, 19:21

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