Hello,
I have used Pic Basic Pro a lot, but now I am having a strange behavior, I want to know what can be the problem:
Here is the thing:
For example, if I set:
PORTC.3 = 1
Then the Pin goes High with out problems.
But if I write the code:
PORTC.3 = 1
PORTC.2 = 1
Then pin RC3 goes Low and pin RC2 goes High!
It seems that one instruction clears the previous one.
I am using PIC16F873A, and Setting TRIS Registers as following:
OUTPUT PORTC.3
OUTPUT PORTC.2
I am not assigning TRISC directly because my program uses USART, but that is not the problem I think because the same behavior happens with PortB!
I am using 20Mhz oscillator and defining it in the beginning of the code.
Thank you.
Bookmarks