Important Note: For Schematic
Important Note: For Schematic
Important Note: For Schematic
For schematic:
For program:
As we know it is important to configure the port
before using it as input or output.
For better understanding
Consider LED (an output device) is connected
to Pin 0 of PORTC (RC0)
We can configure directly inside void main
TRISC0_bit=0;
Or
We can give it some name in global declaration
like
sbit LED1_direction at TRISC0_bit;
and then inside void main we can use
LED1_direction=0;
So both methods to configure any bit of port
are correct and same.