Controlling a MCP4162 Digital Pot


Closed Thread
Results 1 to 6 of 6

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    More confusion. If you set the commandbyte to a constant, you wont be able to increment or decrement because the control byte is always set for one or the other. Therefore, shouldnt the commandbyte be sent at the same time the data is sent?

    Example if the pot is currently sitting at position 200 and the commandbyte is %00000101 and you send:

    PORTB.1=0 'ChipSelect
    ShiftOut PORTB.3, PORTB.2, 1, [$00,$128]
    PORTB.1=1 'ChipSelect


    Nothing will happen because the pot is set to only increment.


    OR am I getting this completely wrong and the $00 is the commandbyte? This would put 00 at the increment/decrement bits which is a READ condition, therefore any value sent after the $00 would be placed on the pot.
    If that is the case, there is no need for the commandbyte constant.

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


    Did you find this post helpful? Yes | No

    Default Re: Controlling a MCP4162 Digital Pot

    Any help with this?

Similar Threads

  1. Digital Pot
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd January 2012, 07:54
  2. Digital Pot Advice
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd October 2007, 20:38
  3. Replies: 4
    Last Post: - 24th January 2007, 22:20
  4. Serial control of a digital pot?
    By TonyA in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 2nd June 2006, 23:49
  5. Controlling A Digital Pot
    By TonyA in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th April 2006, 21:30

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