ex_tick_sec8.c

This example code shows how to use the 8 bit second Tick functions.

#include "net\tick.h"

void main(void) {

    //Second tick variables
    TICK8  tsec8Bit = 0;    //8 Bit Second Tick, range of 0 to 255 seconds

    //Infinite loop
    while(1)

        //Use 8 bit second tick, execute every second
        //This method uses a 8 bit second tick, which produces small and fast
        //code, but only has a range of 0 - 255 seconds. It has a resolution of
        //1 second.
        if (TickGetDiff8bitSec(tsec8Bit) >= (TICK8)1)
        {
            tsec8Bit = TickGet8bitSec();

            //Add uses code here. This code is executed every second
            ...        
        }
    }
}

Generated on Wed Feb 3 12:45:33 2010 for SBC65EC Web Server by  doxygen 1.5.8