ASIMET PICSWR FRONT END COMMAND SET

The following commands are available on the RS-485 communications link to the PICSWR front end. REMEMBER! This is a 1200 baud link. Also, note that the PICSWR uses the same hardware as a PICHRH front end; the only difference is in the scaling resistors on the input op amps and minor firmware changes.

Note: commands sent are indicated in BOLD, responses in normal text. <crlf> represents ASCII carriage return and line feed. The space after the BOLD command in each example is for clarity - it is NOT actually transmitted.

Command Description


        A       Address acknowledge
                - returns address of module, terminated by <crlf>
                - e.g. #S1A S1<crlf>
                - NOTE: S1 is the default address of the PICSWR; the digit may be
                changed by using the 'W0' command but any failure of serial EEPROM
                will result in the use of the default address.  
                NOTE: Currently, the address MUST remain S1 for operation in
                ASIMET SWR modules.
        H       Help
                - a single line response indicating the available commands.
                - e.g. #S1H CMD: A,H,K,R,V,Wn,0,1<crlf>

        K       Kill analog power
                - this command turns off analog power (not applicable for SWR)
                and puts the A/D converter into low-power standby mode, then
                responds <crlf>.
                - e.g. #S1K <crlf>

        R       Read 32 bytes of EEPROM
                - this command reads the 32 bytes of EEPROM and sends them literally,
                i.e. as binary - no HEX-ASCII conversion is performed. Except for the
                first 2 bytes of EEPROM, which are interpreted as the PICSWR address,
                the rest of the bytes are free format, to be used by the attached 
                controller at the other end of the RS485 link.  Typical use is for
                cal constants, etc.  The 32 bytes sent are terminated with ASCII 
                <crlf>.
                - e.g. #S1R <32 bytes of binary><crlf>
                - NOTE: if you wrote bytes representing ASCII characters that your
                terminal program can display, you will, of course,  see ASCII
                characters!

        V       Version of firmware
                - responds with firmware version
                - e.g. #S1V PICSWR v1.0<crlf>
        Wn      Write block n of EEPROM
                - this command writes 15 bytes to the specified block of EEPROM. 
                Blocks are sequential from 0 to 3.  Thus to write 30 bytes to the
                EEPROM, you would send the first 15 bytes to block 0, the second
                15 bytes to block 1, etc.  The first 2 bytes of block 0 carry 
                special meaning, described below.  Blocks 1, 2, and 3 are free-format.
                - the first 2 bytes of block 0 are interpreted by the PICSWR as
                address bytes.  The first byte MUST be ASCII 'S' (54h) or the PICSWR
                will use its default address of 'S1'.  The second byte may be any
                value, though to be useful during test and calibration, printable
                characters, or at least characters easily generated by a terminal,
                are preferable.
                - upon completion of the write, response is <crlf> .
                - e.g. to write block 0: #S1W0S1<any 13 additional bytes><crlf>

        0
        1
        2
        3       Return A/D channel 0 thru 3
                - the 0 - 3 commands cause the PICSWR to power up the analog front
                end, in firmware version 1.0, wait 100 MS, then get a 12 bit A/D
                value for the channel and return it, in HEX-ASCII, terminated with
                <crlf>.
                - the returned values are left shifted by 4 bits (a function of the
                A/D converter used).  Divide by 16 to get the actual 12 bit value.
                - the MUX setting remains at the setting of the last A/D request and
                analog power remains ON, so if additional settling time is required,
                wait externally, then request the same channel again.  This also 
                implies that the first reading after analog power up may be bad, so
                just request the same channel again.
                - upon completion of a series of A/D conversions, use the 'K' command
                to kill analog power to the rain guage.  This will save a large
                amount of current consumption.
                - e.g. to request channel 0: #S10 72A0<crlf>
                - e.g. to request channel 2: #S12 FFF0<crlf>
                - current channel assignments for Mk1 hardware are:
                        0 : SWR
                        1 : not used
                        2 : not used
                        3 : not used