I2C optional label question


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    France
    Posts
    97

    Default I2C optional label question

    hello
    I have a translation probleme about optional label
    on I2C commands ..
    explanation given in the help database is :
    If the optional Label is included, this label will be jumped to if an
    acknowledge is not received from the I2C device.
    question :
    is it a GOTO or a GOSUB function ?

    I have a problem with a SP5055 synthetiser, it is working well
    using a I2Cwrite command (output frequency is good)
    I try to read the SP5055 to see the value of the Frequency Lock bit
    (BIT6 of the register)
    As soon as I send I2CREAD either on address @C2 or @C3 the frequency
    goes outside the good value ... either down or up !

    very strange ...
    thanks in advance for your help

  2. #2
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    is it a GOTO or a GOSUB function ?
    GOTO

    As soon as I send I2CREAD either on address @C2 or @C3 the frequency
    goes outside the good value ... either down or up !
    I am not familiar with the device, but very likely these registers are not readable.

    Al.
    All progress began with an idea

  3. #3
    Join Date
    Jan 2005
    Location
    France
    Posts
    97


    Did you find this post helpful? Yes | No

    Default I2C question ..

    thanks for your reply
    trust me .. answer is yes
    on page 3 (and +) from the SP5055 datasheet
    you ca read this
    READ MODE
    When the device is in the read mode the status data read from
    the device on the SDA line takes the form shown in Table 2.
    Bit 1 (POR) is the power-on reset indicator and is set to a log
    1 if the power supply to the device has dropped below 3V and th
    programmed information lost (e.g., when the device is initiall
    turned on). The POR is set to 0 when the read sequence i
    terminated by a stop command. The outputs are all set to hig
    impedance when the device is initially powered up. Bit 2 (FL
    indicates whether the device is phase locked, a logic 1 is presen
    if the device is locked and a logic 0 if the device is unlocked.

    datasheet is here
    http://f1chf.free.fr/PDF/SP5055.PDF

    and I know friends who handle the FL bit to check
    if everything is OK ..

  4. #4
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Are you using two different addresses (one for write and one for read)?


    WriteAddress %xxxxxxxxx0
    ReadAddress %xxxxxxxx1

    Were: %xxxxxxx is the binary device address.

    Al.
    All progress began with an idea

  5. #5
    Join Date
    Jan 2005
    Location
    France
    Posts
    97


    Did you find this post helpful? Yes | No

    Default I2C question

    Yes
    I try @C2 and @C3
    the write address is @C2 and it works
    for the READ I use both (to see what happens !)
    because friends told me that they use @C2 and it works
    they told me that PBP add 1 on the address value in a read command ?
    That why I try both ...
    May be my problem is that I am using a VIDEO sender done for 2400 Mhz range
    and I use it on 2335 Mhz (amateur band) and the varicap level is low (near 1,15 volts)
    I will try to set up on 2400 Mhz and see what happen ...

    by the way, have you an idea about the Optionnal Label on I2C command
    is it a GOTO or a GOSUB for you ?

    thanks

  6. #6
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    by the way, have you an idea about the Optionnal Label on I2C command
    is it a GOTO or a GOSUB for you ?
    As I told you in post#2 is a GOTO comand.

    You can put a flag=0 before the I2Cread or I2Cwrite and use the label to direct to a TimeOut label, where you change Flag=1. In this way you will know if you had a timeout problem and discard the reading or writing and redo the process.

    Al.
    All progress began with an idea

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  2. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
  3. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  4. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  5. 18F452 "Unknown Processor" errors
    By schwinn_rider in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th April 2006, 03:56

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