@@ -37,13 +37,13 @@ A few important maxima, see datasheet, chapter 6.
3737| current | 20 | Ampere | ?? TODO check
3838
3939
40- #### Special characters
40+ ### Special characters
4141
4242- Ω == Ohm = ALT-234 (Windows)
4343- µ == micro = ALT-0181 (Windows)
4444
4545
46- #### Related
46+ ### Related
4747
4848- https://www.ti.com/product/INA236#tech-docs
4949- https://www.ti.com/product/INA236#params
@@ -61,7 +61,7 @@ A few important maxima, see datasheet, chapter 6.
6161
6262## I2C
6363
64- #### Address
64+ ### Address
6565
6666The INA236 comes in two flavours, the INA236A and INA236B
6767with two disjunct address ranges.
@@ -78,7 +78,7 @@ See table - from datasheet table 7.1, page 16.
7878| SCL | 67 | 0x43 | 75 | 0x4B |
7979
8080
81- #### Performance
81+ ### Performance
8282
8383To be elaborated, example sketch available.
8484
@@ -126,7 +126,7 @@ Also see INA226 issue 30 for another typical deviation problem.
126126```
127127
128128
129- #### Constructor
129+ ### Constructor
130130
131131- ** INA236(const uint8_t address, TwoWire \* wire = Wire)** Constructor to set
132132the address and optional Wire interface.
@@ -137,7 +137,7 @@ Note: one needs to set **Wire.begin()** before calling **begin()**.
137137- ** uint8_t getAddress()** returns the address set in the constructor.
138138
139139
140- #### Core Functions
140+ ### Core Functions
141141
142142Note the power and the current are not meaningful without calibrating the sensor.
143143Also the value is not meaningful if there is no shunt connected.
@@ -168,7 +168,7 @@ Helper functions for the micro scale.
168168- ** float getPower_uW()** idem, in microWatt.
169169
170170
171- #### Configuration
171+ ### Configuration
172172
173173** Note:**
174174The internal conversions runs in the background in the device.
@@ -237,7 +237,7 @@ Note: times are typical, check datasheet for operational range.
237237Note: total conversion time can take up to 1024 \* 8.3 ms ~ 10 seconds.
238238
239239
240- #### ADCRange
240+ ### ADCRange
241241
242242The INA236 can set the ADC range to 20 mV (adcRange == true)
243243or to 80 mV (adcRange == false) to optimize the accuracy.
@@ -249,7 +249,7 @@ The function sets the voltage/LSB and returns false adcRange is out of range.
249249Note: this function is not available on INA226.
250250
251251
252- #### Calibration
252+ ### Calibration
253253
254254See datasheet.
255255
@@ -271,7 +271,7 @@ Value should not be zero.
271271To print these values in scientific notation use https://github.com/RobTillaart/printHelpers
272272
273273
274- #### About normalization
274+ ### About normalization
275275
276276** setMaxCurrentShunt()** will round the current_LSB to nearest round value (typical 0.001) by default (normalize == true).
277277- The user ** must** check the return value == 0x000, otherwise the calibration register is ** not** set.
@@ -285,7 +285,7 @@ normalize flag was set to true.
285285See https://github.com/RobTillaart/INA236/pull/29 for details of the discussion.
286286
287287
288- #### Error codes setMaxCurrentShunt
288+ ### Error codes setMaxCurrentShunt
289289
290290| descriptive name error | value | meaning |
291291| :-------------------------------| :--------:| :----------|
@@ -296,7 +296,7 @@ See https://github.com/RobTillaart/INA236/pull/29 for details of the discussion.
296296| INA236_ERR_NORMALIZE_FAILED | 0x8003 | not possible to normalize.
297297
298298
299- #### Operating mode
299+ ### Operating mode
300300
301301See datasheet, partially tested.
302302
@@ -317,7 +317,7 @@ Descriptive mode functions (convenience wrappers).
317317- ** bool setModeShuntBusContinuous()** mode 7 - default.
318318
319319
320- #### Alert functions
320+ ### Alert functions
321321
322322See datasheet, not tested yet.
323323
@@ -353,17 +353,22 @@ Returns true if write to register successful.
353353The alert line falls when alert is reached.
354354
355355
356- #### Meta information
356+ ### Meta information
357357
358358- ** uint16_t getManufacturerID()** should return 0x5449.
359359- ** uint16_t getDieID()** should return 0xA080.
360360
361361
362- #### Debugging
362+ ### Debugging
363363
364364- ** uint16_t getRegister(uint8_t reg)** fetch registers directly, for debugging only.
365365
366366
367+ ### Error Handling
368+
369+ - ** int getLastError()** returns last (I2C) error.
370+
371+
367372## Adjusting the range of the INA236
368373
369374** use at own risk**
0 commit comments