Trouble with I2C - Part 1


Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Nov 2008
    Posts
    22

    Default Trouble with I2C - Part 1

    Hey all,

    I'm interfacing a Max5477 digital pot to a PIC16F627 with PicBasic Pro V2.47. It took me a bit to get it to work and the problem I see is that the I2CWRITE command's subsequent statements (DataPin, ClockPin, Control, Address, Value) don't work in the order that they're published. In order to get it to work I have to enter it like this:

    I2cwrite PortA.6, PortA.2, Control_NVreg, value, Address

    ie. I have to swap the Value and Address statement to get it to work.

    With:
    Control_NVreg = %00100001
    Value = %10000000
    Address = %01010010



    In all the other I2C posts I looked at everyone is using it in the published order.

    Does anyone have a clue why mine is messed up?

    Mark
    Last edited by munromh; - 15th November 2008 at 18:51.

Similar Threads

  1. Thermo 7 segments - little problem
    By fratello in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 27th July 2013, 07:31
  2. RS485 bus - starting probem
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th January 2010, 13:35
  3. 32 bit square root
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 6th May 2009, 03:37
  4. one line led light make image
    By bioul in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 12:19
  5. HSERIN doesn´t work
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th July 2007, 14:23

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