Hi Everyone,I hope use RL78 I2C Master Read my sensor data,But now only recvice sensor address,I can't find any data in logic analyzer.Thanks.
Device address 0xD0Data Reg 0x00
Main.c code
LA Image
Hello Nazukolin,
What is the "test" variable in your code? Does it become 5 to enter the branch in which you read the data?
Kind regards,
Sergey
If this response, or one provided by another user, answers your question, please verify the answer. Thank you!
Renesas Engineering Community Moderatorhttps://community.renesas.com/https://academy.renesas.com/https://en-support.renesas.com/knowledgeBase/
Hi Sergey(SWF),"test" variable just like delay function,not special function.Will this become 5 cause an error?
No, this shouldn't cause any error. Just need to make sure it is used correctly. Did you set the breakpoint inside the branch where you read the data and check that the program enters it? We need to figure out whether the problem is with the I2C module or with the program logic.
Hi Sergey,I solved this problem,add StopCondition() function in code,I get sensor data.Thank you!!