As far as I understand PBP manual and in practice before, HIGH PORTX.Y makes that pin high and LOW PORTX.Y makes that pin low.
As far as I understand PBP manual and in practice before, HIGH PORTX.Y makes that pin high and LOW PORTX.Y makes that pin low.
TRISB.7=1 makes portb.7 an input
TRISB4.=1 makes portb.4 an input
TRISB.7=0 makes portb.7 an output
TRISB4.=0 makes portb.4 an output
Is this really what you want?
Ioannis
No. I want to make PORTB.7 output logical "1" and then logical "0". PBP statements like HIGH PORTB.7 work, but only if I do not read PORTA.0 as input.
So, why in your loop, you use TRIS to make the ports input then output? You should use High Portb.7 or Low Portb.7 and not TRIS. TRIS is only to define the input or output operation.
Ioannis
If you check my post, initially I was using HIGH/LOW. But it does not work. TRIS works, but not completely.
You insist on TRIS. The purpose of TRIS is completely different than what you trying to do...
You set once on the top of your program what every port will be (input or output) with the TRIS command and then you do not touch it again. Except if you want to change a port from output to input intentionally.
If you want to control the state of an output port you only use High and Low of that specific port.
Ioannis
I absolutely do not care about what statement it will be.
I'm asking why it does not works, whenever it is HIGH/LOW or TRIS.
Bookmarks