I need help with I2C

Status
Not open for further replies.

coma

New Member
im have so much trouble programing a I2C read function for VB 6 is there anyone out there that can help me!!!! :?: :!:
 
custom hardware.
2 input lines (SDA, SCL)
2 output lines
each with buffers on them...

tomorrow ill post the schemaic
 
Perhaps I should have been more specific ... Are you using the parallel port of your computer has the I2C bus device?
 
here is the schem

I am using the parallel port, i can send data in serial but it doesn recieve anything... so i cant tell if what ive sent is correct

here is my setup, thanks to the help of this forum
 

Attachments

  • Image2.gif
    14.2 KB · Views: 444
Just a wild guess, but you may not be reading the status port at the right time. Your program loop should work like this simplified sequence.
1. Write clock & data to port data register
2. Read status register bits and compare to write
3. Clear clock and data bits
4. Repeat loop for next bit

If you try to read the status AFTER you have cleard the data, you will not see it.
Dialtone
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…