^68 - The Day Rhythm Port

This read/write port contains the state of the Day Rhythm curves on an Ethernet Gateway.
You can write to the port to enable or disable individual curves specified by the subport.

Currently implemented on PDEG, PDDEG-S, and PDTS. 8/24

Syntax

LDA ^68,x
Where x is the curve of Day Rhythms you want the status of or too control with 0 controlling all curves.
STA ^68,0 will enable or disable all curves.
LDA ^68,1 will get the state of the first curve.

^68 port responses

Response

Description

0x00

Disabled

0x01

Enabled

0x02

Curve out of range

Examples

Example 1

Example Enabling different curves for different seasons

Task1()
{
    Name="Winter Curve"    //
    LDA #1
    STA ^68,1           //Enable Day Rhythm Curve for Winter
    LDA #0
    STA ^68,2           //Disable Day Rhythm Curve for Spring/Autumn
    STA ^68,3           //Disable Day Rhythm Curve for Summer
}

Task2()
{
     Name="Spring/Autumn Curve"    //
    LDA #1
    STA ^68,2           //Enable Day Rhythm Curve for Spring/Autumn
    LDA #0
    STA ^68,1           //Disable Day Rhythm Curve for Winter
    STA ^68,3           //Disable Day Rhythm Curve for Summer
}

Task2()
{
     Name="Summer Curve"    //
    LDA #1
    STA ^68,3           //Enable Day Rhythm Curve for Summer
    LDA #0
    STA ^68,1           //Disable Day Rhythm Curve for Winter
    STA ^68,2           //Disable Day Rhythm Curve for Spring/Autumn
}

Example 2

Example enabling and disabling all curves.

Task1()
{
    Name="Disable Day Rhythm"    //Disable Day Rhythm
    LDA #0
    STA ^68,0           //Disable all Day Rhythm Curves on the device
}

Task2()
{
    Name="Enable Day Rhythm"    //Enable Day Rhythm
    LDA #1
    STA ^68,0           //Enable all Day Rhythm Curves on the device
}

Example 3

Example that checks the state of the curve before acting.

{
LDA ^68,3               //Load the state of the third Day Rhythm curve
BRZ DayRhythmDisabled   //If disabled branch, if not assume enabled.
Null
DayRhythmDisabled:
    DyNet(0x1C,0x05,0xFF,0x11,0x00,0x01,0xFF)	// Resume daylight harvesting
    Null
}