Re: INA219 conversion time
you have set the device to continuous conversion mode , the conversion process did not begin when you set "SPARE_PIN and read the bus voltage"
you don't know when it started. i don't believe you are measuring conversion time. the CONVERSION READY BIT was cleared by reading the power reg
it does not trigger a new conversion that i can see.
secondly your snippet gives no indication of read frequency or how or why it would be synced to conversions ..
thirdly the registers can be read at any time after the first conversion in continuous conversion mode i have never found it to be an issue
what are you trying to do ?
Re: INA219 conversion time
Thanks a lot Richard for the reply.
I will try to indicate what I am trying to implement .... using my limited English language.
My program applies a correction to a dc power supply by changing the duty cycle of pic pwm output. After that a change command is sent to power supply, I have to read the results from the power supply new output by reading the INA219 data: I must be sure that the reading is refered to the end of conversion to avoid any overcontrol. I also need to average ( about 128 samples ) to get a stable data reading.
I am not able to understand how implement this operation by studing the INA219 data sheet... it could be that I do not understand it well.
Thanks in advance for any help on this matter.
Regards,
Ambro
Re: INA219 conversion time
Quote:
My program applies a correction to a dc power supply by changing the duty cycle of pic pwm output.
detail is scant, lets start with
how often are these corrections applied and feedback samples taken ?
why are you thinking the free running, continuously available 128 sample averaged results are inadequate ?
Re: INA219 conversion time
thanks,
let me try to explain....
The correction is applied every 150 msec.
let me say that at t=0 the correction is applied.
At t+50 msec the power supply output is completely set.
1> Should I wait 50 msec + 68 msec to get fitered data from INA219 ? ( without looking at the end of conversion bit ).
2> what is the operation of the end of conversion bit ? Is it relevant to What start of conversion ? How is the "start of conversion" started ?
3> what is the triggered mode ? I can not find any description on the ds.
Thanks for helping.
regards
Ambro
Re: INA219 conversion time
Quote:
The correction is applied every 150 msec.
Does that mean you take a new "reading" every 150 ms ?
Quote:
1> Should I wait 50 msec + 68 msec to get fitered data from INA219 ? ( without looking at the end of conversion bit ).
in free run mode yes ,the "read" you get is the latest available
Quote:
2> what is the operation of the end of conversion bit ? Is it relevant to What start of conversion ?
in free run i don't see it has any useful function
Quote:
How is the "start of conversion" started ?
set the config to the triggered mode you desire
Quote:
what is the triggered mode ? I can not find any description on the ds.
data sheet
BASIC ADC FUNCTIONS
Writing any of the triggered convert modes into the
Configuration Register (even if the desired mode is
already programmed into the register) triggers a
single-shot conversion. Table 7 lists the triggered
convert mode settings
Re: INA219 conversion time
Thanks,
it is somewhat clear to me now . I will follow that inmplementation.
> "set the config to the triggered mode you desire " : Yes, it is OK , but when does the trigger start pls ?
Amb
Re: INA219 conversion time
that is the trigger
in continuous mode the end of conversion triggers the next conversion
any other mode (single conversion) waits for user to retrigger it
Re: INA219 conversion time
so the trigger in triggered mode is the sending of the config register ?
Amb
Re: INA219 conversion time
the procedure is to send the conf register and wait for the end of conversion bit and read the data : is this OK?
Ambro