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

reading Data using I2C

Hi

i want to read data using I2C, just like reading temperature from any digital sensor, located at the Address 0X00,

Is there a simple source code?

Parents
  • You do two things.

    1: You google for I2C support for your specific processor. And you also download the relevant datasheets/user manuals/application notes/... that are applicable for your processor.

    2: You google for your specific sensor. And you also download the relevant datasheets/user manuals/application notes/... that are applicable for that sensor.

    You should not expect to find a perfect match - someone who have a program that is using your exact processor and your exact sensor. But that is irrelevant. Whatever code you do find, you must still be able to understand the code or you will be 100% lost. Embedded programs are not turn-key. They always requrie adaptations. And that adaptation requires you to understand the code so you will know what you must adapt. Hence, there shouldn't be a problem to adapt a I2C code for your processor to send the correct addresses/commands to make use of your specific sensor.

    Remember also that your school teacher expects you to learn something from this project. And he/she expects that you understands what happens when the program runs - how else are you going to explain the design and your thought behind the design?

Reply
  • You do two things.

    1: You google for I2C support for your specific processor. And you also download the relevant datasheets/user manuals/application notes/... that are applicable for your processor.

    2: You google for your specific sensor. And you also download the relevant datasheets/user manuals/application notes/... that are applicable for that sensor.

    You should not expect to find a perfect match - someone who have a program that is using your exact processor and your exact sensor. But that is irrelevant. Whatever code you do find, you must still be able to understand the code or you will be 100% lost. Embedded programs are not turn-key. They always requrie adaptations. And that adaptation requires you to understand the code so you will know what you must adapt. Hence, there shouldn't be a problem to adapt a I2C code for your processor to send the correct addresses/commands to make use of your specific sensor.

    Remember also that your school teacher expects you to learn something from this project. And he/she expects that you understands what happens when the program runs - how else are you going to explain the design and your thought behind the design?

Children