TMOneWireLevel Overview Group

The TMOneWireLevel API call reads (‘Operation’ = 1) or sets (‘Operation’ = 0) the 1-Wire communication level. The following are the allowed values to ‘LevelMode’:

00 hex - Normal high impedance (1500 ohm) normal voltage (3-5 volt)
01 hex - Strong pull-up (low impedance normal voltage state cabable of sourcing 50 ma at 3 volts)
02 hex - Break (low impedance zero voltage)
03 hex - Program voltage (12 volt at 10 ma suitable for EPROM programming)

Primed(1) indicates the voltage remains unchanged now but gets changed after the next TMTouchBit. Primed(2) is the same but after the next TMTouchByte. Primed(0) means that the level change is immediate. Primed and value are not used when mode is reading(1).

Note that not all of the above modes will be available for all hardware platforms.

short far pascal TMOneWireLevel(

long session_handle,    // session handle for the desired 1-Wire network
short Operation,        // Read (1) or Set (0) the communication rate
short LevelMode,        // 1-Wire level if setting
short primed            // prime for delay level change

For a description of the above types, see the TMEX Type Descriptions.



Specifies the session handle returned from the API function TMExtendedStartSession that specifies the desired 1-Wire network port. This parameter is required by most TMEX API functions.


Specifies whether reading or setting the 1-Wire network 1-Wire level rate. (1) indicates reading and (0) indicates setting.


Specifies the 1-Wire network 1-Wire level as specified above if the ‘Operation’ parameter is (0) for setting.


Specifies whether the level change if setting is immediate (0) or after the next TMTouchBit (1) or after the next TMTouchByte (2).

Return Value

>=0 => LevelMode that was set or read.

<0 => TMEX Hardware Specific Error Return Code

Code Example

See Also