Hello, I am a student and currently working with AT89C2051. I'm new to this microcontroller. I,m using it in a circuit in which I need to compare a variable analog input to reference voltage using analog comparator of AT89C2051. I need to perform some operations in accordance with the logical output of comaprator. But I've stuck on it and don't know how to use this analog comparator. Please provide me the complete details/ C-code to perform this ASAP..
And you really did not find any information about how to configure the analog comparator? The world is void of such information?
To answer you question directly.
Yes you'll be fine. If you write a value to a port that is the same as the existing value nothing will happen on the output of the pin. It will stay at the same level and you will not see any disturbances.
That said be careful with using PORT when writing and reading. Typically you should write to the PORT and read from the PORT. You can have some funny race conditions if you write to the PORT because of how the processor does read/modify/write to the port bits.
You can have some funny race conditions if you write to the PORT because of how the processor does read/modify/write to the port bits.
I have worked with the '51 for decades and never seen that
Erik
Now I've understood this and even have developed the program for this.. Thanks for your suggestions !!