This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

XC167CI and I2C bus

Hi,

Am working with XC167CI-16F, am trying to read sonar sensors SRF08 via I2C bus, and I used the code used for eeprom in keil's website but I still have problem that I cant read this sensor while I need to read it ... I need to read that sonar...any help please

Please help me and thanks..

I.J

  • You need to provide more information concerning your problem?

    What data rate 100kbit/s or 400Kbit/s?
    What frequency do you run the XC167CI
    What are the values of the pull up resistors?
    Where are you stuck at?

  • Dear Chris,

    Thanks for replying me, My data rate is 100kbit/s, the frequency that am choosing is 40 MHz,the values of the pull resistors are 4.7kohm.

    I've been working on this since a long time and I found that I need to use the RTC clock with I2C bus am trying to test my sensor (sonar SRF08) which has an address of 0xE0, I need to know what should i do exactly with programming this to read the distance that the sensor is used for ... I need to read and write and use the RTC with this also ....Please I need your help..if you can help me with any thing I'll appreciate that from you since no body has knowledge with this microcontroller in my university to help me...

    regards,
    I.J

  • I can offer you support to help you move along. What I can provide you with is a small code snippet that uses the I2C peripheral and is interrupt driven. The code will read and write a 24LC16B EEPROM.

    Do you really need the RTC because you need an accurate time base? Or do you just need to know when your ranging has completed? If so it would be easier to use one of the general purpose timers instead.

    Anyway, if you post your email I send you the code and offer you some assistance.

    I also assume it is ok with your university to have outside help?

  • Dear Chris,

    Thanks alot for your support, I need your help and as i understood from the hardware manual that I should use the RTC clock with I2C bus modules for infineon XC167CI-16F.

    My emails are: g00022093@aus.edu OR ce_just@yahoo.com, you can use any of them and help me with this, for sure to learn this microcontroller I need support and my university will allow this for sure.

    Thanks,
    I.J

  • Ok, code example has been sent...