DIY- UNIVERSAL PIC AND AVR PROGRAMMER

22,844

144

39

Introduction: DIY- UNIVERSAL PIC AND AVR PROGRAMMER

About: Am passionate in electronics mainly embedded areas. Always been an electronic hobbyist and enthusiast.

I am presenting a best class USB Universal Programmer for both PIC and AVR Microcontrollers. In our present market the universal programmer supporting much devices with combination of PIC and AVR are not in common, they are expensive also.

This programmer is very cheap which is less than ₹500(10$). It is made with easily available components. This gives an advantage to the students and hobbyists for their projects. I am dedicating this purely DIY project to all students, electronic hobbyists and enthusiasts.

Advantage:

  • It is free and open source.
  • No need of installing extra drivers, it uses the HID (Human Interface Device) driver which is used to keyboard and mouse.
  • Supports much devices of PIC and AVR.
  • No external power is needed.
  • It supports both Windows and Linux platforms. In windows the software is OpenProg and in Linux, it is Opengui.

Step 1: Supported Devices:

It supports both 5V and 3.3V devices.( Check the “support device list” in attachment for the details of supported devices)

  • PIC Devices :

PIC 10-12-16-18-24, dsPIC 30-33

3.3V devices : PIC12F1xxx, 16F1xxx,18FxxJxx, 18FxxKxx, 24Fxxxx, 24Hxxx, dsPIC33xxx.

  • AVR Device :

It supports serial and HV serial programming.

AT90Sxxxx, ATmega- 48, 8, 88, 8515, 8535, 16, 164, 168, 32, 324, 328, 64, 644, 1284.

ATtiny- 11, 12, 13, 313, 24, 25, 26, 261, 4313, 44, 45, 461, 48, 84, 85, 88, 861.

  • EEPROM Device :

24xxxx, 25xxx, 93xx6, DS24xx, 11xxx.

Step 2: Controller Part:

It is the major part of the programmer. It consist of PIC18F2550 microcontroller as the brain of programmer. The USB-B connector is attached which communicates through PC. It consist of two indicator LED’s, one for the indicating in programmer connection other shows the programming status.

The major three series set (J1, J2, and J3) headers are used for the communication with the slave microcontroller device. The usage of pins are different in different microcontrollers. A reset switch is added to the controller unit to set the reset of programmer. The PIC18F2550 is flashed with the firmware hex code attached below. You can use other serial or parallel PIC programmers for programming it..

Step 3: HID (Human Interfacing Device) Detecting :

It is not a mandatory step.

If you are not using my PCB or using the Breadboard/Perf board/custom PCB. It verify the communication between the microcontroller and the PC. It is better to do the (Human Interface Device) HID detect testing which will rectify much errors such as microcontroller, crystal and USB problems.

  1. Connect the circuit as per the fig 2.
  2. Connect the USB with PC.
  3. Check the blinking of LED1 is flashing firstly at first and then it slows the blink.
  4. If the programmer is detected go to next step. If the programmer is not detected cross check the connections and the instructions.
  5. Open the OpenProg.exe and check the device connected.

Step 4: Full Circuit - Controller Part

  1. Connect the components as per the Fig 3 and Connect the USB connector with PC.
  2. Open the OpenProg and check the programmer is detected.
  3. Click options-->hardware test. Hardware test is used to test whether the programmer is working properly. It checks the whole programming pins and we can debug easily in the error area. The hardware test shows the voltage across the VDDU, VPPU, CLK, DATA, PGM in different instants.
  4. Measure the voltage between the pins VDDU, VPPU, CLK, DATA, PGM and check it with the values in the screen. VPP can be a 1V difference because of DC to DC conversion.

  5. If the voltage of these pins of controller part and what is displayed in the screen are similar the programmer is working perfectly. If the voltage is different check the circuit of respective pins.

Step 5: PCB Design:

(Don’t confuse with the name in PCB design as “PIC PROGRAMMER”, I put this name first)

The Fig 4 shows the PCB design of controller part. The PCB is designed in Eagle 7.2. The board size is 7.5 X 7 cm. I etched in an automated mechanical etching machine, which gives much quality and faster etching. The PCB can also be make with homemade chemical etching, google it for more details.

The components JA, JB, JC, are jumpers. Carefully check it and put the jumpers firstly during the assembly of components. Use a 28-pin IC base for the safety of PIC18F2550 during soldering. The PCB files are attached below.

Step 6: Expansion Board

Expansion board interfaces the programmer with the microcontroller. The different series of microcontroller is having different pin and configuration for programming. It gives the advantage of easy to program the microcontroller to the user.

Expansion board can be easily made using the perf board or in breadboard, because it is very simple circuit. I made the expansion board using perf board. For different series of microcontrollers, different expansion board is used. In 3.3V expansion (LVICP) board a 5V to 3.3V,a voltage regulator such as LM1117 or similar is need.

Fig 5 and Fig 6 shows the expansion boards and circuit diagram for different series of microcontrollers. (A clear circuit diagram is provided in the attachment.)

