REM 8 Channel Datalogger program REM Written by Thomas Bachmann 07/22/92 REM Copyright (c) 1992 Blue Earth Research REM This program samples 8 analog input channels and logs the data into REM the Micro-440's memory. Channels are sampled 4 times per hour and REM averaged so that one data point per hour is stored for each channel. REM Data is stored in a contiguous block between 5000H-5FFFH. This REM allows for 4,095 memory locations (data points) which provides 511 REM hours (about 21 days) of data storage. REM A time stamp is placed in memory locations 40E0H-40ECH when the REM system begins to collect data, and the memory address of the REM beginning data point is stored in memory locations 40EEH & 40EFH. REM The memory address of the current data point location is stored in REM memory locations 40F0H & 40F1H. The number of times that the REM program stored the beginning data information is stored in memory REM location 40F2H. This can be used to determine if there are any REM data gaps due to a power loss. REM Other notes: REM Write protect the memory, put in the autoexec mode. REM Autoexec Mode is implemented by executing the following: REM A=6001H:XBY(A+1)=0FFH:XBY(A+2)=0D9H:XBY(A)=0BBH:XBY(A+6)=0DDH 1 REM Hourly Datalogger REM Allow for a serial character to terminate the program on power-up. 5 X=0 : G=GET : DO : G=GET : X=X+1 : IF G THEN X=1001 6 WHILE X<1000 : IF G THEN END REM Initialize system variables and parameters. 10 DIM R(10) : GOTO 200 REM SUBROUTINE TO INCREMENT THE POINTER, VALIDATE IT, AND SAVE IT 12 A=A+CH : IF A