| An oPort Object provides access to the PIC's I/O Ports by indexing them via the value of the Port Property. Once the Port property is set, the Direction and the State properties will reflect the Direction and State of the specified PIC I/O Port. The Port property specifies which group of I/O lines to use. The groups are defined by the physical PIC I/O Ports available in the PIC where 1 = Port B, 2 = Port C and 3 = Port D. Setting the Port property to 0 causes the oPort to be inactive. When the State property is read, the value returned is the actual electrical state of the I/O lines within the port specified by the Port property. If any I/O lines have been set to be outputs then typically the value returned is the output value. However, if there is an excessive load on the outputs, then the electrical state may be read differently. When the State property is written, the electrical state of the I/O lines are set only on the I/O lines that have been designated as an output. Note that the two PIC I/O Ports A and E are not controllable with this object. |