I2cwrite - I2cread


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302

    Default I2cwrite - I2cread

    I have this:
    I2CWRITE SDA,SCL,ADDR1,[HI,LO,$8E,BAND] 'Sending of the data to the module
    in code and work.
    BAND is : BAND VAR BYTE
    If PLL>720 and PLL<2720 then BAND=$60 'Low range = 45 -> 170 MHz.
    If PLL=>2720 and PLL<=7200 then BAND=$50 'Mid range = 170 -> 450 MHz.
    If PLL>7200 and PLL<14240 then BAND=$30 'High range = 450 -> 890 MHz.

    I want to add and the I2CREAD command to know if the PLL is Lock and to display on LCD.
    I2CREAD SDA,SCL,ADDR2,[LOCK]
    How;
    Last edited by savnik; - 4th July 2006 at 16:24.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    that will be far easier if you tell us wich PLL you're using
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    that will be far easier if you tell us wich PLL you're using
    PIC16F84A AND TSA5511

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    refering to table 2 of the datasheet
    Code:
    IF LOCK.6=1 then 
        LCDOUT $FE,1,"PLL in-lock"
        endif
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    refering to table 2 of the datasheet
    Code:
    IF LOCK.6=1 then 
        LCDOUT $FE,1,"PLL in-lock"
        endif
    Thank you , it's work but show continues.
    I want to show on first line of lcd after the frequency
    like this : 100.3 MHZ LOCK
    and if not lock to show
    like this : 100.3 MHZ UNLOCK

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    PBP manual, LCDOUT section

    Code:
    LCDOUT $FE,1,your frequency plah plah,"MHZ "
    IF LOCK.6=1 then
        LCDOUT "Lock  "
        else
            LCDOUT "Unlock"
        endif
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. I2CRead & I2CWrite not working as expected
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 30
    Last Post: - 27th October 2021, 18:36
  2. Problem with I2Cread and I2CWRITE function
    By Tony85 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th June 2006, 20:03
  3. Problem with I2Cread and I2CWRITE function
    By Tony85 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th June 2006, 18:32
  4. PFC8583 Connection and I2Cwrite I2cread!
    By uludere72 in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 27th February 2006, 13:32
  5. I2CWRITE and I2CREAD
    By Tomas in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 23rd April 2004, 02: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