Re: PORTB incorrect condition when simulate in proteus
As you note in post #4: RB4 is AN11.
Therefore, to read digital input values on RB4 you must clear the ANS11 bit of ANSELH. (Section 3.4.1 of the Data Sheet.)
Simulation of physical I/O is like bear hunting---sometimes you get the bear; sometimes the bear gets you.
Personally, I wouldn't spend a New York minute on simulating physical I/O. (But that's just me: I'm funny that way.) Ars longa, vita brevis.
post edited by davekw7x - 2017/10/07 11:19:48
Sometimes I just can't help myself...