Clarification of Input/Output

Problem:
Although the diagrams and explanation on page 33 are correct, the words "Input" and "Output" appear to have been transposed at one point.

Solution:
The golden rule is:
  • Logic 0 = Output pin or a pin used for another purpose (such as a UART input)
  • Logic 1 = Input
The chapter titled "Ports" on page 33 should now start:

Each pin of each port is individually configurable as input or output. This is done by going to register bank 1 and setting the appropriate bit to a one for an input or clearing it to a zero for an output. For example, to set port B so that bits 0 to 3 are inputs and bits 4 to 7 are outputs, move the value of 00001111 binary (0x0F hexadecimal) to register 6 in bank 1.

(Corrections are shown in red).

See also:
Input/Output initialisation on PIC chips with A/D convertors.


Further information:
I hope that this page helps you with your projects but if you have found any other problems or if you have any further questions please contact me though the email address of gares-AT-g4aym-DOT-org-DOT-uk.

Sorry about the email address but it seems to be the only way to avoid the spammers



Click here to return to the PIC Basics Main Page

Click here for the Index of Errors and Ommissions