
ELECTRONICS
2PG8952
V1.01
The Pinout of the PG8952 Connector is:
Pin 1,4,6 Looped together DCD,DTR,DSR
Pin 2 TxD (Unused) RxD on PC
Pin 3 RxD on PG8952 TxD on PC
Pin 5 Ground Gnd on PC
Pin 7,8 Looped together RTS,CTSonPC
Pin 9 No connection RI on PC
For hosts other than a PC the only two connections that
mustbemadeareRxD(Pin3)andGround(Pin5). TxD(Pin
2) should be connected if possible for future upgradeability.
Signal level should be compliant with the EIA232 standard.
SERIAL PROTOCOL
Downloaded files should be Intel(tm) Hex format, Serial at
9600 Baud, 8 data bits, 2 stop bits, no parity. Ensure that
the full 8 bits and 2 stop bits is present in your configuration
of the PC serial port.
CARE & ENVIRONMENT
In common with most development programmers, the
PG8952 is supplied as a bare board with rubber feet.
Protect the unit from short circuit, liquid spills, impact,
humidity, and foreign matter.
HARDWARE
DC POWER SOURCE
The PG8952 programmer unit is supplied with a DC plug
pack power supply (Also called an AC adaptor). Use only
this DC plug pack with the unit to avoid damage to the
programmer. Thecurrentconsumptionoftheprogrammer
unit is less than 75ma, and the voltage of the DC power
supply under this small load is a nominal 16VDC, negative
to the centre pin of the 2.5mm DC power socket.
SERIAL CONNECTOR
The connector required for interface to the PG8952 pro-
grammer is a DB9 male. The cable required from a PC to
the PG8952 is DB9 female to DB9 male straight through -
meaning pin 1 of the first connector goes to pin 1 of the
second connector, pin 2 to pin 2 and so forth. If the PC
serial port has a DB25 connector, a DB25 to DB9 adaptor
will also be required. Cable length should not exceed 6m.
The DB9F-DB9M cable and the DB25-DB9 adaptor are
standard accessories available from PC hardware suppliers.
The PG8952 unit requires no handshaking signals, how-
ever many PC programs need correct assertion of hand-
shake signals before they will transmit. The PG8952 loops
back the PC handshake outputs so that the inputs are
correctly asserted.
HOST SOFTWARE
DEVELOPMENT SOFTWARE
The89C51usesthe8051instructionsetandI/O-theserial
port, all timers, interrupts, registers and instructions (includ-
ing Long Jumps and Calls) are implemented. Other mem-
bers of the Atmel 40 pin micro family have additional
features. 89C51 software development can use standard
8051 assemblers, C compilers (in Tiny mode), and library
code.
DOWNLOAD
On a PC, the data may be downloaded by any program that
can transmit data out through the COM port. From the
DOS prompt this can be performed using the copy com-
mand after the serial port is appropriately configured using
the mode command. The two commands are:
Mode COM1:9600,N,8,2
Copy Myfile.hex COM1
Where the source file name should replace "Myfile.hex",
and COM2 might need to be specified instead of COM1.
During the development process, a batch file is usually
executed to compile and/or assemble then link the code.
These two command lines can be appended to the end of
the batch file to automatically program a new device after
each assembly.
A final batch file might look like:
Tasm -51 example.asm example.hex
@echo Insert an 89C51 into programmer
@pause
mode COM1:9600,N,8,2
copy example.hex COM1
Downloadcan alsobe achievedusing aterminal emulatorin
ASCII Transfer mode. A number of products will do this
satifactorily, including Telix and Windows Terminal. Using
one of these products to download can be a very useful way
tostart usingthe PG8952,when perhapsthe serialconnec-
tionisnot100%proven,oroneofanumberofdifferentfiles
may need to be downloaded.
DOWNLOAD DATA
More than one Intel Hex file may be transmitted to the
PG8952, as long as they follow in rapid succession - no
morethan asecond betweenfiles. For thisreason, multiple
files should be read from your hard disk, not a floppy drive.
The "Intel Hex terminator" is not required, and is ignored if
sent.
Download data should not have two values for the same
locationinmemory. Thiscausesthelocationtobeoverwrit-
ten - something that is usually not possible with PROM. A
Hexfilethatwritestothesamebytelocationtwicecancause
each programming attempt to fail - which is very confusing
to the operator, as it is normally a chip failure that causes
this. Thiscaution isneeded whenusing thePG8952 andall
other programming equipment using Hex files.
BINARY DATA
Most 8051 development software is capable of producing
Intel Hex files. To program a binary file using the PG8952
itis necessaryto translateit intoIntel Hexformat first,using
a utility such as the program BINTOHEX.