ex_tick_sec8.c

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

00001 
00006 #include "net\tick.h"
00007 
00008 void main(void) {
00009 
00010     //Second tick variables
00011     TICK8  tsec8Bit = 0;    //8 Bit Second Tick, range of 0 to 255 seconds
00012 
00013     //Infinite loop
00014     while(1)
00015 
00016         //Use 8 bit second tick, execute every second
00017         //This method uses a 8 bit second tick, which produces small and fast
00018         //code, but only has a range of 0 - 255 seconds. It has a resolution of
00019         //1 second.
00020         if ( TickGetDiff8bitSec(tsec8Bit) >= 1)
00021         {
00022             tsec8Bit = TickGet8bitSec();
00023 
00024             //Add uses code here. This code is executed every second
00025             ...        
00026         }
00027     }
00028 }

Generated on Mon Oct 9 13:22:06 2006 for SBC65EC Web Server by  doxygen 1.4.7