3 Visitor Messages

  1. View Conversation
    'Receive a byte from the I2C bus and place it into variable VAR1.
    Symbol Control2 = % 10010001
    Address = 0xaa ' Read the value at address
    I2Cin SDA, SCL, Control , Address, [ VAR1 ] ' Read the byte
    Print At 4,1,Inverse 0,Dec VAR1
  2. View Conversation
    my code is ----->

    ' Send a byte to the I2C bus.
    Dim VAR1 As Byte ' We'll only read 8-bits
    Dim Address As Word ' 16-bit address required
    Symbol Control = % 10010000 ' Target
    Symbol SDA = PORTC.4 ' Alias the SDA (Data) line
    Symbol SCL = PORTC.3 ' Alias the SSL (Clock) line
    Address = 0xa1 ' Write to address
    VAR1 = 100 ' The value place into address
    I2COUT SDA, SCL, Control , Address , [ VAR1 ] ' Send the byte
    DelayMS 10 ' Allow time for allocation of byte
    Address = 0xa2 ' Write to address
    VAR1 = 5 ' The value place into address
    I2COUT SDA, SCL, Control , Address , [ VAR1 ] ' Send the byte
    DelayMS 10 ' Allow time for allocation of byte
  3. View Conversation
    could you please help me, i am trying to make i2c connection but none of the codes in proton help could run perfectly(I can not get a response).
    connection is between DS1621(temperature sensor) and Pic16f877a


    I printed it to a GLCD and it prints 0
Showing Visitor Messages 1 to 3 of 3
About wirecut

Basic Information


Date of Birth
September 13, 1952 (59)
About wirecut
Location:
Milano - Italy
Interests:
CNC, electronics, FW & SW.
Occupation:
HW,SW & FW Consultant

Statistics


Total Posts
Total Posts
242
Posts Per Day
0.17
Visitor Messages
Total Messages
3
Most Recent Message
30th January 2012 21:55
General Information
Last Activity
Yesterday 09:50
Join Date
26th May 2008
Helpful Postings