Portal for car enthusiasts

PIC programmer for Microchip microcontrollers. How to program PIC microcontrollers or Simple JDM programmer Do-it-yourself working programmers peak controllers

The development of electronics is proceeding at a rapid pace, and more and more often the main element of a device is a microcontroller. It does the bulk of the work and frees the designer from the need to create sophisticated circuit designs, thereby reducing the size of the printed circuit board to a minimum. As everyone knows, the microcontroller is controlled by a program recorded in its internal memory. And if an experienced electronics programmer does not experience problems using microcontrollers in their devices, then for a novice radio amateur, an attempt to write a program into a controller (especially a PIC) can turn into a big disappointment, and sometimes a small pyrotechnic show in the form of a smoking chip.

Oddly enough, but with all the greatness of the Internet, there is very little information about the firmware PIC controllers, and the material that can be found is of very dubious quality. Of course, you can buy a factory programmer for an inadequate price and sew as much as you like, but what if a person is not engaged in mass production. For these purposes, you can assemble a simple and not expensive to implement homemade, called JDM programmer according to the scheme below (Figure No. 1):



Figure No. 1 - programmer diagram


I immediately give a list of elements for those who are too lazy to peer into the diagram:

  • R1 - 10 kOhm
  • R2 - 10 kOhm (trimmed). By adjusting the resistance of this resistor, you need to achieve about 13V at pin # 4 (VPP) during programming. In my case, the resistance is 1.2 kOhm
  • R3 - 200 Ohm
  • R4, R5 - 1.5 kOhm
  • VD1, VD2, VD3, VD4, VD6 - 1N4148
  • VD5 - 1N4733A (Voltage stabilization 5.1V)
  • VD7 - 1N4743A (Voltage stabilization 13V)
  • C1 - 100nF (0.1uF)
  • C2 - 470uF x 16V (electrolytic)
  • SUB-D9F - COM port connector (MAMA or SOCKET)
  • DIP8 socket - depends on the controller you are using

The diagram uses an example of connecting such common controllers as PIC12F675 And PIC12F629, but this does not mean at all that the firmware of other series PIC will be impossible. To write a program to a controller of another type, it is enough to transfer the wires of the programmer in accordance with Figure No. 2, which is shown below.



Figure No. 2 - PIC controller case options with the necessary pins


As you might guess, the case is used in the scheme of my programmer DIP8. With a strong desire, you can make a universal adapter for each type of microcircuit, thereby obtaining a universal programmer. But since with PIC controllers I rarely work, and this is enough for me.

Although the circuit itself is quite simple and will not cause difficulties in assembly, it also requires respect. Therefore, it would be nice to make a printed circuit board for it. After some manipulations with the program SprintLayout, textolite, a drill and an iron, such a blank was born into the world (photo No. 3).



Photo No. 3 - printed circuit board of the programmer


Download the source of the printed circuit board for the program SprintLayout you can follow this link:
(downloads: 670)
If desired, it can be changed to suit your type of PIC controller. For those who decide to leave the board unchanged, I post a view from the side of the parts to facilitate installation (Figure No. 4).



Figure No. 4 - board from the mounting side


A little more witchcraft with a soldering iron and we have a ready-made device that can flash PIC controller through COM port your computer. Still warm and not washed from the flux, the result of my efforts is shown in photo No. 5.



Photo No. 5 - programmer assembly


From now on, the first stage on the way to the firmware PIC controller, came to an end. The second stage will include connecting the programmer to the computer and working with the program IC Prog.
Unfortunately, not all modern computers and laptops are able to work with this programmer due to the banal lack of COM ports, and those that are installed on laptops do not give out the necessary for programming 12V. So I decided to turn to my first PC, which has been gathering dust for a long time and was waiting for its finest hour (and still waited).
So turn on the computer and first of all install the program IC Prog. You can download it from the author's website or from this link:
(downloads: 769)
Connect the programmer to COM port and launch the newly installed application. For correct operation, it is necessary to perform a number of manipulations. Initially, you need to select the type of controller that you are going to sew. I have it PIC12F675. In screenshot #6, the field for selecting a controller is highlighted in red.