Note: A 3.3V device should only be programmed using 3.3V expansion board, otherwise a permanent damage may occur.

3.3V device are: PIC12F1xxx, 16F1xxx, 18FxxJxx, 18FxxKxx, 24Fxxxx, 24Hxxx, dsPIC33xxx.

In which some of them is having 5V variant. If you need to program at 5V you can select the option “Don’t require LV boards”. Also don’t put any 24F-33F in the 30F socket which works at 5V.

Step 7: DsPIC30Fxxxx Expansion Board

Here I am displaying the dsPIC30Fxxxx expansion board as an example :

I made this expansion board in Perf board which is cheap and best. I also added ZIF socket so that the microcontroller can easily attached to the expansion board, instead of ZIF socket you can also add IC base or female headers.

The circuit diagram of this expansion is at fig 7. This expansion is using only the J1 for the programming. The pins using are VDDU, VPPU, CLK, DATA, GND. The PGM pin is not used.

Step 8: Programming a Device

After making the Controller part and Expansion board, We can straight away go for the Programming the device :

  • Find the device and series of the device to be programmed. Select the suitable expansion board of the device.
  • Attach the device to the Expansion board.

  • Attach the Expansion board to the controller unit.

  • Connect USB B connector cable to the programmer and connect to the PC.

  • Open the OpenProg.exe and make sure that programmer is detected.

  • Open devices and select the device which is to be programmed.

  • To Read : Press the green arrow in the top to read the device.

  • To Write / Flash : Press the left button on top to select the .hex code and press Ok. After it, Press the Red arrow button which is next to green arrow button to program the device.

  • Check the LED2 is blinking while programming. It shows the programming status.

  • Check the programming status in the software and confirm the Flashing is successful.

  • You are successfully programmed the device.

Step 9: Reference

Thankx to Albert Tom to his work to the open programmer. Also his work of developing OpenProg and OpenGui.

http://openprog.altervista.org/OP_eng.html

Share

    Recommendations

    • Water Contest

      Water Contest
    • Metalworking Contest

      Metalworking Contest
    • Fix It! Contest

      Fix It! Contest

    39 Discussions

    You can try to program PIC18F2550 using arduino from this tutorial, I am not tried yet. Comment me if it is working.

    https://sites.google.com/site/thehighspark/arduino-pic18f

    Can i use pic18f4550 which is 40 pin ic instead of pic18f2550 .....if yes then tell me which kind changes i have to do in program.....

    The PCB files are there in the rar file, plz check it

    Hello,

    Trying to build it, but when comparing the full circuit to the expansion slots can't figure out the matching. if you take an example pf PIC30 the Con63 has VPP VDD D CK VSS while jumber 3 has VDD VPP CK D PGM GND. Same for ATMEL Con33 has SCK MOSI MISO VSS.

    What am I missing? how can I map the jumbers to the connections?

    Thanks

    Could someone please tell me what BC12 is on the circuit diagram of the controller part? Is it a choke??

    1 reply

    Bc12 represents a ferrite bead. U can use an inductor of 100uH.

    newbie here, i am always having an error with the hardware test:

    USB voltage too low (VUSB<4.5V)

    - checked my usb ports and got 5v
    - indicated ports(including PGM, Data, Clock) on the hardware test are accurate (which is 4.5v)

    please help

    4 replies

    Did u do step 3 which is HID detection?

    What is the voltage getting at VDDU and VPPU??

    yes, the programmer is detected but said to be having low voltage

    during hardware tests VPPU and VDDU are having a voltage that is less by 0.5V from what the hardware tests indicates

    check mainly the VPPU and VDDU transistor connections. Carefully check the BC547 and BC557 transistors and its terminals.

    btw, thank you for responding!

    0
    None
    TechT2

    2 years ago

    Thanks for that high quality loader

    Hi,

    I know it is possible to program the PIC18F2550 to do simple tasks with an arduino, but is it possible to do the initial programming of the chip through an arduino too? Would be great if I could use my arduino and not have to buy a PIC programmer, just for the initial step.

    Thanks

    1 reply

    Yeah, u can program the PIC18F2550 using arduino,

    But I am not yet tried yet. try this tutorial : https://sites.google.com/site/thehighspark/arduino-pic18f

    Hi,

    How to program the programmer itself for the first time? I see a firmware file in the attachment, How to upload the firmware?

    Thanks,

    4 replies

    You need to use another programmer to flash the firmware to PIC18F2550, U can use a basic serial PIC programmer for it.

    Thanks,

    What do you suggest? Can you put an instructable for the basic programmer?

    If ur PC is having RS232, U can make the basic programmer easily : http://www.circuitvalley.com/2011/05/microchip-pic-serial-port-
    programmer.html?m=1

    Otherwise, use anyother's programmer, u need to use it only one time to program the PIC18F2550.

    if I already have to purchase or build a PIC programmer, it defeats the purpose since I use AVR all the time. great build and thanks for sharing, but not for me.