Ciao Michele, and welcome!
As you can see from the picture you attached, there are two pull-ups attached to the /CHG pin:
- The fixed one, 200kohm
- A second one, that can be driven by the micro output.
Now, let's consider the situations described in the datasheet.
To be of some use the OUT pin from the µP must be set either to High or to HiZ (e.g. by setting it as an input), using it as a push-pull output will not help.
First case: the internal N-chan MOSFET in the ltc4006 is turned on, and able to sink more than 100µA.In this case, regardless of the status of the OUT pin the level at the IN pin will be 0 or close to 0:
Worst case is when OUT is driven High: VIN = 3.3V - (33kohm//200kohm)*100µA = 0.47V still readable as a Low level.
Second case: the 25µA source is connected.In this case, the IN will read Low if the OUT pin is HiZ: Imax = 3.3V/200kohm = 16,5µA < 25µA
and High if the OUT pin is High: VIN = 3.3V - (33kohm//200kohm)*25µA = 2,6V
Third case: the /CHG pin is HiZ.In this last case, IN will read High regardless of the state of the µP OUT pin, as only pull-ups are involved.
So you can see that, by driving the OUT pin between High and HiZ and reading the IN pin, it's possible to detect the three states signaled by the /CHG pin.
I hope that's clear enough!
Edit: on second thought, using a suitable resistor and an analog input could be an easier way...e.g. with just a 68kohm pull up you'll have:
100µA: about 0V
25µA: 3.3-68k*25µ = 1.6V, square in the middle of the range.
HiZ: 3.3V