📖⚡DIRSC

Changes Input/Output direction of PORTC, if available for selected processor (Kic28 or Kic40).

This command only works on devices that have a PORTC for outputs ( 📖📼Kic28 Pins  & 📖📼Kic40 Pins )
 
It is common practice to use binary notation to set port direction and pin values. A value of "1" represents an output direction, and "0" represents input direction, this is opposite to the PIC micro controller.

Syntax

[LET] DIRSC = Value

Example

' DIRCS Example
' DirsC.txt
' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
' Select Kic28 or Kic40 for this to compile
' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

DO

  ' 1 = OUTPUT
  ' 0 = INPUT
  DIRSC = %11111111

  HIGH PORTC 0

LOOP

Related commands: