234
Platforms
©2000-2008 Tibbo Technology Inc.
the TX buffer. Other bits can contain any data. You can, for instance, put a string
of ASCII characters '0' and '1' into the TX buffer and these will be correctly
interpreted as data bits 0 and 1. This, again, is convenient for your BASIC
application.
How the serial port transmits clock/data stream
Clock/data output timing is fixed and your application cannot change it. The data is
output at a rate of 400us/bit (both LOW and HIGH phases of the clock signal are
200us in length).
How the serial port receives clock/data stream
The serial port does not require an incoming clock/data stream to adhere to any
strict timing. The port is simply registering high-to-low transitions on the clock
line. When such transition is detected, the port checks the state of the data line. If
the line is HIGH, data bit 0 is registered, when the line is low, data bit 1 is
registered.
The end of clock/data transmission is identified by timeout- the serial port has a
special property for that, called "intercharacter delay" (see
).
Another property- "auto-close"- can be used to disable the serial port after the
delay has been encountered. This way, when the clock/data output is over the port
will be disabled and no further data will enter the port until you re-enable it.
Port Selection
There may be platforms with more than one serial port. You can obtain the number
of serial ports available for your platform using the
property.
Since there can be multiple ports, you must state which port you are referring to
when changing properties or invoking methods. This is done using the
property. For example:
ser.mode =
PL_SER_MODE_WIEGAND
236
258
257