Instructions
298Libraries
© 2013 Conrad Electronic
5.16.2.2
srand
Integer Functions
Syntax
void srand(int seed);
Sub srand(seed As Integer)
Description
Sets the seed for the pseudo random number generator. With the same seed the pseudo random num-
ber sequences can be reproduced.
Parameter
seed pseudo random number generator starting value.
5.17 OneWire
1-Wire or One-Wire is a serial interface that needs only one wire for signaling and power. The data is
transferred asynchronously (without clock signal) in groups of 64 bit. Data can either be sent or re-
ceived, but not at the same time (half-duplex).
The special about 1-Wire devices is the parasitically power supply, that is made over the signal wire:
When there is no communication, the signal wire has a +5V level and charges a capacitor. During
low-pulse communication the slave device is powered from his capacitor. Dependent on the charge
of the capacitor, low-time gaps up to 960 µs can be bridged.
5.17.1 Onewire_Read
1-Wire Functions
Syntax
byte Onewire_Read(void);
Sub Onewire_Read() As Byte
Description
A Byte is read from the One-Wire Bus.
Return Parameter
value read from One-Wire Bus