May 20, 2001
Update: May 5, 2014
AVR microcontroller family have ISP (In-System Programming) feature. In general, the AVR boards have an ISP connector. It outs only three I/O pins, reset pin, VCC and GND, it is not that any exclusive function pin is used. Therefore, the ISP connector can be used for any other purpose at normal operation.
Because the ISP function and I/O port share the same pins, the pins may be used for any other function on the board. In this case, the ISP connector will not able to be used for the different use reported here. However, the ISP pins are usually free when there is a margin of number of I/O pins.
If there are three free I/O pins, it will be used for many effective use, so that the ISP connector should be used more. It will interesting to think about various application of the ISP connector. Now, I report some usage that I am actually applying.
This usage may not effective for ICE usrs :-) It can be used to debug via the ISP connector if external circuits are working correctly.
At the first, program a simple debug monitor that is known it certainly work. It can be controlled with any terminal attached to the ISP connecter with an ISP cable. Therefore, it can controll the I/O registers and the integrated peripherals with ease.
There are troubles until the function of external peripherals is confirmed after borad assembly is finished. This feature that can check the function of external peripherals is very useful for debugging of the external peripherals.
AVR DEBUG MONITOR O<pa><d> - Output port I<pa> - Input port IR<pa> - Input port until break D[<sa>] - Dump memory E<sa>[<d>] - Edit memory F<sa><ea><d> - Fill memory %
The sample AVR debug monitor is same as the program which has been reported in the "Simple AVR programmers". When use it on the AT90S8515, it can be used without any changes, the baud rate is 38.4 kbps at 8 MHz. If you wish to use it on the any other devices or different bit rate, change device definitions in the source code.
Start any terminal program after the debug monitor is programmed, the reset signal will be released (ER is active) and then the debug monitor starts and will send initial message for console. You can manipurate integrated peripherals and data memory with debugging commands.
AVR debug monitor for AVR-ISP (ASM)
Software UART samples (GCC)
The target program which being debugged will able to use the serial communication feature via the ISP cable. However, the software implemented UART generates its communication timing with software loop, so that the reveiving routine disables interruputs until next character is received. Therefore, the software implemented UART halts interrupt driven tasks.
However, only the transmisson routines can be used with no influence on the interrupt driven tasks because it disables all interrupts during transmission process. For example, when an interrupt task is driven in 1 msec interval timer, 38.4 kbps transmission routine which transmits a character in 0.26 msec can be used. It will help debug very much because internal variables can be monitered with a console in real-time.
This is an eight digits numeric LED display which is controlled only three I/O lines. It has shift registers to hold display data, the display data is transferred in clocked serial transfering.
It will also useful for on-board display circuit when number of I/O pin is insufficient.
At the practical work, the ISP connecter is useless. But it will be used as two bits of jumper switch.
To use it as a jumper switch, initialize MOSI and MISO as input with internal pull-up and make low SCK, and then read input level of MOSI and MISO.
Low height components, such as chip capacitors, chip LEDs and TQFP ICs, are usually used for small electronics devices. However the pin headers used for on-board ISP connector of most microcontrollers are about 9 millimeters in height, so it tends to be a problem when install the microcontroller board into a low profile case. There are some workarounds shown below to solve this problem.
You might have a question, "What does the left unmounted mean?". It means that using the plated through-holes as a socket. Some type of through-hole plugs for this purpose called Conthrough is available from MAC8. It can be used to attach the programming cable to the circuit board without a pin header on the board. Right image shows the built attachment for standard AVR-ISP socket. Of cource the advantage is that can eliminate the connector that used only one-time at production.
Conthrough is intended to be used for printed circuit boards. However it can also be applied for double-sided protoboards. I have started to use this method to the protoboards about ten years ago. You might have found that the ISP connector is not in the images of the microcontroller board in this site, such as this, it and that. Right image shows an example. The solderings to the via holes must be done with great care because the through-hole must not be filled with solder.
2014. 5. 5