Description: |
| A Processing Object that performs a Real Time Clock format counting operation by increasing or decreasing an oBuffer Object's array for each "Clock-Tick" |
| The following table lists the size and availability of the oRTC Object.
| | Object | Size | Description | A1 | A2 | B1 | B2 | C1 |
 | oRTC | 4 Bytes | Causes an oBuffer Object to maintain a Real Time Clock. | x | x | x | x | x |
|
Operation: |
| | When using the oBuffer object, to which this object points, the digits are loaded from left to right as they are read. buf(1) = hours 10's digit, 2 = hours 1's digit, down to the seconds and if using 1/60th second tics, those two digits at location 7 and 8. Each digit takes up a whole byte within the oBuffer object. The oRTC object will update and overflow the buffer data to reflect the time. Use the oBuffer.RTCString property to get the time from the RTC. Note that this is not a battery backed up clock and it is not perfectly accurate. It is handy as a quick digital time keeping clock. |
Properties: |
| The following table lists the properties of the oRTC Object:
Property | Description |
| Operate |
| A value that selects whether or not the count is updated. |
 | Object Class: | oOperate | | Value Range: | 0 - 1 |
| Data Type: | Numeric | | Default Value: | 0 |
|
| Operate | Constant | Description |
| 0 | cvOff | The count is not updated. |
| 1 | cvOn | The count is updated. |
|
|
| ClockIn1 |
| A pointer to an oLogic Object whose value, when cycled, is used to increment and decrement the value of the oBuffer object pointed to by the Output property. |
 | Object Class: | oLogicPtrI | | Value Range: | Any oLogic Object |
| Data Type: | Pointer | | Default Value: | Null |
|
| A "Clock Tick" is counted when it changes from High to Low in value. |
|
| Output |
| A pointer to an oBuffer Object whose byte-array will be incremented or decremented in an 24-Hour clock fashion. |
 | Object Class: | oBufferPtr | | Value Range: | Any oBuffer Object. |
| Data Type: | Pointer | | Default Value: | Null |
|
|
| Direction |
| A value that selects the direction of the count. |
 | Object Class: | oSelect0to1L | | Value Range: | 0 - 1 |
| Data Type: | Numeric | | Default Value: | 0 |
|
| Direction | Constant | Description |
| 0 | cvPositive | Count positively (Increment) |
| 1 | cvNegative | Count negatively (Decrement) |
|
|
| Tick |
| A value that selects how the oRTC object values each Clock-Tick. |
 | Object Class: | oSelect0to1 | | Value Range: | 0 - 1 |
| Data Type: | Numeric | | Default Value: | 0 |
|
| If the Tick property is set to 1, the 100ths second byte of the Output object is incremented or decremented by 1 each clock-tick. If Tick property is cleared to 0, the seconds byte of the Output object is incremented or decremented by 1 each clock-tick. |
| Tick | Description |
| 0 | Each "Tick" detected by the oRTC Object increments or decrements the ones column of the Seconds. |
| 1 | Each "Tick" detected by the oRTC Object increments or decrements the ones column of the 1/60 Seconds. |
|
|
| PM |
| A value that indicates that the time is afternoon. |
 | Object Class: | oLogic | | Value Range: | 0 - 1 |
| Data Type: | Numeric | | Default Value: | 0 |
|
| PM | Description |
| 0 | The Real-Time-Clock is less than "12:00:00:00" |
| 1 | The Real-Time-Clock is more than or equal to "12:00:00:00" |
|
|
| Address |
| Returns a pointer to the address of the oCounter Object instance. |
 | Object Class: | oAddress | | Value Range: | 0 - 127 |
| Data Type: | Pointer (Read Only) | | Default Value: | Address of Object |
|
|
|
Example:
|
| The following examples use the oRTC Object.
| Visual Basic Syntax | C and Java Syntax |
'This program creates a Virtual
'Circuit that displays the time
'on a LCD Module.
Dim L As New oLCD
Dim T As New oRTC
Dim B As New oBuffer8
Sub main()
T.ClockIn1.Link(ooPIC.Hz1)
T.Output.Link(B)
T.Operate = 1
L.IOGroup = 3
L.IOLineRS = 26
L.IOLineE = 27
L.Nibble = 1
L.Operate = 1
L.Init
L.Clear
Do
L.Clear
L.VString = B.RTCString
ooPIC.Delay = 99
Loop
End Sub | // This program creates a Virtual
// Circuit that displays the time
// on a LCD Module.
oLCD L = New oLCD;
oRTC T = New oRTC;
oBuffer8 B = New oBuffer8;
Void main(Void){
T.ClockIn1.Link(ooPIC.Hz1);
T.Output.Link(B);
T.Operate = 1;
L.IOGroup = 3;
L.IOLineRS = 26;
L.IOLineE = 27;
L.Nibble = 1;
L.Operate = 1;
L.Init;
L.Clear;
Do{
L.Clear;
L.VString = B.RTCString;
ooPIC.Delay = 99;
} While (1);
} |
| Basic Syntax | |
'This program creates a Virtual
'Circuit that displays the time
'on a LCD Module.
L As oLCD(3,1,27,26,cvOn)
T As oRTC(,,,,cvOn)
B As oBuffer8
T.ClockIn1.Link(ooPIC.Hz1)
T.Output.Link(B)
L.Init
L.Clear
Do
L.Clear
L.VString = B.RTCString
ooPIC.Delay = 99
Loop | |
|
Related Items:
|
| The following table lists other objects with related functions.
| | Object | Description | A1 | A2 | B1 | B2 | C1 |
 | oBuffer(1-32) | 32 Objects that Manage various sized data-buffer/string variable. | x | x | x | x | x |
|
Version History and Bug List: |
| Firmware Ver A1: Introduced. Bugs: No known bugs. |