Hi;
This is an old but interesting demo from Microchip (appnote 557), demonstrating how to use
a low pin PIC for a complex task.
-- is there any chance of turning on that transistor,without pic's output goes high ...
Yes, of course, there's a chance
- ) but it does not matter because during the AD measuring
the PORTB is disabled via the software. See the source (MPLXAD.ASM).
But because of the voltage dividing (in this case it's also nonlinear) always use analog buffer!
-- and also whether this circuit will work well with the pic16f877a ...
Yes, it will work, with the appropriate conversion of the software
- ).
However, the 16f877a has much more IO pins so you can prevent using
a pin as analog-digital IO (for example).