Having problem with I2C


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2009
    Posts
    3

    Default Having problem with I2C

    Hi
    I have a problem with pic basicpro I 'm write the this code
    i2cwrite porta.0,porta.1,$c6,0,[#x] but it didn't compile
    I 'm used Pic16f877A & LCD03 and I need the lcd show too me x number.
    what should i do ?
    Thanks a lot

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


    Did you find this post helpful? Yes | No

    Default

    As I told you #x is not allowed in I2CWRITE. What you'll need is to parse each number in x variable (DIG should do the trick), then convert each of them to ASCII, then send the whole thing.
    Steve

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

  3. #3
    Join Date
    Feb 2009
    Posts
    3


    Did you find this post helpful? Yes | No

    Default I2c

    Hi
    How i can do this?
    can you write a exam code to me ? beacause it is vary important to me
    thanks

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


    Did you find this post helpful? Yes | No

    Default

    First, have a look into your manual about DIG, somewhere in the begining of your manual.
    Steve

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

  5. #5
    Join Date
    Dec 2006
    Location
    WADSWORTH OHIO USA
    Posts
    37


    Did you find this post helpful? Yes | No

    Default dig and some...

    This uses a 16f processor to drive LED segments without a current limiting resistor.
    Attached Files Attached Files
    Thanks !
    SOMRU
    TWE/TFP/EE

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  3. Another I2C Slave Routine Problem
    By DanPBP in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th February 2009, 05:50
  4. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  5. I2C eeprom and DS1307 @40MHz problem
    By ius01 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 20th July 2007, 07:41

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