AN110 ISP Header Selection V102

AN110 ISP Header Selection V102
ISP Target System Header Selection for
AVR & AT89S FLASH Microcontrollers
Application
Note 110
Version 1.02
1.0 Overview
This application note details the possible connection methods
between a Target System and Programmer when implementing
in-system programming (ISP) of Atmel AVR and AT89S FLASH
microcontrollers. The various ISP header types which can be
designed onto a Target System are discussed, along with the relative
advantages and disadvantages of each connection method.
Title
Page No
Section 1................1
Overview
Section 2................1
Definitions
Section 3................2
Which ISP Header?
2.0 Definitions
2.1 ISP
ISP stands for In-System Programming. This is the mechanism by
which Atmel AVR and AT89S microcontrollers can be programmed
in-situ, without physically removing them from the Target System.
This type of programming can usually be performed at the Target
System Vcc voltage, with no requirement for a higher Vpp voltage to
be applied to the device during programming.
2.2 ISP Programmer
This is a programmer which is capable of producing the required
logic and power signals to in-system program (ISP) the Target
Microcontroller. Equinox manufacture a range of programmers which
are designed to ISP Atmel AVR and AT89S microcontrollers in
development, production and field environments.
2.3 Target Microcontroller
This is the Atmel AVR or AT89S microcontroller which is to be
in-system programmed.
2.4 Target System
The Target System is the physical Printed Circuit Board (PCB) which
contains the microcontroller to be in-system programmed.
2.5 ISP Header
In order to in-system program (ISP) the Target Microcontroller on the
Target System, the programmer must interface to the correct pins of
the target device. This
Target
is usually achieved by
Microcontroller
designing a suitable
connector onto the
ISP Cable
‘Target System’ which
brings out all the
ISP Header
signals required to
implement ISP using
User Target System
Programmer
an external ISP
Figure 1 - Target board + ISP connector + programmer Programmer as shown
in fig 1.
1
Section 4................5
ISP Selection Guide
Section 5................9
ISP Pin Assignments
for Equinox
Programmers
Appendix1...........10
ISP Header
Connections for the
Activ8r/Micro-ISP
Programmers
Appendix2...........11
ISP Header
Connections for the
FS2000A Programmer
Appendix3...........12
ISP Header
Connections for the
ISP Cable Convertor
Appendix4...........13
ISP Header
Connections for the
Atmel 6-way Header
ISP Target System Header Selection for AVR & AT89S FLASH Microcontrollers
AN_V1.02
3.0 Which ISP Header?
The choice of interconnection method between the Target System
and the ISP Programmer depends on many factors including the
chosen ISP programmer, Target System space requirements, extra ISP
functionality required and the quantity/throughput of Target Systems
to be programmed. There is also now a trend to allow field service
personnel and even customers to remotely upgrade the product
firmware in the field.
The factors influencing the selection of the ISP Header are
detailed below:
3.1 ISP Programmer Choice
Most Equinox programmers feature the ‘Equinox 10-way’ ISP
Header. It is possible to convert this header pinout to any other
required header pinout by making a suitable conversion cable/PCB.
The table below details the ‘standard’ connectors supported by the
Equinox range of ISP programmers.
Programmer
Micro-ISP
Activ8r
FS2000A
PRO10x
Equinox
10-way IDC
Header
YES
YES
YES
(internally user
selectable)
YES
(user selectable
using separate
PCB)
Atmel 10-way
IDC Header
NO
Use ‘ISP Cable
Converter’
NO
Use ‘ISP Cable
Converter’
YES
(user selectable)
YES
(user selectable
using separate
PCB)
Atmel 6-way
IDC Header
NO
Requires user to
make custom lead
NO
Requires user to
make custom lead
NO
Requires user to
make custom lead
NO
Requires user to
make custom lead
3.2 Target System PCB Space Requirements
If the Target System is very small or densely populated with
components, spare board area for an ISP Header may be hard to
come by. In these instances it is often better to choose the 6-way
IDC header or to go for a ‘single-in-line’ 6 way header as these
connectors require the least space.
2
Figure 2 - ISP Header
Selection Guide for Equinox
Programmers
ISP Target System Header Selection for AVR & AT89S FLASH Microcontrollers
AN_V1.02
3.3 Signals required for the specific microcontroller being
programmed
Most Atmel AVR and AT89S microcontrollers require only six
connections to implement basic ISP programming as follows: Vcc,
GND, MOSI, MISO, SCK and RESET. However, there are certain
instances where more pins are required to implement extra
functionality. The extra pins are SS(Slave Select), SCK2 (Serial Clock
2), PROG_LED and a second GROUND connection. The function of
these pins is detailed in section 4.
PC
PC Ground
Vcc
RST
MOSI
MISO
SCK
GND
ISP Programmer
ISP Cable
ISP Header
Target
System
Target Ground
Common earth point
Figure 3 - Typical
Connections for ISP
Programming.
3
ISP Target System Header Selection for AVR & AT89S FLASH Microcontrollers
AN_V1.02
3.4 Quantity / throughput of Target Systems to be
programmed in Production
If the intended use of the Target system is for development only, the
manual insertion of an ISP cable should not present much of a
problem. However, in automated high throughput production
environments any manual insertion operations need to be avoided as
they slow down the production cycle. A so-called ‘bed-of-nails’ test
fixture is often used which connects the relevant points on the
Target System to the programmer when the PCB is inserted into the
test fixture.
Status LED's
ISP Cable
Target
Connections
Target PCB
Adaptor Module
Programmer
Bed of Nails
Test Fixture
Figure 4 - ‘Bed-of-nails’
Test Fixture
PCB
Solder
Connection
Test Pin
To the
Programmer
3.5 Method of reprogramming the Target System in the field
Many Target Systems are programmed once at the factory and then
are never subsequently reprogrammed by the customer in the field.
However, some manufacturers are now designing systems which can
be reprogrammed once they have left the factory. In order to
implement this functionality, the Target System must have the ISP
Header in a place which can be easily located by the customer.
4
ISP Target System Header Selection for AVR & AT89S FLASH Microcontrollers
AN_V1.02
4.0 ISP Selection Guide
The relevant advantages and disadvantages of each header type are
shown in fig. 5. It is also possible to implement a custom ISP
connector by using an interface cable or PCB between the
programmer and the header.
ISP Connection
type
Advantages
Disadvantages
Equinox
10-way IDC
Header
1 Extra serial clock signal available
on SCK2 for clocking AVR
devices
2 Target LED control pin available
(Micro-ISP only)
3 Second GROUND pin may be
used by the target system to
sense presence of the
programmer.
4 IDC plug and socket are
polarised to prevent incorrect
insertion of the ISP cable
5 Used on all Equinox target
systems and in all Equinox
application notes
1 Larger PCB footprint than 6-way
header.
2 Not compatible with the Atmel
STK100, 200, 300 systems.
Atmel 10-way
IDC Header
1 Widely used on the Atmel
STK100, 200 and 300 systems
2 IDC plug and socket are
polarised to prevent incorrect
insertion of the ISP cable
1 Larger PCB footprint than 6-way
header.
2 No extra lines for SCK2 or LED
control.
Atmel 6-way
IDC Header
1 Small physical PCB footprint
2 Ideal for volume production
where board space is a
premium.
1 No extra lines available for SCK2
or LED control.
2 6-way non-reversible connector
may be hard to source.
6-way
SIL Header
1 Simple to add to existing PCB
design
2 Easier alignment of bed-of-nails
test pins
1 No polarisation of ISP
header/plug available
Bed-of-nails
1 No PCB area taken up by a
dedicated connector
2 Ideal for automated test
handlers
1 ISP connector is not available if
the product is to be
reprogrammed in the field.
2 ISP cable lengths are often
longer.
3 Board may require special design
to bring out ISP connections.
Figure 5 - ISP Connection Type - Advantage/Disadvantage Guide
5
ISP Target System Header Selection for AVR & AT89S FLASH Microcontrollers
AN_V1.02
4.1 ISP Header - Signal Definitions
The ISP Header is used to connect signal and power lines from the
target microcontroller to the ISP Programmer. The definitions of each
of the signals is shown in fig. 6 below. The six ‘required’ connections
which must be made to implement ISP are listed at the top of the
table. The optional signals are detailed in the next section.
Connect Target
Microcontroller
Target Note 1
ATmega103
PROG_VCC
P
Programmer Vcc
connection
Y
Target Vcc
Target Vcc
PROG_MOSI
O
Programmer MOSI signal
(SPI Data Out)
Y
MOSI
PD1/RXD
PROG_MISO
I
Programmer MISO signal
(SPI Data In)
Y
MISO
PD0/TXD
PROG_RESET
O
Programmer RESET
Control Line
Y
RESET
RESET
PROG_GND
P
Programmer Ground
connection
Y
Target Ground
Target Ground
PROG_SCK1
O
Programmer Serial
Clock 1 Signal
Y
SCK
SCK
PROG_SS
O
Programmer Slave Select
N
N/C
N/C
PROG_SCK2
O
Programmer Serial
Clock 2 signal Note 2
X
External Oscillator
input pin
N/C
PROG_LED
O
Programmer LED control
Line
X
LED
LED
KEY:
Y
This connection must
be made
x
Optional
N/C
6
No Connect
I
Input
O
Output
P
Passive
Note 1:
The ATmega 103(L)
microcontroller requires that
PROG_MOSI is connected RXD
and PROG_MISO is connected to
TXD. This is different from the
AT90S and AT89S devices.
Note 2:
Required on some ATtiny and
ATmega devices
Figure 6 - ISP Header
Signal Definitions
REQUIRED
Type Programmer pin
description
OPTIONAL
Header Pin
Label
ISP Target System Header Selection for AVR & AT89S FLASH Microcontrollers
AN_V1.02
4.2 Optional ISP Signals
The following signal lines are not absolutely necessary to implement
ISP but should be taken into consideration at the PCB design stage.
These signal lines may not be present on all Equinox programmers.
4.2.1 SCK2 - Oscillator pin
There are a few instances when the target microcontroller may
require a clock source to be supplied from the programmer during
programming as detailed in fig 7.
FS2000A
Hand Held Programmer
Target
Microcontroller
Atmel Header Equinox Header
ISP Cable
SCK2
0V
This requirement can arise for the following reasons:
i Slow programming with ‘Internal RC Oscillator’
If the target device normally runs from an ‘Internal RC Oscillator’
with a nominal frequency of 1MHz, the maximum SPI frequency
is limited to approximately 200 kHz. This results in the overall
programming time being increased. Many Equinox programmers
are capable of swapping the ‘Oscillator Selection’ to an ‘External
Clock Source’ for programming and then swapping it back to
‘Internal RC Oscillator’ when programming is complete. This can
result in a much faster programming cycle. Please consult the
relevant Atmel data sheet for the following devices which feature
‘Internal RC Oscillators’: ATmega163(L), ATmega161(L),
ATtiny12(L), ATtiny15(L).
ii Incorrect oscillator source has been selected
If the CKSEL fuse bits are incorrectly set on certain AVR devices, it
is possible for the device to stop operating as it has no clock
source. The SCK2 signal may be used to temporarily clock the
device to set it back to the correct oscillator source. Please
consult the relevant Atmel data sheet for the following devices
which may exhibit this problem: ATmega163(L), ATmega161(L),
ATtiny12(L), ATtiny15(L), AT90(L)S2333, AT90(L)S4333.
7
Target Vcc
User
Target
System
Figure 7 - FS2000A
providing SCK2 signal to
clock target microcontroller
ISP Target System Header Selection for AVR & AT89S FLASH Microcontrollers
AN_V1.02
4.2.2 PROG_LED
Many Equinox programmers feature the PROG_LED pin which is
capable of driving an LED on the Target System. The LED is
automatically illuminated at the start of a programming operation
and is switched off at the end of the operation. This output may also
be used to signal other logic devices on the Target System that
programming has commenced.
Figure 8- LED Circuit
Target Vcc
R1
LED1
PROG_LED
4.2.3 Second GROUND connection
The Equinox ISP Header features two GROUND connections for
enhanced EMC. It is possible to connect one of the GROUND pins to
the Target System GROUND and then use the second GROUND pin
to detect that an ISP Programmer is plugged into the ISP Header.
This can be useful if there is other logic on the Target Board which
needs to be automatically isolated during programming. See fig 9.
TARGET_Vcc
ISP Header
PROG_Vcc
R1
Programmer
Sense Logic
PROG_GND (7)
PROG_GND (9)
PROG_GND (PING)
Target System
8
Figure 9- Detection of
programmer presence using
spare ground pin.
ISP Target System Header Selection for AVR & AT89S FLASH Microcontrollers
AN_V1.02
5.0 ISP Pin Assignments for Equinox Programmers
The table shown in fig. 10 details the ISP Header pin assignments for
all Equinox ISP programmers. The Micro-ISP, Activ8r and FS2000A all
feature the ‘Equinox 10-way Header’, but the FS2000A does not
have the ‘PROG_SS’ or ‘PROG_LED’ lines. Please refer to the relevant
appendix for further information on each programmer.
Programmer
Micro-ISP/Activ8r
ISP Header
Type
Pin Number
Equinox 10-way Equinox 10-way
Header
Header
FS2000A
Atmel 10-way
Header
Atmel 6-way
Header (All
programmers)
Appendix
Appendix 1
Appendix 2
Appendix 3
Appendix 4
1
PROG_VCC
PROG_VCC
PROG_MOSI
PROG_MISO
2
PROG_SS
N/C
PROG_VCC
PROG_VCC
3
PROG_SCK2
PROG_SCK2
N/C
PROG_SCK1
4
PROG_MOSI
PROG_MOSI
PROG_GND
PROG_MOSI
5
PROG_LED
N/C
PROG_RESET
PROG_RESET
6
PROG_MISO
PROG_MISO
PROG_GND
PROG_GND
7
PROG_GND
PROG_GND
PROG_SCK1
-
8
PROG_SCK1
PROG_SCK1
PROG_GND
-
9
PROG_GND
PROG_GND
PROG_MISO
-
10
PROG_RESET
PROG_RESET
PROG_GND
Figure 10 - ISP Pin
Assignments for Equinox
Programmers
9
ISP Target System Header Selection for AVR & AT89S FLASH Microcontrollers
AN_V1.02
Appendix 1 - ISP Header Connections for Activ8r/Micro-ISP Programmers
Figure 1 indicates the position of Pin 1 for
both the ISP cable supplied and a 10-way
IDC header situated on the target system.
Red stripe
indicates
Pin 1
Equinox
ISP Cable
Top View
Pin 1
Figure 2 indicates the pinout required for
target system IDC header when using either
a Micro-ISP or Activ8r programmer.
Figure 2
PROG_Vcc
PROG_SCK2
PROG_LED
PROG_GND
PROG_GND
1
2
3
4
5
6
7
8
9
10
Equinox ISP Cable
Bottom View
PROG_SS
10-way Header
on User Target System
PROG_MOSI
PROG_MISO
PROG_SCK1
Pin 1
PROG_RESET
Figure 1
Target
Microcontroller
ISP Cable
0V
Activ8r Programmer
Target Vcc
User
Target
System
Figure 3
Target
Microcontroller
Micro-ISP
Programmer
ISP Cable
0V
Target Vcc
User
Target
System
Figure 4
10
ISP Target System Header Selection for AVR & AT89S FLASH Microcontrollers
AN_V1.02
Appendix 2 - ISP Header Connections for the FS2000A Programmer
Figure 1 indicates the position of Pin 1 for
both the ISP cable supplied and a 10-way
IDC header situated on the target system.
Red stripe
indicates
Pin 1
Equinox
ISP Cable
Top View
Pin 1
Figures 2 & 3 indicate the pinouts required
for target system 10-way IDC header when
using either an Equinox or Atmel 10-way
Headers
Figure 1
Equinox ISP Cable
Bottom View
10-way Header
on User Target System
Pin 1
Figure 2
PROG_MOSI
N/C
PROG_RESET
PROG_SCK
PROG_MISO
1
2
3
4
5
6
7
8
9
10
PROG_Vcc
PROG_Vcc
PROG_GND
PROG_SCK2
PROG_GND
N/C
PROG_GND
PROG_GND
PROG_GND
PROG_GND
2
3
4
5
6
7
8
9
10
Target
Microcontroller
Atmel Header Equinox Header
ISP Cable
0V
Figure 4
11
N/C
PROG_MOSI
PROG_MISO
PROG_SCK1
PROG_RESET
Equinox 10-way header
Atmel 10-way header
FS2000A
Portable ISP Programmer
1
Target Vcc
User
Target
System
Figure 3
ISP Target System Header Selection for AVR & AT89S FLASH Microcontrollers
AN_V1.02
Appendix 3 - ISP Header Connections for the ISP Cable Convertor
Red stripe
indicates
Pin 1
Equinox
ISP Cable
Top View
Figure 1 indicates the position of Pin 1 for
both the ISP cable supplied and a 10-way
IDC header situated the cable convertor.
Pin 1
The pinout for the Equinox 10-way header
on the ISP cable convertor is shown in
figure 3.
Equinox ISP Cable
Bottom View
10-way Header
on User Target System
Figure 4 shows the pinout used for the
Atmel 10-way header on the user target
system. Using this header will require the
use of the ISP Cable Convertor indicated in
figure 4.
Figure 1
Pin 1
Figure 2
Micro-ISP
Programmer
Target
Microcontroller
ISP Cable
Convertor
ISP Cable
ISP Cable
0V
PROG_Vcc
PROG_SCK2
N/C
PROG_GND
PROG_GND
1
2
3
4
5
6
7
8
9
10
Equinox 10-way header
12
N/C
PROG_MOSI
PROG_MOSI
N/C
PROG_MISO
PROG_SCK1
PROG_RESET
Figure 3
PROG_RESET
PROG_SCK
PROG_MISO
Target Vcc
1
2
3
4
5
6
7
8
9
10
Atmel 10-way header
User
Target
System
PROG_Vcc
PROG_GND
PROG_GND
PROG_GND
PROG_GND
Figure 4
ISP Target System Header Selection for AVR & AT89S FLASH Microcontrollers
AN_V1.02
Appendix 4 - ISP Header Connections for the Atmel 6-way Header
Figure 1 shows the pinout used for the Atmel 6-way header on the user target system.
Using the Atmel 6-way header will require the use of a custom made 10-way to 6-way ISP
cable (see figure 4).
Figure 1
FS2000A
Portable ISP Programmer
Equinox 10-way Header
Atmel 6-way Header
Custom
10-way to 6-way
ISP cable
Pin Mapping for the Equinox 10-way to
the Atmel 6-way ISP
Equinox
ISP Pin
1
2
3
4
5
6
7 and 9
8
10
Atmel
ISP Pin
2
No connection
No connection
4
No connection
1
6
3
5
Equinox 10-way
1
2
N/C
3
4
N/C
5
6
7
8
9
10
PROG_MISO
PROG_SCK
Function
Vcc
SS
SCK2
MOSI
PROG
MISO
GND
SCK
RESET
PROG_RESET
1
2
3
4
5
6
Figure 3
Figure 4
13
Target Vcc
1
2
3
4
5
6
User
Target
System
PROG_Vcc
PROG_MOSI
PROG_GND
Figure 2
Atmel 6-way
N/C
0V
Target
Microcontroller
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement