5.48 OUTPUT
OUTPUT Pin
Make the specified Pin an output. Pin may be a constant, 0 - 15, or a variable that contains a number 0 - 15 (e.g. B0) or a pin name (e.g. PORTA.0).
OUTPUT 0 ' Make Pin0 an output
OUTPUT PORTA.0 ' Make PORTA, pin 0 an output
Alternatively, the pin may be set to an using direct register access:
TRISB.0 = 0 ' Set PORTB, pin 0 to an output
All of the pins on a port may be set to outputs by setting the entire TRIS register at once:
TRISB = %00000000 ' Set all of PORTB to outputs
Bookmarks