Česká verze stránky o biprogu
biprog - (not only) ISP programmer
Content: Introduction - Features -
Hardware - Software - Counter - ToDo - Feedback - Download
View of populated board:
Solder side view:
Biprog in a box:
There are many website throughout the internet with various constructions of ISP programmers for the AVR
microcontrollers by Atmel. Some of the programmers are based on the AVR910 appnote, and are controlled from
the PC side by AVRprog. Others are controlled by the STK500 plugin of AVR Studio and their firmware is written
based on the AVR068 appnote. Apparently, the hardware in both cases is almost identical. This gave me the idea
to make a new version of the hardware and to write the appropriate software, which would be able to cooperate
with both control programs.
I eventually succeeded and the result is the biprog programmer, presented here.
The programmer is built into the KG22M box, which determines its size 72 x 50 x 22 mm. This box is sold for example
in the GES stores. You can identify it by this label:
The PCB is not affixed to the box by any means. It is fixed thanks to the protruding connectors, as can be seen
on the following picture:
The construction is based on my favorite microcontroller, ATmega8. The main reasons are the possibility to implement
a bootloader, memory size and package size. The circuit is no different from similar circuits, and requires
no detailed description. We will mention here only the JP3 connector, JP1 and JP2 jumpers, SW1 push-button
and the LEDs.
To JP3 connector, the unused pins of the microcontroller are connected. This enables to reuse the hardware for different
purposes. As an example, a counter up to 3,5MHz displaying on the PC's monitor, can be mentioned.
The SW1 push-button in the current verision of SW is unused. In future versions, the intended purpose is to quickly
manually change frequency of SCK.But the button is not useless even now. If it is pressed and held down in the moment
the power supply is switched on, the bootloader gets activated, enabling upgrade or complete change of the SW.
However, the upgrade can be accomplished completely without pressing the button - see Software - section AVRISP.
The basic position of jumper JP1 is 2-3. Position 1-2 serves for initial installation of the bootloader later, eventually,
for its upgrade. Jumper JP2 is at the moment unused (and not present in HW 3.0).
LED1 - flashes when waiting for a command
LED2 - RESET polarity set for '51 core microcontrollers
LED3 - RESET polarity set for AVR microcontrollers
LED4 - programmer is ON and is in programming mode or bootloader mode
LED5 - programmer is ON and is not in programming mode nor bootloader mode
LED6 - bootloader activated. If populated with bi-color LED, possibly can be used also for other purposes in the future.
It is rather surprising that no board with power supply source and sockets for various microcontrollers, augmenting
the various ISP programmers, can be found on the web. I assume, that most hobbyist has no other than an ISP
programmer, and needs to program devices out-of-the-system, too - for that, such an accessory is a must!
Nevertheless, I've found none of such, so I made one such board myself. It is described on a separate page.
USB modification (HW 2.1)
Mr. Kamil Řezáč has designed an USB modification of biprog. It is based on the FT232RL chip by FTDI.
VCP (virtual serial port) drivers are used on the PC, so it works in exactly the same way as the standard serial port version
of biprog. The only difference is the power supply for biprog and target application/MCU. USB biprog is powered
by +5V from USB, and using jumper JP4, this supply can be connected to the target board. There is no provision
for the target application having supply of 3.3V.
Modification described in HW3.0 section applies also for this version (HW2.1).
Layout for the USB version of biprog can be found in the Download section.
Using a USB/RS232 "cable"
A complete ready-made USB/RS232 "cable" can be purchased for about $15. I have tried the following one:
After having installed the driver from the attached CD, a new COM port has appeared in the "Control Panel"
(Windows XP) - Prolific USB-to-Serial Comm Port (COM3). After connecting to biprog and running AVR studio,
biprog started to communicate.
Both AVRprog and STK500 plugin work in exactly the same way than via a real serial port. I haven't tried AVRDUDE,
but I assume it will work too.
I was asked to implement support for the new '51 microcontrollers of Atmel - AT89LP4052 - into biprog.
After reading the datasheet it became clear, that it is necessary to modify the hardware. These microcontrollers need
an additional SPI signal, namely SS (Slave Select). I decided to remove jumper JP2 and to connect pin PB1 of ATmega8
(via a 100 ohm resistor) to pin 3 of connector SV1.
Since version 1.3, biprog firmware supports these new MCUs.
NEW - HW 4.1 (added 8.9.2008)
The following picture shows the new HW 4.1 designed by Mr. Jan Švíka, featuring integrated RS232 converter
and an extra 6-pin ISP connector:
Description in pdf by this version's author can be downloaded here - sorry, the text is in Czech only.
Description and design files for all versions of biprog's hardware can be found in the Download section.
All software is written in AVR assembly language.
Part of the firmware cooperating with AVRprog is taken over from Programmer für AVR-Prog und avrdude.
It was modified to accomodate for the differences between AT90S2313 and ATmega8. Modifications have been made
in order to spare some of the registers and the main loop has been rewritten. Here, I got inspired by the program I found
on Ondřej Pužman's pages.
In contrast to the AVRISP part, polarity of RESET signal is not stored into EEPROM here. The program is compatible
also with AVRDUDE (AVR910, AVR911, AVR109, butterfly).
SCK frequency cannot be changed here, the last frequency set using AVRISP is used.
This part is completely original. It has been written based on AVR068 appnote. On the PC side, the STK500 plugin
to AVR Studio, or AVRDUDE (avrispv2, stk500v2) are used as a control program. To upgrade the firmware,
the Upgrade "button" in the Board window can be used. This requires a small modification in the STK500 directory -
rename the original "Upgrade.exe" application to some other name. Then, copy "AVRProg.exe" into this directorey
and rename it to "Upgrade.exe". After pressing the Upgrade "button" then the plugin STK500 is closed automatically,
AVRProg is run, and in biprog, the bootloader gets activated.
Setting the ISP frequency
In the "Board" window, one of the six possible frequencies can be chosen. The listed values represent the real frequencies.
First three of them are implemented using the hardware SPI interface, the rest are implemented in software.
The last option (603 Hz) is apparently nonsense, as the PC-side control program always fails with a timeout. I tried this
speed with original Atmel firmware (not in biprog, of course), and it behaved in the same way. I am considering
to implement a different frequency for this option, for example 1,8432 MHz. The only problem is, that the real frequency
would be different than that in the list. What frequency do you recommend instead of the unusable 603 Hz?
Contrary to the original software of STK500 (AVRISP), biprog supports AT89S8252. For this, copy
the AT89S8252_biprog.xml file from Download section into the "Partdescriptionfiles" directory.
There are some specifical items for AT89S8252:
- Reading of Signature is simulated.
- Reading of Lock Bits is simulated.
- Writing of Lock Bits is real.
- This will not work with other than the biprog firmware !
Support of AT89S2051/AT89S4051 and AT89LP2052/AT89LP4052
Since version SW 1.2 (SW 1.3) it is possible to use biprog to program these microcontrollers.
I have tried only AT89S2051 and AT89LP4052, but I assume no problems with the others.
It is necessary to copy the appropriate xml files into the "Partdescriptionfiles" directory in the same way as for
These new microcontrollers feature writing/reading of a 32 byte user signature. The STK500 has no suitable function
for such signature, so, bearing in mind that these microcontrollers don't have an EEPROM, reading/writing of user signature
is implemented as EEPROM reading/writing.
NEW (8.9.2008) - support of AT89S8253
Since firmware version 1.5, biprog supports AT89C8253 (replacement of the older AT89C8252). From those supported
by biprog, this is the first microcontroller containing both EEPROM and a user signature. To be able to use both,
two xml definition files had to be created for this microcontroller. Both files can be used to program the FLASH memory;
besides that, AT89S8253_biprog.xml enables to program the EEPROM, and AT89S8253-User row array_biprog.xml
enables to write (or erase) the user signature. To make this work, these files need to be copied into the
NEW (8.9.2008) - support of AVR studio version 4.14
Since version 4.14 of AVR studio, the STK500 plugin has a new GUI (graphical user interface). As a consequence,
in order the Fuses and LockBits folders work properly, the xml definition files contain a new element "V2". This
element had to be added to all of the older xml files for the AT89Sx051, AT89LPx052 and AT89S8252 (for this one,
the new definition file is AT89S8252_biprog.xml). The newly added definition file for AT89S8253 is of course of this
new, extended form.
As a PC-side control program, CITAC.exe of David Matoušek is used.
As has been mentioned in the Features section, biprog's hardware can be used for a completely different application.
As an example, I wrote a firmware which enables to use a simple PC-based frequency counter, up to about 3.5MHz.
The measured signal is connected to input T0 (port PD4, pin 6), referenced to GND.
Contrary to the original HW of Mr.Matoušek (as published in KE 2/2003) the prescaler (by 256) is implemented here
in software, the maximum measured frequency decreased from 16MHz to about 3.5 MHz (approximately half of
the crystal frequency). Firmware for counted can be downloaded in the Download section. On the screenshot above,
measurement of a crystal oscillator of 3,6864 MHz (divided in ATtiny12 by 8) is illustrated.
Some of other possible uses of biprog:
- PC-controlled square-wave signal generator
- intelligent display connected to serial port of PC
- simple development or demonstration kit
I intend to make the following modifications:
1) SW - Manual change of SPI frequency using a button
2) SW - Chosen frequency indication on LED
If you have an idea of a modification, or if you want to make a modification yourself, don't hesitate to contact me!
Here I will add webpages, which link to, or mention otherwise, biprog.
Mr. Vladimír Anděl provided a whole pageful of experiences with building biprog. You can find there a nice description
(in Czech) and a PCB pattern suitable for printing on 300 dpi printers.
I found out that biprog is mentioned on several
Chinese pages, for example here.
On the robotika.cz pages is among others a nice overview of AVR device programmers.
biprog is "Cardware" for non-commercial use!
If you have found it useful, please send me a traditional postcard with your city/region view. My postal address is:
TELCOM servis Decin, s. r. o.
405 01 Decin 2
To download the files, use the right mouse button and chose "Save target as ...".
Statistics since 16. 5. 2007
Sockets and supply board for "ISP" programming
Tiny USB-connected IR Receiver for Remote Control of PC
Please write your questions and remarks to the following address: email@example.com
Last updated 08. 09. 2008
Translated by wek at efton dot sk