CALIBRE
3.3.21.Write_IO_Pin
Function specification | int Write_IO_Pin (int IONumber, int IOState) |
Parameters are:int IONumber | |
| The number of the IO pin (0 or 1) to be driven |
| int IOState |
Parameters returned | The required state (0 or 1) of the selected IO pin |
int | |
| Returns a 0 if function successful. |
Prerequisites | Returns 0x800D if the transfer timed out. |
None | |
Functional description | Two spare IO pins are available to drive external logic. IO0 is on PL1 pin 2 and |
| is an open drain driver. When driven low it can sink up to 10mA, when high it is |
| high impedance and cannot source current. A pullup resistor should be fitted to |
| the desired rail which should not exceed +5V. IO1 is on PL1 pin 3 and is a |
| complementary driver which can source or sink up to 10mA. Its logic levels are |
| fixed at 0V and +5V nominal. |
3.3.22.Read_IO_Pin
Function specification | int Read_IO_Pin (int IONumber) |
Parameters are:int IONumber | |
Parameters returned | The number of the IO pin (0 or 1) to be read |
int | |
| Returns the state (0 or 1) of the chosen IO pin if function successful. |
Prerequisites | Returns 0x800D if the transfer timed out. |
None | |
Functional description | Two spare IO pins are available which can be driven by external logic. IO0 is |
| on PL1 pin 2 and IO1 is on PL1 pin 3. These pins are normally high impedance |
| input unless specifically driven by the Write_IO_Pin function. They can be |
| driven high or low by external logic then read by the Read_IO_Pin function. |
| Normal 5V CMOS logic levels (0 < 1.5V, 1 > 3.5V) should be applied for reliable |
| reading. |
Issue 1.0 | Page 14 |
01/07/03 |
|