ASIMET PICPRC FRONT END COMMAND SET
The following commands are available on the RS-485 communications link to the PICPRC front end. REMEMBER! This is a 1200 baud link. Also, note that the PICPRC firmware is the same as a PICHRH front end; the only difference is in the scaling resistors on the input op amps.
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.
A Address acknowledge - returns address of module, terminated by <crlf> - e.g. #H1A H1<crlf> - NOTE: H1 is the default address of the PICPRC; 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 H1 for operation in ASIMET PRC modules.
H Help - a single line response indicating the available commands. - e.g. #H1H CMD: A,H,K,R,V,Wn,0,1<crlf> K Kill analog power - this command turns off analog power to the RM Young rain guage and puts the A/D converter into low-power standby mode, then responds <crlf>. - e.g. #H1K <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 PICPRC 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. #H1R <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. #H1V PICHRH 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 PICPRC as address bytes. The first byte MUST be ASCII 'H' (54h) or the PICPRC will use its default address of 'H1'. 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: #H1W0H1<any 13 additional bytes><crlf>
0 1 Return A/D channel 0 or 1 - the 0 and 1 commands cause the PICPRC 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: #H10 43D0<crlf> - e.g. to request channel 1: #H11 FFF0<crlf> - current channel assignments for Mk1 hardware are: 0 : PRC 1 : not used