Changes and additions: *********************************** l is now for levelfind: l lag (level/atten) In module serio.c Autotune attenuation for level setting: find attenuation that produces absolute value of level in given lag. For 600 <= lag < 700, use level to set attenuation to lag-600; e.g., lag 606 will set attenuator to 6 dB regardless of level parameter; 600 is 0 dB, etc. For 700 <= lag < 800, use external ADC to match to level (unimplemented) AH 5.12.01 *********************************** z for getting zero level: z n_fra phase In module obs.c, find_offset Added phase 3 mode for zeroing with microwave switch in amplifier module. Takes n_fra points with full attenuation, then resores attenuation to previous value. Asynchronous; does not depend on master/slave setting. Puts data into first nodside buffer. AH 5.12.01 *********************************** Added write-during-integrate action in APHID module and, with second LSB in ctrl-byte (formerly boss), in totpwr mode. Data write alternately to lower and upper part of waspdat and read from part that is not being written to. The uC can write 22 bytes per 11.5 ms tick, for minimum APHID integration of 3 ticks and 24 ticks for totpwr. All bytes are written regardless of the integration time, so integrations with smaller numbers of ticks than the minimum just run below maximum efficiency. The data return in binary mode only. A side effect is that the APHID evaluation mode that returns a sequence of numbers to check for missing reads has been eliminated. If necessary it could be implemented by adding an additional counter in the APHID function and overwriting the appropriate value in waspdat before sending data. Also improved serial line activity break signal detection in APHID module by eliminating call to totpwr -- module now contains code from totpwr. Released as wasp220 AH 26.11.02 *********************************** Changed mask name PHSW_M to FRAME_M throughout program to reflect real function. The clock logic generates this signal for each frame (it is used to modulate and demodulate the switched phase switch), and the previous name was a holdover to a time when the phase switched just once per data frame. Released as wasp221 AH 2.3.03 ************************************ Added wait(20) after ADC setup to let ADCs settle before trying to find signal. Modified find_input so it returns waspdat[1]=0 on failure. Try at getting w to read from lag instead of typed number. Released as wasp221 AH 11.3.03 ************************************ Added wait(5) and find_input to initialize adcs command i. Released as wasp221 AH 17.3.03 ************************************ Continued to try to solve the initial no data stream error on power up. Added another 2s delay for power supplies, reduced waits before finding input to wait(2). Added evalmode=4 for testing DAC; with this set, write value from serial input. If not set, write from lag ADC. Released as wasp221 AH 18.3.03 ************************************* Continued to get analog voltages from lags to come out -- added loop, absolute value. Still not tested at all. Released as wasp221 AH 21.3.03 ************************************* Initialized error flags in find_input to clear up data stream error on powerup. Released as wasp222 AH 28.7.03 ************************************* Changed query setup to return attenuation in waspdat[0], ADC channels then number 1 to 8. Changed version string to make it easier to compile with ID number for each spectrometer. More work, but makes sorting out which spectrometer is connected to which serial port easier. Released as wasp222.30.7.03. AH 30.7.03 ************************************** Fixed error in nodobs that caused no-data return in slave mode. Removed unecessary test for both nods low at beginning in nodobs slave mode; now only tests to insure only one nod signal high. Cleared up read-back for input attenuation at startup. Released as wasp222.28.8.03 AH 28.8.03 ************************************** Rewrote nodobs more or less from logical scratch for proper synchronization to external signals. Added (untested) synch code for other nod synch options. New release, wasp223.28.8.03 AH 28.8.03 ************************************** Fixed error for high attenuations in manual levelset routine. Now when atten > 31 dB the step attenuator is set to 31 dB and switch is set for high attenuation. Previous version set atten = request-600, which could lead to low attenuation depending on value in the first five bits. l 650 gave good attenuation, though. Also changed INITATTEN in wasp2.h from 100 to 0xff. Released as wasp223.15.10.03 AH 15.10.03 ************************************** Remove clear blanking bit command after nod; let integration routine clear the bit when data are valid. Otherwise there is a 20-30 us data valid pulse after the nod is done but before the chop routine sets the bit high to blank again after the initial chopper transition. This pulse has been there all along but doesn't seem to have confused the start integration routines -- or at least I haven't seen an obvious sign of it in the slaves (such as spectrometers finishing integrations early). Now need to run nodobs to time nod with blanking line. Released as wasp223.20.10.03 AH 20.10.03 ************************************** Added evalmode 5 for testing with e.g. amplitude modulation on synthesizer. All new code in chopobs in module obs.c. With this mode the chop signal sense switches with nodside so the chop signal retains the sense of the "source" in or out. Released as wasp223.16.11.03 AH 16.11.03