Hi,
I understand by reading the documents that when a port is read it reads the value of the pin and not the value of the output latch. With that can you please examine the following code sample (not the exact C code but just for explaining my question);
TRISA = 0;
PORTA=0; (Can I write this as I have already set PORTA as an output? I want to keep the output low on PORTA)
....
....
if (PORTA==0) (Can I write this? And if I write this what will be value that is going to be read?)
....
....
Thank you very much.
Buddi
I understand by reading the documents that when a port is read it reads the value of the pin and not the value of the output latch. With that can you please examine the following code sample (not the exact C code but just for explaining my question);
TRISA = 0;
PORTA=0; (Can I write this as I have already set PORTA as an output? I want to keep the output low on PORTA)
....
....
if (PORTA==0) (Can I write this? And if I write this what will be value that is going to be read?)
....
....
Thank you very much.
Buddi