For companies and authorities only - no distribution to private persons!

Customer program examples

Customer examples for BASIC-Tiger programming:


Description of Sntp_Rtc_Demo.tig


The program opens a socket, reads a SNTP time stamp, writes date and time on a 16x2 LCD, and keeps a socket open for incoming connections. When you open a Telnet connection on the Tiger port, the Tiger outputs date and time (DST corrected), as well as times of sunrise and sunset in a loop for maximum 600 times (corresponds to server_ethe.tig)


New functions:

  • Converting the SNTP time (seconds from 1 Jan 1900 0:00) to seconds since 1 Jan 2000 0:00 regarding the MSB in year 2036 and setting the RTC (for this in TIG2DOS and DOS2TIG the year has to be changed from 1980 to 2000). With this the RTC is always set correctly until 2068 (then the LONG variable of the time becomes negative).
  • Calculation of day of week.
  • Exact calculation of DST for Germany with correct DST correction in DOS2TIG and TIG2DOS (in older versions of the routines, partially still used in sample programs the DST in these functions is fixed from 31 Mar to 31 Oct).
  • Calculation of sunrise and sunset depending on longitude and latitude.