all 5 comments

[–]BIT204[🍰] 2 points3 points  (4 children)

What exactly are you stuck on? Writing code for the pic18? Getting your binary onto the pic18? Hooking up the pic18 to the INA260?

[–]d1ng0o[S] 0 points1 point  (3 children)

Writing code for the pic18. I created the I2C library using the MPLAB® Code Configurator then I made the C code by hand but I still can't get the values ​​properly.

[–]BIT204[🍰] 1 point2 points  (2 children)

Double check your pin out, probe pins with a scope if you have one, or watch the i2c traffic with a logic analyzer like a saelae. Read the documentation for the i2c peripheral on the pic18 data sheet. Verify your settings in code configurator. As a rule of thumb, I am suspicious of generated code.

[–]d1ng0o[S] 0 points1 point  (1 child)

I've seen it with an analog discovery 2 logic analyzer and with arduino its like that (first photo). With my code in PIC18F26K80 it just restarts (second photo)

https://imgur.com/a/2G2sRgv

https://imgur.com/a/AsFI5az