128 of 323
ZBasic System Library 118 ZX Microcontroller Family GetPin Type Function returning Byte Invocation GetPin(pin) Parameter Method Type Description pin ByVal Byte The pin to read. Discussion If the specified pin is configured to be an input, this function reads the state of the pin and returns the value 0 or 1 corresponding to logic zero and logic one. If the pin number is invalid the result is undefined. If the pin is configured to be an output, it is reconfigured to be an input in tri-state mode before reading the input value. Compatibility The BasicX documentation says that the result is undefined if GetPin() is called for a pin that is configured as an output. Tests show that the pin is actually reconfigured to be an input in tri-state mode. The ZBasic implementation of GetPin() does the same. See Also PutPin