Multiple I2c Devices


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jan 2012
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: Multiple I2c Devices

    Hi,
    Thanks for your reply, i have tried following simple code but getting error for I2Cwrite (I2cRead is OK), please check whats wrong with this code. is there something missing......?

    '*********************
    Device 16F689
    Config FCMEN_ON, IESO_OFF, CPD_OFF, CP_OFF, MCLRE_ON, PWRTE_ON, WDT_OFF, INTRC_OSC_NOCLKOUT,BOR_OFF
    TRISC=%00000000


    Declare All_Digital = True
    Xtal=8



    Symbol Dpin PORTC.4
    Symbol Cpin PORTC.6


    DelayMS 100


    main:


    I2CWRITE Dpin,Cpin,$72,$80,[$3]
    I2CREAD Dpin,Cpin,$72,$80,[$3]




    End

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: Multiple I2c Devices

    This doesn't look like PBP code to me?
    Dave Purola,
    N8NTA
    EN82fn

  3. #3
    Join Date
    Nov 2008
    Posts
    26


    Did you find this post helpful? Yes | No

    Default Re: Multiple I2c Devices

    Agreed, not picbasic, what version of picbasic are you running?

  4. #4
    Join Date
    Jan 2012
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: Multiple I2c Devices

    Hi,
    Sorry i made a mistake, actually it is proton code and i mixed proton with pic basic. I will try writing in picbasic and will let you know if there is any issue.

Members who have read this thread : 1

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