III. (88)SOFTWARE DESIGN AND DATAACQUISITION SYSTEM OPERATION(89)The control program, written in ST62 family assembly language,oversees the operation of the entire system under interrupt control..(90) This measurement system utilizes two of the microcontroller interrupts..(91) The timer interrupt is used for data collection and storage while the PC interrupt is used to trigger the process of data transfer between the computer and the system..(91) The timer interrupt is used (92)solar radiation at 10 min intervals.(93)The software and complete operation of the system can be understood from Fig.(94) 3. which shows the state machine diagram for the measurement system..(95) The system has four modes of operation:1) acquisition or measurement;2) storage;3) wait mode;4) listen mode(96)The microcontroller was programmed to be in a low- power mode, except at specific times when data acquisition or communication with the computer is in progress..(97) The operation of this data acquisition system is similar to the one described by Lou et al. [2].(98)When power is first applied or a reset is signaled, the first state entered is the Initialize state..(99) This state ensures that all internal variables have a defined initial value and that the input/output lines are properly configured..(100) The system then goes into the Wait state. In this mode the oscillator remains active to keep track of time but the system does nothing except to wait for the interrupts..(101) Instruction execution is stopped, internal power consumption is decreased, however, and internal RAM contents are preserved..(102) The program then starts the timer and reads channel PB0 to check if a computer is connected to the data acquisition system..(103) If the computer is not connected the timer awakens the system from the Wait mode.(104) A set of
đang được dịch, vui lòng đợi..
