This is part of the EMDP1 project and it is currently a work in progress.

Extensible Multiple Device Programmer 1 Plugs

Table of Contents

Available Plugs

Plugs are available for the following processors:

Microchip® PIC
PIC8 (id=1)
Plug for programming many 8-pin and 14-pin PIC microcontrollers including the PIC12C08/9, PIC12C18/9, PIC16C505, etc.
PIC18 (id=2)
Plug for programming many 18-pin PIC microcontrollers including the PIC16F84, PIC16F628, etc.
PIC28 (id=3)
Plug for programming many 28-pin PIC microcontrollers including the PIC16F876, etc.
Atmel®AVR®
AVR820 (id=4)
The AVR8 plug is used to program some 8-pin and 20-pin AVR microcontrollers. This includes the AT90S/LS2323, AT90S/LS2343, ATtiney11/12, ATtiny15, AT90S1200 and AT90S2313.
AVR26 (id=5)
The AVR26 plug is used to program the ATtiny26 microcontroller.
AVR28 (id=6)
The AVR28 plug is used to program the some 28-pin Atmel microcontrollers. This includes the AT90S/LS4433 and the ATmega8.
AVR29 (id=EEPROM)
The AVR29 plug is used to program the ATtiny28 microcontroller.
AVR40 (id=7)
The AVR40 plug is used to program some of the 40-pin Atmel microcontrollers. This includes the AT90S/LS8515, ATmega161, ATmega162, ATmega163, and ATmega8515.
AVR41 (id=8)
The AVR41 plug is used to program some additional 40-pin Atmel microcontrollers. This includes the AT90S/LS8535, ATmega16, ATmega32, ATmega323, and ATmega8535.
Generic Array Logic
GAL20 (id=EEPROM)
The GAL20 plug is used to program 16V8 and 18V10 GAL's.
GAL24 (id=EEPROM)
The GAL24 plug is used to program 20V8, 22V10, 20XV10, 20RA10, 6001, and 6002 GAL's.
GAL28 (id=EEPROM)
The EMDP1 GAL28 plug is used to program the 26CV12 GAL.
More plugs will be created as needed.

Plug Standard

The EMDP1 plug has 80 pins arranged in a 20 rows by 4 column array. The left 2×20 pins are cross wired to the ZIF40 socket. Thus, the upper left pin is 1 going down the left side until 20, moving over one pin to 21 and back up to 40. An `L' is put in front of these pins to distinguish them from the pins on the right. The right 2×20 pins are labeled using cable pin numbering that starts in the upper left with 1, goes down in odd pin numers until 39, then returns to the top right with 2, and goes down the right until 40. Again, the right pins are prefixed with an `R' to distinguish them from the ones on the left. The table below should help keep track of this admittedly confusing pin numbering:

Column 1 Column 2 Column 3 Column 4
Row Pin No. Label Pin No. Label Pin No. Label Pin No. Label
1 L1 ZIF40:1 L40 ZIF40:40 R1 SCK_SCL R2 GND
2 L2 ZIF40:2 L39 ZIF40:39 R3 SDI_SDA R4 SDO
3 L3 ZIF40:3 L38 ZIF40:38 R5 TXD? R6 +5V
4 L4 ZIF40:4 L37 ZIF40:37 R7 RXD R8 BD0
5 L5 ZIF40:5 L36 ZIF40:36 R9 BD1 R10 BD2
6 L6 ZIF40:6 L35 ZIF40:35 R11 BD3 R12 BD4
7 L7 ZIF40:7 L34 ZIF40:34 R13 BD5 R14 BD6
8 L8 ZIF40:8 L33 ZIF40:33 R15 BD7 R16 BD8
9 L9 ZIF40:9 R32 ZIF40:32 R17 BD9 R18 BD10
10 L10 ZIF40:10 L31 ZIF40:31 R19 BD11 R20 BD12
11 L11 ZIF40:11 L30 ZIF40:30 R21 BD13 R22 BD14
12 L12 ZIF40:12 L29 ZIF40:29 R23 BD15 R24 BD16
13 L13 ZIF40:13 L28 ZIF40:28 R25 BD17 R26 BD18
14 L14 ZIF40:14 L27 ZIF40:27 R27 BD19 R28 BD20
15 L15 ZIF40:15 L26 ZIF40:26 R29 BD21 R30 BD22
16 L16 ZIF40:16 L25 ZIF40:25 R31 BD23 R32 BD24
17 L17 ZIF40:17 L24 ZIF40:24 R33 BD25 R34 BD26
18 L18 ZIF40:18 L23 ZIF40:23 R35 BD27 R36 VAR1
19 L19 ZIF40:19 L22 ZIF40:22 R37 VAR2 R38 NC1
20 L20 ZIF40:20 L21 ZIF40:21 R39 NC2 R40 NC3
Note: BD27 (pin 35) is not a bi-directional pin on the EMDP1; it is used by the bootstrap adaptor to feed 13 volts back to the PIC16F877 in the EMPD1 for programming.

