problem with I2CWRITE command


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Oct 2010
    Location
    Northants
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    Bert (and all),
    the problem around I2C is more complicated as I have thought earlier. First, to understand both examples (working and non-wirking) above, it is necessary to study ByVac I2C LCD datasheet. The command $03 writes directly to LCDcontrollers, while command $20 recall routines of the MCU on he I2C ByVac LCD controller. There are of course more commands.

    I did tests with all ByVac commands and changed step by step the "control" variable at I2CWRITE bit by bit. The "control" variable has no influence to I2CWRITE. Still I don't understand it's meaning.

    The I2C analyzer shows bus conflicts / errors. On another place of this forums, in one thread, I have read user's problem with I2CWRITE in case of master/slave devices.

    On the other hand, if I use assembler and write the communication from LAB-X1 to ByVac I2C interface to LCD in assembler, I can use without problems all ByVac interface's commands ... $03, $20, $25... etc., while PBP has problems.

  2. #2
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Is the above your full test program? Have you told PBP osc speed? I will go try to find a datasheet for byvac lcd.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    First off, when you said you looked at the online manual I figured you did not have the printed manual meaning ....
    For that I apologize.

    Th control is specific to the part being used. I have not used the part you are using so I will need to look at the data sheet when I get back to the shop.

    Control does have read/write bits set but normally PBP will changes those for you at compile time.

    In th meantime maybe this will help, maybe a work around if PBP does not work well with your part.
    http://www.picbasic.co.uk/forum/cont...-EEPROM-Part-1
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Assuming this is the data sheet
    http://www.i2c.byvac.com/downloads/B...0DataSheet.pdf

    On the other hand, if I use assembler and write the communication from LAB-X1 to ByVac I2C interface to LCD in assembler, I can use without problems all ByVac interface's commands ... $03, $20, $25... etc., while PBP has problems.
    From what I see on the above data sheet that would be correct. The display is not setup to have more than one on a bus so it does not use a control bit.

    Looks like you will have to use SHIFTOUT. But if you have an ASM routine working just put that into the PBP code.
    Dave
    Always wear safety glasses while programming.

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