Description: |
| | Provides a high-speed asynchronous serial I/O port using hardware specific I/O lines. |
| | The following table lists the size and availability of the oSerialH Object.
| | Object | Size | Description | A1 | A2 | B1 | B2 | C1 |
 | oSerialH | 4 Bytes | Provides a high-speed asynchronous serial I/O port using hardware specific I/O lines. | x | x | x | x | x |
|
Operation: |
| | When a value is written to the Value property, the value is sent serially out I/O Line 22. When a value is received serially from I/O line 23 it is stored in the Value property and the Received property is set to 1 (cvTrue). 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 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 and data after the Received property is set then the 1-byte buffer will be overrun and data will be lost. When created, the oSerialH Object also creates an instance of the oUSART object which it uses to do the actual serial transmissions and receptions. Most properties of the oUSART instance can be adjusted and will affect the oSerialH Object's operation such as USART.Mode which is used to specify synchronous or asynchronous operation. See the oUSART Help for more detail on how serial data transmissions work. |
Properties: |
| | The following table lists the properties of the oSerialH Object:
|
Examples: |
| | In the following examples, the oSerial Object is used
'This program reads an oA2D Object
'and sends the value to a PC
'connected via a serial port.
'Note: No flow control is used.
Dim A As New oSerial
Dim B As New oA2D
Sub Main()
B.IOLine = 1
B.Operate = cvTrue
A.Baud = cv9600
A.Operate = cvTrue
Do
A.Value = Str$(B)
A.Value = 13
A.Value = 10
Loop
End Sub | 'This program takes any serial
'data that a oSerial Object
'has received and sends it
'back out the oSerial Object.
'Note: No flow control is used.
Dim A As New oSerial
Sub Main()
A.Baud = cv9600
A.Operate = cvTrue
Do
If A.Received = cvTrue then
A.Value = A.Value
End If
Loop
End Sub |
|
Related Items: |
| | The following table lists objects that use the oSerialH Object.
| | Object | Description | A1 | A2 | B1 | B2 | C1 |
 | oSerialPort | Provides a high-speed asynchronous serial I/O port with a buffer. | x | x | x | x |
|
| | The following table lists objects with related functions
| | Object | Description | A1 | A2 | B1 | B2 | C1 |
 | oSerialL | Provides a low-speed asynchronous serial Input or Output on any I/O line. | x | x | x |
 | oSerialPort | Provides a high-speed asynchronous serial I/O port with a buffer. | x | x | x | x |
 | oSPIL | Provides a low-speed Serial Peripheral Interface on any I/O line. | x | x |
|
Version History and Bug List: |
| | Firmware Ver A.1.0: Introduced. Firmware Ver B.1.0: 19200, 4800, and 50000 baud added. Firmware Ver B.2.0: 38400 baud added.Bugs: No known bugs. |