'***************************************************** '* Sample BalloonSat Mini Mission * '* * '* Every Minute * '* Collects radiation data from RM-60 * '* Records the temperature (compressed 10-bit value) * '* * '* Program size = 77 bytes * '* Left over memory = 178 bytes * '* So stores 174 records, or for 87 minutes * '***************************************************** symbol WordValue = W0 symbol ByteValue = B2 symbol Record = B3 symbol MaxData = 174 symbol MissionPause = 50000 symbol GM = 4 symbol Temp = 1 Begin_Mission: if pin3 = 1 then Download_Data Wait_for_Launch: if pin3 = 0 then Wait_for_Launch Mission_Loop: Geiger: count GM,10000,WordValue ByteValue = WordValue gosub Save_Data Temperature: readadc10 Temp,WordValue Compress: if WordValue < 256 then End_Compress WordValue = WordValue - 255 goto Compress End_Compress: ByteValue = WordValue gosub Save_Data End_Mission_Loop: pause MissionPause goto Mission_Loop Save_Data: if Record = MaxData then End_Mission Record = Record + 1 write Record, ByteValue return '*********************************************** '* Data Format * '* GM (counts / 10s), Temp (compressed 10-bit) * '*********************************************** Download_Data: for Record = 1 to MaxData read Record,ByteValue sertxd (#ByteValue, ",") next End_Mission: end