I2C optional label question


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    You did not understand my post... don't use CONSTANTS but use VARIABLES with I2C commands....

    ControlByte var BYTE

    .. ..

    ControlByte=$C2
    I2CREAD datapin,clockpin,ControlByte, [flag], errorI2C

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


    Did you find this post helpful? Yes | No

    Talking I2C question

    Hello Melanie, morning ..
    Oupps ...I will trust you as usual
    I will test it today
    thanks

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


    Did you find this post helpful? Yes | No

    Default I2C question

    I got it !
    it works ..
    my error was the missing brackets on the I2CREAD command
    it seems that without the bracket the I2CREAD become a I2CWRITE !

    I try using address $C2 or using a constant ... same results
    thanks to everybody
    francois

    here is my HUGE code !
    '*******************************************
    '* Name : TX2300 avec 16F84 *
    ' Variable Definitions
    SCL var PORTA.4
    SDA var portA.3
    LOCKBYTE var byte

    Main:
    I2CWRITE SDA,SCL,$C2,[$48,$F8,$AE,$FF],errorload
    LOCK:
    pause 100
    I2CREAD SDA,SCL,$C2,[lockbyte]
    Lcdout $FE, 1 ' Clear LCD screen
    pause 50
    lcdout "lock=", #lockbyte, " bit=", #lockbyte.6
    pause 1000
    goto lock

    errorload:
    Lcdout $FE, 1 ' Clear LCD screen
    pause 50
    lcdout "error load "
    pause 1000
    goto main

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