It is desirable to determine whether or not a plug is being used or and adaptor board is being used. BD25 and BD26 are used for this purpose. Both these lines have a 10K ohm pull up resistor tied to +5 volts. All plugs tie BD25 to ground and all adaptor boards tile BD26 to ground. The following table is used to figure out what is going on:

BD25 BD26 Description
0 0 Error -- Both a plug and adaptor board are plugged in at the same time.
0 1 Only a plug is plugged into the EMDP1.
1 0 Only an adaptor board is plugged into the EMDP1.
1 1 Error -- Neither a plug nor an adaptor board are plugged into the EMDP1.
There is enough information avaible to provide a meaningful error message to the user if they have forgotten to plug anything in and if they have accidentally plugged in both an adaptor board and and a plug.

All adaptor boards have have a serial EEPROM to provide further adaptor board identification. However, some plugs have serial EEPROM's and some do not. Line BD24 is used to figure this out. Line BD24 it tied to ground if there is a serial EEPROM on the plug and it is tied to +5 volts if there is not a serial EEPROM.

If there is not a serial EEPROM on the plug (i.e. BD24 = +5 volts), the next 12 BD lines, BD23 through BD12 are used a plug identifier. This allows there to be up to 212 = 4098 distinguishable different EMDP1 plugs that do not have serial EEPROM's.

The table below lists the uses for the various BD lines:

Plug Pin Label Use
R34 BD26 AD = Adaptor Detect (0=adaptor present; 1=not present)
R33 BD25 PD = Plug Detect (0=plug present; 1=not present)
R32 BD24 SED = Serial EEPROM Detect (0=present; 1=not present)
R31 BD23 ID0 = Identifier Bit 0
R30 BD22 ID1 = Identifier Bit 1
R29 BD21 ID2 = Identifier Bit 2
R28 BD20 ID3 = Identifier Bit 3
R27 BD19 ID4 = Identifier Bit 4
R26 BD18 ID5 = Identifier Bit 5
R25 BD17 ID6 = Identifier Bit 6
R24 BD16 ID7 = Identifier Bit 7
R23 BD15 ID8 = Identifier Bit 8
R22 BD14 ID9 = Identifier Bit 9
R21 BD13 ID10 = Identifier Bit 10
R20 BD12 ID11 = Identifier Bit 11
Having 12 bits of ID theorietically provides 212 = 4098 different possible plugs. In reality, some of the plugs will need to use some of the lines to control the device being programmed. Thus, it is anticipated that substantially fewer than 4098 plug identifiers will be used.

The id's are allocated linearly as shown in the table below:

Id Plug Processor(s)
0 X0 Used for homebrew plugs
1 PIC8 8-pin & 14-pin MicroChip PIC's
2 PIC18 18-pin MicroChip PIC's
3 PIC28 28-pin & 40-pin MicroChip PIC's
4 AVR820 8-pin & 20-pin Atmel AVR's
5 AVR26 Atmel ATtiny26
6 AVR28 28-pin Atmel AVR's
7 AVR40 Some 40-pin Atmel AVR's
8 AVR41 Some additional 40-pin Atmel AVR's

Lastly, in order to prevent plug from being plugged in backwards, a single wire extends upward from the mother board through a hole in each plug. This provides a very inexpensive way of polarizing the plugs.


Copyright (c) 2001-2002 by Wayne C. Gramlich. All rights reserved.