Description: |
| | A Processing Object that takes a clock input, divides it by a specified divisor and provides a clock output with the newly calculated clock rate. |
| | The following table lists the size and availability of the oClock Object.
| | Object | Size | Description | A1 | A2 | B1 | B2 | C1 |
 | oDivider | 5 Bytes | Provides a clock divider. | x | x | x | x | x |
|
Operation: |
| | The oDivider Object monitors the oLogic Object that the Input property points to. Each time the monitored value transitions from 0 to 1 or from 1 to 0, a half-tick is counted. The number of half-ticks is then compared to the number specified by the Rate property. When the half-tick count is equal to the Rate property, the Result property is inverted. This process results in the Result property equaling the Input frequency divided by the Rate property. For example, if the Input property is linked to a 60hz input and the Rate property is set to 1, then the Result property will also cycle at 60hz. But if the Rate property is set to 3, then the Result will cycle at 20hz. If the Rate property is set to 0, then the Input clock is divided by 256. The default value of the Rate property is 1. |
Properties: |
| The following table lists the properties of the oDivider Object:
|
Example:
|
| The following examples use the oDivider Object.
| Visual Basic Syntax | C and Java Syntax |
' This program generates a 3Hz Clock
' by using an oDivider to divide the
' ooPIC.Hz60 property by 20.
Dim A As New oDivider
Dim B As New oDIO1
Sub Main()
A.ClockIn.Link(ooPIC.Hz60)
A.Rate = 20
A.Output.Link(B)
A.Operate = 1
B.IOLine = 8
B.Direction = cvOutput
B.Value = 1
End Sub | // This program generates a 3Hz Clock
// by using an oDivider to divide the
// ooPIC.Hz60 property by 20.
oDivider A = New oDivider;
oDIO1 B = New oDIO1;
Void Main(Void){
A.ClockIn.Link(ooPIC.Hz60);
A.Rate = 20;
A.Output.Link(B);
A.Operate = 1;
B.IOLine = 8;
B.Direction = cvOutput;
B.Value = 1;
} |
| Basic Syntax | |
' This program generates a 3Hz Clock
' by using an oDivider to divide the
' ooPIC.Hz60 property by 20.
A As oDivider(ooPIC.Hz60,,B,,20,cvOn)
B As oDIO1(8,cvOutput,1) |
|
Related Items:
|
| | The following table lists objects with related functions
| | Object | Description | A1 | A2 | B1 | B2 | C1 |
 | oClock | Provides a programmable logic clock | x | x | x |
|
Version History and Bug List: |
| | Firmware Ver B1: Introduced. Bugs: No known bugs. |