Tool/software:
i using INA226 in my pcb design.
İ have a 1R shunt resistor and also i working with 2.5uV LSB. i measuring current on lamp and i appyl 5V lamp. My lamp current is 40mA when i apply 5V.
when i setting alert pin for 50mA (alert pin being low state)
when i setting alert pin for 60mA (alert pin being low state)
when i setting alert pin for 70mA system doesnt working (alert pin being low state)
if i setting alert pin for 80mA system works and lamp blink.
i checked shunt voltage and current register adreess. i saw my current as i said 40mA. Alsa i measured with multimeter. My current is correct.
Why my system doesnt work, when i set alert limit register as i said status. Why my sistem works just when i seting alert limit register for 80mA
i sharing my code;
void INA226_Config_Register()
{
uint16_t config_Reg_Data=0x48A7;
Write_All_Devices(INA226_CONFIG_REG,config_Reg_Data);
}
void INA226_Calibration_Register()
{
uint16_t config_Reg_Data=0x800 ; //For 100mA ->>LSB==2.5 µA/bit. Rshunt=1R on board.
Write_All_Devices(INA226_CALIBRATION_REG,config_Reg_Data);
}
void INA226_Enable_Shunt_Over_Limit()
{
uint16_t Enable_Reg_Data=0x8001;
Write_All_Devices(INA226_MASK_ENABLE_REG, Enable_Reg_Data);
Read_All_Devices(INA226_MASK_ENABLE_REG);
}
void INA226_Set_Current_Alert_Limit()
{
uint16_t alert_limit = 0x7D00; //0x1F40=20mA Alert Limit set,0x2710=25mA,0x1770=15mA,0x4E20=50mA ,0x5DC0=60mA ,0x9C40=100mA,0x6D60=70mA,0x7D00=80mA
Write_All_Devices(INA226_ALERT_LIMIT_REG , alert_limit);
}