Record_Data: if record = 2047 then End_Mission ' check that aren't writing too many 'records to memory record = record + 1 ' increment record number low 0 ' unwrite protect memory writei2c ' write the next record to memory pause 10 ' wait 10 ms for write high 0 ' write protect memory return ' return to the calling calling subroutine Download_Data: read 0,record ' get the number of data records recorded ' in this flight for index = 1 to record ' until the number of data records readi2c index,(value) ' read the recorded record sertxd (#value,",") ' serial out the data record next ' until last data record read out goto fail fail: ' this is what flashing patern that will occur if the high 3 'battery dies some time during flight and the computer pause 1000 ' has restarted and not taken data low 3 pause 5000 goto fail End_Mission: 'this is if data was recorded during the whole flight low 3 ' this shows that the memory is full pause 1000 ' and that the flight computer functioned properly for ' the flight high 3 pause 5000 goto End_Mission end ' end of mission The weather station is programmed to take data every 5 seconds. It records pressure, temperature, and relative humidity.
Record_Data: if record = 2047 then End_Mission ' check that aren't writing too many 'records to memory record = record + 1 ' increment record number low 0 ' unwrite protect memory writei2c ' write the next record to memory pause 10 ' wait 10 ms for write high 0 ' write protect memory return ' return to the calling calling subroutine Download_Data: read 0,record ' get the number of data records recorded ' in this flight for index = 1 to record ' until the number of data records readi2c index,(value) ' read the recorded record sertxd (#value,",") ' serial out the data record next ' until last data record read out goto fail fail: ' this is what flashing patern that will occur if the high 3 'battery dies some time during flight and the computer pause 1000 ' has restarted and not taken data low 3 pause 5000 goto fail End_Mission: 'this is if data was recorded during the whole flight low 3 ' this shows that the memory is full pause 1000 ' and that the flight computer functioned properly for ' the flight high 3 pause 5000 goto End_Mission end ' end of mission The weather station is programmed to take data every 5 seconds. It records pressure, temperature, and relative humidity.
JM7737_RevC.docx