11.07.2015 Views

PICBASIC PLUS LITE Manual - Profe Saul

PICBASIC PLUS LITE Manual - Profe Saul

PICBASIC PLUS LITE Manual - Profe Saul

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PICBASIC</strong> <strong>PLUS</strong> Compiler5.33. INPUTSyntax :Overview :Operators :INPUT Port . PinMakes the specified Pin an input.Port.Pin must be a Port.Pin constant declaration.Example : INPUT PortA.0 ‘ Make bit-0 of PortA an inputNotes :An Alternative method for making a particular pin an input is by directlymodifying the TRIS register: -TRISB.0 = 1‘ Set PORTB, bit-0 to an inputThe above method is quicker, and produces less code than the IN-PUT command.All of the pins on a port may be set to inputs by setting the wholeTRIS register at once: -TRISB = %11111111‘ Set all of PORTB to inputsIn the above examples, setting a TRIS bit to 1 makes the pin an input,and conversely, setting the bit to 0 makes the pin an output.70Copyright Crownhill 2001

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!