INA219 library/example (Developmental Version)

Here you can ask for specific code examples and discuss about it with other forum members.
Post Reply
Author
Message
cxshermansg
Posts: 13
Joined: 02 Feb 2018 14:49
Location: Singapore

INA219 library/example (Developmental Version)

#1 Post by cxshermansg » 26 Mar 2018 19:40

Hi guys, though I haven't seen anyone requesting for it, I thought I might put it here. If anyone is ever looking to work with the Adafruit INA219 Current Sensor Module, and wants to use it with the PIC microcontrollers, I have taken the original version and converted it into the mikroC version.

You just need to copy the INA219.c and INA219.h files to your project directory. You can use my INA219_Main.c as a reference.

From what I have just tested, the values seem to come back fine, although there could still be errors and issues I haven't seen yet. So far, I have only tested the Current reading. I haven't been able to test the shunt voltage, bus voltage, and power reading yet.

Here's the source code for everyone and anyone who wants to use it in your projects:
INA219.zip
(188.57 KiB) Downloaded 1372 times
I hope what I have done will help anyone who's looking for similar applications in your own projects.
cxshermansg
"I am always hacking at something, 24-7-265 days a year."/ "For some people, they have to be lucky all the time, but I only have to be lucky once." / "Keep trying and never give up until you succeed."

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: INA219 library/example (Developmental Version)

#2 Post by filip » 13 Apr 2018 09:36

Hi,

Thanks for sharing this. :)

Regards,
Filip.

paulfjujo
Posts: 1550
Joined: 24 Jun 2007 19:27
Location: 01800 St Maurice de Gourdans France
Contact:

Re: INA219 library/example (Developmental Version)

#3 Post by paulfjujo » 03 Apr 2019 19:54

hello,
cxshermansg wrote:...
You just need to copy the INA219.c and INA219.h files to your project directory. You can use my INA219_Main.c as a reference.
From what I have just tested, the values seem to come back fine, although there could still be errors and issues I haven't seen yet. ts.
a good intention,but

i am working on this INA219 .... to replace ACS712 device
unfortunatly, they are too much errors discovered in your files....

maybe i will propose another version ..later

fvgm
Posts: 96
Joined: 30 Oct 2007 16:16
Location: Brazil

Re: INA219 library/example (Developmental Version)

#4 Post by fvgm » 17 May 2020 23:44

Hi paulfjujo,

Did you has a working version of this INA219 library? Did you have corrected all the issues as you mentioned before? Please, share with us if you can.
Thanks.

Post Reply

Return to “Code Requests”