When a value is written to the Value property the value is sent serially out I/O Line 22 and when a value is received serially from I/O line 23 it is stored in a 4-byte buffer and the Received property is set to 1 (cvTrue). After the Received property is set to 1 (cvTrue). Reading the Value property will read a byte out of the 4-byte buffer in a first-in-first-out fashion. If only one byte was in the buffer as the time that is was read then the Received property is set to cvFalse. The value of the Received property can be link to an oDio1 Object that has its Direction property set to cvOutput thereby providing flow control for incoming serial data. The device sending the serial data will be expected to stop sending the serial data while the output of the oDio1 Object is at +5 Volts. If the device sending the serial data sends more than 3 bytes after the Received property is set then the 4-byte buffer will be overrun and data will be lost. The Baud property specifies at which baud rate to send and receive data . It can specify a baud rate of 1200, 2400, 4800, 9600, 19200, 31500, 38400, or 50000 Baud. The serial input and output signals are TTL level signals providing 0 and 5 volts. Conversion to RS232 signals can be done with a TTL to RS232 signal converter chip such as the SN75188 or the MAX203 which will provide the voltage conversion to the RS232 levels of +12 and -12 Volts as well as providing the required signal inversion. CAUTION: do not connect RS232 signals lines directly to the ooPIC's TTL level I/O. The higher voltage of the RS232 lines will damage the TTL level circuitry. When created, the oSerialPort Object also creates an instance of the oSerialH object which it uses to do the actual serial transmissions and receptions. Most properties of the oSerialH instance can be adjusted and will affect the oSerialPort Object's operation. See the oSerialH Help for more detail on how serial data transmissions are made and received. Each dimensioned instance of the oSerialPort Object internally uses this single serial communications module and thus only one instance may be active at any given time. Setting the Operate property to 1 activates an instance of the oSerialPort Object and will deactivate any other object that also uses the serial communications module which were previously activated. |