2500_Users_Manual - 第405页
Computer Remote Control ProM aster 25 00 User Manua l E-17 Programming Electronics Computer Rem ote Control This section describes the CRC commands used for the ProMaster 2500’s programming electro nics. It in cludes the…

Computer Remote Control
E-16 ProMaster 2500 User Manual
Source Code of
LABEL.C Program
************************************************************************
* LABEL.C - Create Hex Label Format containing label info *
* *
* This program is written using only standard C file functions *
* and can be compiled with any C compiler. *
*************************************************************************
#include <stdio.h> /* include standard IO file */
FILE *fp; /* declare file pointer */
char lb[] = /* initialize input buffer */
" ";
.()
{
int i = 0; /* index variable */
char l, c, d, chksum; /* work and checksum variables */
fp = fopen("LABEL.HEX","w"); /* open output file */
fputs("Q001FE\n",fp); /* write header record to file */
fputs("Q20201FC\n",fp); /* write part type record to file*/
/* select 28 pin PLCC */
fputs("Q7020EEF",fp); /* write rotation record to file */
/* get label information */
l = 1; /* init length */
fputc('\n',stdout);
for (d = 0; d 4; d++){
fputs("Enter label line ",stdout);
fputc(d+49,stdout);
fputs(": ",stdout);
while ((c = getchar()) != '\n'){
lb[i++] = c; /* store character in buffer */
++l; /* inc length counter */
}
lb[i++] = 13; /* write a cr to delimit each line */
++l;
}
fputs("\nQ1",fp); /* write data record */
cput(l); /* write length */
for (i=0,chksum=l; i1; ++i){ /* write re.der data record */
cput(lb[i]); /* write character */
chksum += lb[i]; /* update checksum */
}
cput(~chksum); /* write checksum */
fputs("\nQ901FE\n",fp); /* write termination record */
fclose(fp); /* close output file */
} /* exit */
cput(a) /* write byte in ASCII format */
char a; /* input parameter */
{
char c; /* temporary character variable */
c = ((a > 4) & 15)+48; /* convert left nibble */
if (c 57) c += 7;
fputc(c,fp); /* write character */
c = (a & 15)+48; /* convert right nibble */
if (c 57) c += 7;
fputc(c,fp); /* write character */
} /* return to caller */

Computer Remote Control
ProMaster 2500 User Manual E-17
Programming Electronics Computer Remote Control
This section describes the CRC commands used for the ProMaster 2500’s
programming electronics. It includes the following information:
•
System Setup
—Explains how to set up the 2500 programming
electronics for remote control operation. Includes information on
entering and exiting CRC mode.
•
CRC Commands
—lists the available CRC commands.
•
CRC Error Codes
—Lists the error codes that may be returned while
the 2500 programming electronics is being operated in CRC mode.
System Setup
The 2500 programming electronics receives CRC commands and sends
responses to the host computer through the RS-232C port labeled
“Programmer Port” on the back of the 2500. This is the only port that will
respond to programming electronics CRC commands.
To ensure correct operation of the 2500 port with the host computer, set
the parameters for the 2500 port according to the host computer
requirements.
Halting CRC Operations
To halt any command or any ongoing CRC operation, send one of the
following commands to the Programmer port (neither command requires
a
↵
). Both commands act immediately, terminating any preceding
command operation.
ASCII
Command Hex Code Description
E
SC
1B Causes the 2500 programming electronics to
unconditionally halt any operation except a
binary transfer.
B
REAK
n/a Causes the 2500 programming electronics to
unconditionally halt any operation in
progress. This includes all data
communications transfers. The data line
must be held in the spacing condition for
110 ms to 700 ms.

Computer Remote Control
E-18 ProMaster 2500 User Manual
CRC Default Settings
When CRC mode is entered, certain defaults are set prior to accepting any
commands. The default settings are outlined below:
If you exit remote mode using the
Z
command, the 2500 programming
electronics' parameters are set to the values they held
before
you entered
remote mode. If you exit using
C
TRL
+
Z
, the 2500 programming
electronics' parameters remain at their current values.
Programming
Electronics CRC
Commands
CRC commands are a set of simplified commands for the 2500
programming electronics. The commands are designed to be received
from a controlling computer. Because the commands are so simplified,
they can be cryptic.
Description Setting
Upload/download port Programmer port
Data source/destination RAM
Security fuse data (0 or 1) 0
Program security fuse No
Reject option (commercial or single) Commercial
Logic verification option All
Number of verify passes (0,1 or 2) 2
Fill RAM before downloading No
Illegal bit check option No
Blank check option No
Enable yield tally option No
EE bulk erase option No
Odd/even byte swap for 16 bit option No
JEDEC I/O translate DIP/LCC option Yes
Continuity check option Yes
Compare electronic signature Yes
Host command Blank
I/O address offset 0
I/O format MOS technology (format 81)
Instrument control code (0,1, 2) 0
I/O timeout 30 seconds
Upload wait 0 seconds
Number of nulls 255
Serial set auto-increment mode No
Programming mode Single device
Total set size 1
Upload EOF delimiter flag Disabled
Download EOF delimiter flag Disabled