Screenshot No. 6 - choosing the type of microcontroller




Screenshot #7 - setting the controller recording method


In the same window, go to the tab " Programming"and select the item" Programming check". Checking after programming may cause an error, since in some cases the firmware itself sets the read lock fuses SR. In order not to fool yourself, it is better to disable this check. In short, follow screenshot #8.



Screenshot #8 - Verification setup


We continue to work with this window and go to the tab " Are common". Here you need to set the priority of the program and be sure to use NT/2000/XP driver (screenshot #9). In some cases, the program may offer to install this driver and a restart will be required. IC Prog.



Screenshot #9 - general settings


So, with this window, the work is over. Now let's move on to the settings of the programmer itself. Select from the menu " Settings"->"Programmer settings or just press the key F3. The following window appears, shown in screenshot #10.



Screenshot #10 - programmer settings window


First of all, select the type of programmer - JDM Programmer. Next, set the radio button for using the driver Windows. The next step involves choosing COM port to which your programmer is connected. If it is one, there are no questions at all, and if more than one, look in the device manager which one is currently being used. The I/O latency slider is for adjusting the write and read speed. This may be needed on fast computers and if there are problems with the firmware - this parameter must be increased. In my case, it remained by default equal to 10 and everything worked fine.

On this program setting IC Prog is over and you can proceed to the process of the firmware itself, but first we read the data from the microcontroller and see what is written to it. To do this, on the toolbar, click on the microcircuit icon with a green arrow, as shown in screenshot No. 11.



Screenshot No. 11 - the process of reading information from the microcontroller


If the microcontroller is new and has not been flashed before, then all its memory cells will be filled with values 3FFF except for the very last one. It will contain the value of the calibration constant. This is a very important and unique value for each controller. The clocking accuracy depends on it, which is set by the manufacturer by selecting and setting this very constant. Screenshot #12 shows the memory location where the constant will be stored when the controller is read.



Screenshot No. 12 - the value of the calibration constant


I repeat that the value is unique for each chip and does not have to match the one in the figure. Many, due to inexperience, overwrite this constant and subsequently PIC controller starts to work incorrectly if the project uses clocking from an internal generator. I advise you to write down this constant and stick an inscription with its value directly on the controller. This way you will avoid a lot of trouble in the future. So, the value is written - we move on. Open the firmware file, which usually has the extension .hex. Now instead of inscriptions 3FFF, the programming buffer contains our program code (screenshot #13).



Screenshot #13 - firmware loaded into the programming buffer


Above, I wrote that many overwrite the calibration constant by negligence. When does this happen? This happens when opening the firmware file. The value of the constant is automatically changed to 3FFF and if you start the programming process, then there is no turning back. In screenshot #14, the memory cell where the constant was previously is highlighted 3450 (before opening hex file).

So, it's time to study microcontrollers, and then program them, and I also wanted to assemble devices on them, the circuits of which are now on the Internet, well, just the sea. Well, we found a circuit, bought a controller, downloaded the firmware .... and what to flash with what ??? And here the question arises for a radio amateur who is starting to master microcontrollers - the choice of a programmer! I would like to find the best option, in terms of versatility - simplicity of the circuit - reliability. "Branded" programmers and their analogues were immediately excluded due to a rather complex circuit that includes the same microcontrollers that need to be programmed. That is, it turns out a "vicious circle": in order to make a programmer, a programmer is needed. So the search and experiments began! In the beginning, the choice fell on the PIC JDM. This programmer works from the com port and is powered from there. This option was tested, I confidently programmed 4 out of 10 controllers, with a separate power supply, the situation improved, but not by much, on some computers it refused to do anything at all, and it does not provide protection from the "fool". Next, the Pony-Prog programmer was studied. In principle, almost the same as JDM. The "Pony-prog" programmer is a very simple circuit, powered by a computer com port, and therefore, on forums, on the Internet, very often there are questions about failures when programming that or other microcontroller. As a result, the choice was made on the "Extra-PIC" model. I looked at the diagram - very simple, competently! The input is MAX 232, which converts the signals of the RS-232 serial port into signals suitable for use in digital circuits with TTL or CMOS levels, does not overload the computer COM port by current, since it uses the RS232 operating standard, does not pose a danger to the COM port .Here is the first plus!
Works with any COM-ports, both standard (±12v; ±10v) and non-standard COM-ports of some models of modern laptops with low voltage signal lines, up to ±5v - another plus! Supported by common programs IC-PROG, PonyProg, WinPic 800 (WinPic800) and others - the third plus!
And it's all powered by its own power source!
It was decided - we must collect! So in the magazine Radio 2007 No. 8, a modified version of this programmer was found. It allowed programming microcontrollers in two modes.
There are two ways to put PICmicro microcontrollers into programming mode:
1. With the supply voltage Vcc turned on, raise the voltage Vpp (on the -MCLR pin) from zero to 12V
2. With Vcc off, raise Vpp from zero to 12V, then turn on Vcc
The first mode is mainly for devices of early development, it imposes restrictions on the configuration of the -MCLR pin, which in this case can only serve as an input for the initial setup signal, and in many microcontrollers it is possible to turn this pin into a regular line of one of the ports. This is another plus of this programmer. Its diagram is shown below:

Larger
Everything was assembled on a breadboard and tested. Everything works fine and stable, no glitches were noticed!
A signet for this programmer was drawn.
depositfiles.com/files/mk49uejin
everything was assembled in an open case, the photo of which is below.




The connecting cable was made independently from a segment of an eight-core cable and standard Komovsky connectors, no zero-modem connectors will work here, I warn you right away! The assembly of the cable should be taken carefully, immediately get rid of the headache in the future. The length of the cable should be no more than one and a half meters.
Cable photo


So, the programmer is assembled, the cable too, it's time to check all this economy for operability, search for glitches and errors.
First of all, install the IC-prog program, which can be downloaded from the developer's website www.ic-prog.com. Unpack the program into a separate directory. The resulting directory should contain three files:
icprog.exe - programmer shell file.
icprog.sys - driver required for operation under Windows NT, 2000, XP. This file must always be in the program directory.
icprog.chm - Help file.
Installed, now it would be necessary to configure it.
For this:
1.(For Windows XP only): Right click on the icprog.exe file. Properties >> Compatibility tab >> Check the box next to "Run this program in compatibility mode for:" >> select "Windows 2000".
2.Run the icprog.exe file. Select "Settings" >> "Options" >> "Language" tab >> set the language to "Russian" and click "Ok".
Agree with the statement "You need to restart IC-Prog now" (click "Ok"). The programmer shell will restart.
Settings" >> "Programmer

1.Check the settings, select the COM port you are using, click "Ok".
2.Next, “Settings” >> “Options” >> select the “General” tab >> check the box for “On. NT/2000/XP driver" >> Click "Ok" >> if the driver has not been installed on your system before, in the appeared window "Confirm" click "Ok". The driver will install and the programmer shell will restart.
Note:
For very fast computers it may be necessary to increase the I/O Latency setting. Increasing this parameter increases the reliability of programming, however, the time spent on programming the microcircuit also increases.
3. "Settings" >> "Options" >> select the "I2C" tab >> check the boxes: "Enable MCLR as VCC" and "Enable block recording". Click "Ok".
4. "Settings" >> "Options" >> select the tab "Programming" >> uncheck the item: "Check after programming" and check the box "Check during programming". Click OK.
Here it is set up!
Now we would like to test the programmer in place with IC-prog. And here everything is simple:
Next, in the IC-PROG program, in the menu, run: Settings >> Programmer Test

Before executing each item of the testing methodology, do not forget to set all the "fields" to their original position (all the "ticks" are unchecked), as shown in the figure above.
1.Set the "tick" in the field "On. Data Out”, at the same time, a “tick” should appear in the “Data Input” field, and a log level should be set on the contact (DATA) of the X2 connector. "1" (at least +3.0 volts). Now, close the contact (DATA) and the contact (GND) of the X2 connector between each other, while the mark in the “Data Input” field should disappear while the contacts are closed.
2.When setting the "tick" in the field "On. Clocking ”, on the contact (CLOCK) of the X2 connector, the log level must be set. "1". (not less than +3.0 volts).
3.When setting the "tick" in the field "On. Reset (MCLR) ”, on the contact (VPP) of the X3 connector, the level should be set to +13.0 ... +14.0 volts, and the D4 LED (usually red) should light up. If the mode switch is set to position 1, the HL3 LED will light up
If during testing, any signal does not pass, you should carefully check the entire path of this signal, including the cable connecting to the computer's COM port.
Testing the data channel of the EXTRAPIC programmer:
1. 13 output of the DA1 chip: voltage from -5 to -12 volts. When setting the "tick": from +5 to +12 volts.
2. 12 output of the Da1 chip: voltage +5 volts. When checking the box: 0 volts.
3. 6 output chip DD1: voltage 0 volts. When setting the "tick": +5 volts.
3. 1 and 2 output chip DD1: voltage 0 volts. When setting the "tick": +5 volts.
4. 3 output chip DD1: voltage +5 volts. When checking the box: 0 volts.
5. 14 output of the DA1 chip: voltage from -5 to -12 volts. When setting the "tick": from +5 to +12 volts.
If all testing was successful, then the programmer is ready for operation.
To connect the microcontroller to the programmer, you can use suitable sockets or make an adapter based on a ZIF socket (with zero pressing force), for example, as here radiokot.ru/circuit/digital/pcmod/18/.
Now a few words about ICSP - In-Circuit Programming
PIC controllers.
When using ICSP on the device board, it is necessary to provide for the possibility of connecting a programmer. When programming using ICSP, 5 signal lines must be connected to the programmer:
1. GND (VSS) - common wire.
2. VDD (VCC) - plus supply voltage
3. MCLR" (VPP) - microcontroller reset input / programming voltage input
4. RB7 (DATA) - bidirectional data bus in programming mode
5. RB6 (CLOCK) Clock input in programming mode
The remaining pins of the microcontroller are not used in the in-circuit programming mode.
An option for connecting ICSP to the PIC16F84 microcontroller in a DIP18 package:

1. Line MCLR" is decoupled from the device circuit by jumper J2, which opens in the in-circuit programming (ICSP) mode, transferring the MCLR output to the exclusive control of the programmer.
2. The VDD line in ICSP programming mode is disconnected from the device circuit by jumper J1. This is necessary to avoid current consumption from the VDD line by the device circuit.
3. Line RB7 (bidirectional data bus in programming mode) is isolated by current from the device circuit with resistor R1 with a nominal value of at least 1 kOhm. In this regard, the maximum inflowing / draining current provided by this line will be limited by resistor R1. If it is necessary to provide maximum current, the resistor R1 must be replaced (as in the case of VDD) with a jumper.
4. Line RB6 (PIC synchronization input in programming mode), as well as RB7, is isolated in current from the device circuit by resistor R2, with a nominal value of at least 1 kOhm. Therefore, the maximum sinking/sinking current provided by this line will be limited by resistor R2. If it is necessary to provide maximum current, the resistor R2 must be replaced (as in the case of VDD) with a jumper.
Location of ICSP pins for PIC controllers:


This diagram is for reference only, it is better to clarify the programming conclusions from the datasheet on the microcontroller.
Now consider the firmware of the microcontroller in the IC-prog program. We will consider the construction example from here rgb73.mylivepage.ru/wiki/1952/579
Here is the device diagram


here is the firmware
Flashing the PIC12F629 controller. This microcontroller uses the osccal constant for its work - it is a hexadecimal calibration value of the internal oscillator of the MK, with which the MK reports the time when executing its programs, which is recorded in the last peak data cell. We connect this microcontroller to the programmer.
The screenshot below shows the sequence of actions in the IC-prog program in red numbers.


1. Select the type of microcontroller
2. Press the "Read chip" button
In the "Program Code" window, the very last cell will be our constant for this controller. Each controller has its own constant ! Do not erase it, write it down on a piece of paper and stick it on the chip!
We go further


3. Press the "Open file ..." button, select our firmware. The firmware code will appear in the program code window.
4. We go down to the end of the code, right-click on the last cell and select "edit area" in the menu, enter the value of the constant that you wrote down in the "Hexadecimal" field, click "OK".
5. Click "program the chip".
The programming process will start, if everything went well, the program will display a corresponding notification.
We take out the chip from the programmer and insert it into the assembled layout. We turn on the power. We press the start button. Hooray works! Here is a video of the flasher in action
video.mail.ru/mail/vanek_rabota/_myvideo/1.html
Got it sorted out. But what if we have a source code file in asm assembler, and we need a hex firmware file? A compiler is needed here. and it is - this is Mplab, in this program you can both write firmware and compile. Here is the compiler window


Install MPlab
We find the MPASMWIN.exe program in the installed Mplab, usually located in the folder - Microchip - MPASM Suite - MPASMWIN.exe
Let's launch it. In the (4) Browse window we find our (1) .asm source code, in the (5) Processor window we select our microcontroller, click Assemble and your firmware will appear in the same folder where you specified the source code. HEX That's it!
I hope this article will help beginners in mastering PIC controllers! Good luck!

1. PIC PROGRAMMER

I hope that my article will help some radio amateurs cross the threshold from digital technology to microcontrollers. There are a lot of programmers on the Internet and amateur radio magazines: from the simplest to the very twisted ones. Mine is not very complex, but reliable.

The first version of the programmer is designed for programming 18 and 28 "pin" PIC controllers. The programmer is based on a diagram from Radio magazine No. 10 for 2007. But the selection of the C7 capacitor, experiments with different versions of ICprog, PonyProg, WinPic and read-write speeds did not give the desired result: successful programming was obtained every other time. And this continued until the + 5V power supply of the programmable microcircuit was made separately, and not after the 12-volt stabilizer. It turned out such a scheme.

Fearing failures, I drew the signet so that the board was inserted directly into the Com-port, which is not very easy because of all kinds of "laces" and a small distance to the case. It turned out to be an irregularly shaped signet, but it is inserted into the COM port normally and programs without errors.

Over time, I made an extension cord about 1 meter long. Now the programmer lies next to the monitor and is connected to the COM port. Works fine: PIC16F84A, PIC16F628A, PIC16F873A microcontrollers have been programmed many times.

Please note: the Max chip and the LEDs are installed on the side of the printed conductors. Sockets - ZIF-28, one of them is used for 18-pin PIC. The panels are labeled with the first legs and the numbers "18" and "28". A 220 15 volt, 4 watt transformer is installed in the adapter plug housing. You need to plug into the outlet after installing the microcontroller in the socket. Transistors n-p-n low-power high-frequency (300 MHz) in the case to-92.

I temporarily did not install the XP connector, and then it turned out that it was not particularly needed. I had to somehow program the soldered MK, so I inserted the wires directly into the ZIF and fixed it. The reprogramming was successful.

I work with ICprog and WinPic-800 programs.

In the IC-prog 1.05D program, the following programmer settings:

  • Programmer – JDM Programmer
  • Port -Com1
  • Direct access to ports.
  • Invert: input, output and clock (tick).

In WinPic-800 –v.3.64f, everything is identical, but you still need to set the “bird” to use MCLR.

On the Internet, you can freely and free of charge download these programs. But to make life easier, I will try to attach everything necessary. I just remembered: how many “useless things” I myself downloaded from the Internet, and how much time I spent dismantling all this.

  • PCB programmer
  • WinPic-800 program ( )
  • IC-Prog() program
  • Article on IC-Prog.

2. PROGRAMMER-2 FOR PIC CONTROLLERS

Over time, it became necessary to program 14 and 40 "pin" peaks. I decided to make a programmer for the entire average family of PICs. The scheme is the same, only two panels were added. All this is housed in a case from a former multimeter.

On February 13, 2014, a correction was made to the printed circuit board: from the 5th pin of the RS232 connector, the track goes to the minus power supply (and on the previous one, to the 6th pin of the MAX microcircuit). New signet in "programer2-2".

You can save one KREN-ku. Those. connect the entire circuit from one 5-volt stabilizer. Do not install VR3 and C9, but put a jumper (indicated by a dotted line in the diagram). But I have not drunk Krenka yet. Repeatedly programmed PIC16F676, 628A, 84A and 873A. But haven't tried 877 yet.

Some capacitors are installed on the side of the printed conductors. The rolls are located in a horizontal position. In order not to lay conductors, I installed C7 - 2pcs and R12 - 3pcs.

Very important: the housing of the RS232 connector must be connected to the negative power supply.

The power supply (15 V) and programs are the same as in the first version.

List of radio elements

Designation Type Denomination Quantity NoteShopMy notepad
Scheme 1
DD1 RS-232 Interface IC

MAX232E

1 MAX232CPE To notepad
VT1-VT4 bipolar transistor

2N3904

4 TO-92 To notepad
VDS1 Diode bridge

DB157

1 To notepad
VD1 rectifier diode

1N4148

1 To notepad
VR1, VR3 Linear Regulator

L7805AB

1 To notepad
VR2 Linear Regulator

KA78R12C

1 To notepad
C1 470uF 35V1 To notepad
C2, C3, C5, C6 electrolytic capacitor10uF 50V4 To notepad
C4, C8 electrolytic capacitor470uF 16V2 To notepad
C7 electrolytic capacitor1uF 25V1 To notepad
C11 Capacitor0.1 mF1 To notepad
R1, R7 Resistor

10 kOhm

2 To notepad
R2 Resistor

470 ohm

1 To notepad
R3, R5, R11 Resistor

4.7 kOhm

3 To notepad
R4, R10 Resistor

2 kOhm

2 To notepad
R6, R8, R9 Resistor

1 kOhm

3 To notepad
R12 Resistor

240 ohm

1 To notepad
HL1 Light-emitting diode 1 Red To notepad
HL2 Light-emitting diode 1 Green To notepad
Scheme 2
DD1 RS-232 Interface IC

MAX232E

1 MAX232CPE To notepad
VT1-VT4 bipolar transistor

2N3904

4 TO-92 To notepad
VDS1 Diode bridge

DB157

1 To notepad
VD1 rectifier diode

1N4148

1 To notepad
VR1, VR3 Linear Regulator

L7805AB

2 To notepad
VR2 Linear Regulator

KA78R12C

1 To notepad
C1, C2, C4, C5 Capacitor10uF 50V4 To notepad
C3 electrolytic capacitor470uF 35V1 To notepad
C6, C9 electrolytic capacitor470uF 16V2 To notepad
C7.1-C7.3 Capacitor0.1uF3

Currently, many circuit diagrams have appeared using various microcontrollers, including PIC microcontrollers from MicroChip. This made it possible to obtain sufficiently functional devices, despite their simplicity.

But the operation of the microcontroller is impossible without a control program that must be written. In this article, we will consider the universal PIC programmer- EXTRA-PIC allows programming PIC controllers and EEPROM I2C memory via COM port or via .

List of supported chips when used with IC-PROG v1.05D:

Microchip PIC controllers: PIC12C508, PIC12C508A, PIC12C509, PIC12C509A, PIC12CE518, PIC12CE519, PIC12C671, PIC12C672, PIC12CE673, PIC12CE674, PIC12F629, PIC12F675, P IC16C433, PIC16C61, PIC16C62A, PIC16C62B, PIC16C63, PIC16C63A, PIC16C64A, PIC16C65A, PIC16C65B, PIC16C66, PIC16C67 PIC16C71 PIC16C72 PIC16C72A PIC16C73A PIC16C73B PIC16C74A PIC16C74B PIC16C76 PIC16C77 PIC16F72 PIC16F73 PIC16F74 PIC16F76 PIC16F 77, PIC16C84, PIC16F83, PIC16F84, PIC16F84A, PIC16F88, PIC16C505*, PIC16C620, PIC16C620A, PIC16C621, PIC16C621A , PIC16C622, PIC16C622A, PIC16CE623, PIC16CE624, PIC16CE625, PIC16F627, PIC16F628, PIC16F628A, PIC16F630*, PIC16F648A, PIC16F676*, PIC16C710, PIC16C71 1, PIC16C712, PIC16C715, PIC16C716, PIC16C717, PIC16C745, PIC16C765, PIC16C770*, PIC16C771*, PIC16C773, PIC16C774 PIC16F872, PIC16F873, PIC16F873A, PIC16F874, PIC16F874A, PIC16F876, PIC16F876 A, PIC16F877, PIC16F877A, PIC16C923*, PIC16C924*, PIC18F242, PIC18F248, PIC18F252, PIC18F258, PIC18F442, PIC18F448 , PIC18F452, PIC18F458, PIC18F1220, PIC18F1320, PIC18F2320, PIC18F4320, PIC18F4539, PIC18F6620*, PIC18F6720*, PIC18F8620*, PIC18F8720*

Note: microcontrollers marked with an asterisk (*) must be connected to the programmer via the ICSP connector.

EEPROM I2C Serial Memory (IIC): X24C01, 24C01A, 24C02, 24C04, 24C08, 24C16, 24C32, 24C64, AT24C128, M24C128, AT24C256, M24C256, AT24C512.

Directly the EXTRA-PIC programmer circuit itself:

The programmable controller is connected via connector X3. Below is the pinout of programming pins for different controllers:

And now the instructions on how to program the microcontroller.

Let's take the PIC16F876A microcontroller as an example.

Assemble the programmer and prepare a power supply with output voltage at least 15V

Unpack the program into a separate directory. The created directory should contain three files:

icprog.exe— programmer shell file;

icprog.sys— driver required for operation under Windows NT, 2000, XP. This file must always be in the program directory;

icprog.chm- Help file.

Setting up the IC-PROG v1.05D program.

For Windows95, 98, ME For Windows NT, 2000, XP
(Only for Windows XP ):
Right click on the icprog.exe file.
« Properties» >> tab « Compatibility » >>
Set the checkbox to Run the program in compatibility mode for:» >> select « Windows 2000 «.
  1. Run the file icprog.exe .
  2. Select " Settings » >> « Options» >> tab « language» >> set language « Russian" and press " Ok «.
  3. agree with the statement " You need to restart IC-Prog now» (press « Ok «).
  4. The programmer shell will restart.
« Settings » >> « programmer «.
Check the settings, select the COM port you are using, click " Ok «.
Further, " Settings » >> « Options» >> select the tab « Are common» >> check the box next to « On NT/2000/XP driver» >> Click « Ok » >>
if the driver has not been installed in the system before, in the appeared window " Confirm» click « Ok". The driver will install and the programmer shell will restart.
Note: For very "fast" computers, you may need to increase the " I/O Delay". Increasing this parameter increases the reliability of programming, however, the time spent on programming the microcircuit also increases.
« Settings » >> « Options» >> select the tab « I2C» >> set the checkboxes on the items:» Enable MCLR as VCC" And " Enable block recording". Click " Ok «.
The program is ready to go.

Install the chip in the programmer panel, observing the position of the key.

Connect the extension cord, turn on the power.

Start the IC-PROG program.

Select the PIC16F876A controller from the dropdown list.

If you do not have a firmware file, prepare it:

open the standard Notepad program;

insert the text of the firmware into the document;

save under any name, for example, prohivka.txt (extension *.txt or *.hex).

Further in IC-PROG File >> Open file(! not to be confused with Open data file) >> find our firmware file (if we have a *.txt file, then in the file type select Any file *.* ). The "Program Code" box should fill with information.

Press the "Program the chip" button (the red LED lights up).

We are waiting for the completion of programming (about 30 seconds).

To control, click "Compare chip with buffer".

Once I decided to assemble a simple LC meter on pic16f628a and of course it had to be flashed with something. I used to have a computer with a physical com port, but now I only have usb and a pci-lpt-2com board at my disposal. To begin with, I assembled a simple JDM programmer, but as it turned out, it did not want to work with either the pci-lpt-com board or the usb-com adapter (low voltage of RS-232 signals). Then I rushed to look for usb pic programmers, but there, as it turned out, everything was limited to using expensive pic18f2550 / 4550, which I naturally didn’t have, and it’s a pity to use such expensive MKs if I very rarely do something at peaks (I prefer Avr- s, it’s not a problem to flash them, they are much cheaper, and it seems to me that it’s easier to write programs on them). After digging for a long time on the Internet in one of the many articles about the EXTRA-PIC programmer and its various options, one of the authors wrote that extrapic works with any com ports and even a usb-com adapter.

The scheme of this programmer uses a max232 logic level converter.

I thought, if you use a usb adapter, it would be very stupid to do two times the conversion of usb levels to usart TTL, TTL to RS232, RS232 back to TTL, if you can just take the TTL signals of the RS232 port from the usb-usart converter chip.

And so he did. I took the CH340G chip (which has all 8 com-port signals) and connected it instead of max232. And that's what happened.

In my circuit there is a jumper jp1, which is not in the extra peak, I put it because I did not know how the TX output would behave at the TTL level, so I made it possible to invert it on the remaining free NAND element and did not lose, as it turned out, directly the TX pin is a logical one, and therefore there is 12 volts at the VPP pin when turned on, and nothing will happen during programming (although you can invert TX programmatically).

After assembling the board, it's time for testing. And then came the main disappointment. The programmer was determined immediately (with the ic-prog program) and earned, but very slowly! Basically, it's to be expected. Then in the settings of the com port, I set the maximum speed (128 kilobauds) and started testing all the programs found for JDM. As a result, PicPgm turned out to be the fastest. My pic16f628a was fully flashed (hex, eeprom and config) plus verification somewhere around 4-6 minutes (moreover, reading is slower than writing). IcProg also works, but slower. There were no programming errors. I also tried to flash eeprom 24c08, the result is the same - everything is sewing, but very slowly.

Conclusions: the programmer is quite simple, it does not have expensive parts (CH340 - $0.3-0.5, k1533la3 can be found among radio junk), it works on any computer, laptop (and you can even use windows 8/10 tablets). Cons: It's very slow. It also requires external power for the VPP signal. As a result, as it seemed to me, for infrequent flashing of peaks, this is an easy to repeat and inexpensive option for those who do not have an ancient computer with the necessary ports at hand.

Here is a photo of the finished device:

As the song says, "I blinded him from what was." The set of parts is the most diverse: both smd and DIP.

For those who dare to repeat the scheme, almost any one (ft232, pl2303, cp2101, etc.) is suitable as a usb-uart converter, instead of k1533la3, k555 is suitable, I think even k155 series or a foreign analogue of 74als00, it may even work with logical NOT elements like k1533ln1. I am enclosing my printed circuit board, but the wiring there for the elements that were available, everyone can redraw for themselves.

List of radio elements

Designation Type Denomination Quantity NoteShopMy notepad
IC1 ChipCH340G1 To notepad
IC2 ChipK1533LA31 To notepad
VR1 Linear Regulator

LM7812

1 To notepad
VR2 Linear Regulator

LM7805

1 To notepad
VT1 bipolar transistor

KT502E

1 To notepad
VT2 bipolar transistor

KT3102E

1 To notepad
VD1-VD3 rectifier diode

1N4148

2 To notepad
C1, C2, C5-C7 Capacitor100 nF5 To notepad
C3, C4 Capacitor22 pF2 To notepad
HL1-HL4 Light-emitting diodeAny4 To notepad
R1, R3, R4 Resistor

1 kOhm

3