Sunday, May 1, 2011

Microchip PIC Serial Port Programmer

About the Programmer

  This is a Simple com port based Microchip PIC microcontroller Programmer,This Programmer is based on JDM programmer.The entire programmer is built around commonly available components

Features

  • Does not support the usb to serial converter.
  • Works with most of PIC mcu.
  • Works with 18F2550 and other 18F series mcu.
NEED A USB PIC PROGRAMMER ( PICkit 2)
To make your own PICKit 2 PIC Programmer
Click Here To Go My new post


Schematic and Hardware






Pin Configuration of a serial port

Connections to the Target MCU
   you can programe may microcontroller  by using this schematic , all you need to do is that find out the data sheet of that mcu you want to program and check the pin configration. and the look for   PIN PGC(clock)  PGD(data)  Vpp(/MCLR)  and the power Vss And Vdd like shown in the image blow.

 example of other microcontroller prgamming connections

Winpic 800:The Programming software
       
       To be able to send hex file from your computer to PIC microcontroller you will need to download and install Windpic 800. After the installation, the first thing you will need to do is configure Winpic to work with our PIC Programmer. To do this go to "Setting" menu and select "Harware setting". The following window will be shown and highlighted areas show you exactly which options should be selected.



      Now Just connect you programmer circuit to the com port Click on hardware test button in the tool bar, if hardware test is okey then click on just right side button 'detect device' as soon as your devide is detected.

      now you are all set to open you hex file and load in to the mcu. to start programming  press the Program all Button in the tool bar. wait for a while to finish the programming.when the programming is going on the led must be glowing.

      if somebody still have some questions please leave a comment.

72 comments:

  1. you can use this programmer to program 18f2550 via serial port for your pickit 2 clone

    ReplyDelete
  2. Wow looking great, ..... whatever it is.

    ReplyDelete
  3. Hello.
    I designed the circuit on a breadbaoard exactly as shown. and followed every single instruction. Now 1)when i test hardware. it shows unknown device. But the led glows while testing.
    2)when i try to erase it shows that the device has been erased but the previous program remains in it.
    the led glows as usual
    3)when programming it gives an error message although the led blinks for some time.But the program dosent run.

    Im using a pic16f877a. I checked the datasheet and connected to the required pins.
    Please help.

    ReplyDelete
  4. hi Starshatter

    does the led keep glowing all the time

    if yes then transistor may be faulty


    there is nothing in this programmer there must be a soldering error or connection error

    ReplyDelete
  5. Sry for my late reply.
    No it blinks and stops when the operation is in progress.
    Like when im testing the hardware. It blinks for some time and shows unknown hardware.

    The simplicity of the programmer encouraged me to try it out. It would be of great help for me and my friends if i can make it work. Else i will have to buy one. :(
    Anyway i will be checking the connections. But if the connections are wrong it used to give a 'no response ' error.

    ReplyDelete
  6. it shows there is some short of error in your hardware or connection

    it must be off for normal time and start glowing when you do some opreration(read write)

    ReplyDelete
  7. ok i made some progress.
    I found that i had made an error in the connection of BC547.
    the software can now detect the device and erase any pre-written program.
    But when i am writing a new program. it gives the following error.
    'ERROR-> Writing address 0x000000
    Written : 0x2C89 Read : 0x3FFFF'

    ReplyDelete
  8. Hi Starshatter
    as clear with the results your programmer reading okey
    but does't write any thing
    because 3FFF is deafult data in code memory

    plese tell me about led status then i will be able to tall you something more

    and you still committing some mistake in circuit may be in power or transistor fault or serial port connection

    ReplyDelete
  9. thank u for ur patience regarding my problem.
    I did the whole circuit again.It can detect the device and erase but i am getting a new error message for programming-
    'ERROR-> Writing address 0x000000
    Written : 0x2842 Read : 0x2800'
    Is there any other changes in the software i should do other the screenshots u gave?

    ReplyDelete
  10. Starshatter

    is the same data being written every time.

    please tell me about led status.

    i can't understand what did you say about screenshots

    ReplyDelete
  11. Yeah. I tried with the same hex file.
    Well when i tried to program it the led blinks 3 times before giving the error message.

    By the screenshots i meant the ones provided in your tutorial.

    ReplyDelete
  12. Hi starshatter

    actually im asking you is the same data x2800 is being written to the mcu even if the data to be written is diffrent

    the screen shots are really engough to get thi worked

    i personnaly tested and used this with the same settings years ago when i start dealing with pic mcu
    now the only thing i can suggest you that put the current circuit on side way and make a new one with saprate new components

    ReplyDelete
  13. ok i will get new parts and try them again.
    Can i have ur email id?

    ReplyDelete
  14. sure you can have my id
    mailchaduarygaurav@gmail.com

    ReplyDelete
  15. This thing will not work on all modern pC's.. The ATX specs for Serial ports have lowered port voltages and hence will only give read and write errors. The only option is to buy or build a PICKIT2 or 3 which runs on USB. I have tried building all sorts of programmers, serial/parallel and of different types, none would run on my computer and finally bought a pickit2 for 1300rs, which works so fine and easy and can be used with laptops too..

    ReplyDelete
  16. The two transistor circuitry act as level converters. Isn't it?

    ReplyDelete
  17. Hi Gaurav,
    that's a great effort! Could save some bucks for occasional PIC user.

    You mentioned that it's not USB2Serial comptible
    "Does not support the usb to serial converter"

    What's the reason for it - software incompatibility or serial converter can't drive enough current for the programming? How to modify that scheme so it's still cheap but can be used with USB - not many modern laptops have the COM any more?

    Thanks!

    ReplyDelete
    Replies
    1. Most usb to serial converters only support rx and tx, pins 2 and 3 on the serial port. The rest of the pins are generally not broken out, so not available on the 9-pin port.

      Delete
  18. the main problem with usb to serial converter is

    how windows treats an actual physical com (serial) port

    and
    how windows treats an virtual usb based com port

    thank you for your advice will try to do something to work this with usb2serial converter

    ReplyDelete
  19. hello sir ,
    my lap dont have serial port so i have to use usb to serial converter ,so pls do any modification is usb to serial software to make compactable to this type of circuits ,or make any thing to make work for converter type connectors.
    i am using pic16f877& 16f73.

    ReplyDelete
  20. Hi I wanted to know if i could make it work with all microchip pic

    ReplyDelete
  21. i have assembled this circuit,bt winpic is showing error ,device not detected,led is not active for all time.For other one software it is working,wat is the problem with the winpic.pls help me ...

    ReplyDelete
  22. led active all the time shows any error in assembly or faulty transistor

    ReplyDelete
  23. The led light only when you perform read or write operation

    ReplyDelete
  24. actually led is off when i am using winpic,bt led light on (during r/w operation) on other softwere,wats may be the pblm?

    ReplyDelete
  25. bc557 is overheating?? what can i do for that

    ReplyDelete
  26. Does we have to connect any battery or any power source while programming ?

    ReplyDelete
    Replies
    1. yes you need to connect external power

      please take a look of the schematic there are two regulator 12v for mclr and 5v for power

      so you need to supply power to these regulator

      Delete
  27. Replies
    1. this programmer is tested and verified
      all the voltage levels have been taken into count don't worry

      Delete
  28. I had made the programmer. It works fine but winpic800 software does not support pic 16f628 but it supports 16f628a so can I program it by setting winpic800 to 16f628a

    ReplyDelete
    Replies
    1. if guess there is not much difference between the PIC16F628A and PIC16F628 actually 'A' one is comes after the PIC16F628
      you can program both of them. y by setting the software to PIC16F628A

      Delete
  29. This comment has been removed by the author.

    ReplyDelete
  30. Is it necessary to connect an oscillator with 16f628a? What would happen if I do not connect it ?

    ReplyDelete
    Replies
    1. Not in the programmer but while using programmed pic in a circuit

      Delete
    2. you don't need any oscillator when programming the device

      but you may or may not need oscillator when using that programmed device in the application circuit. it totally depend on weather your device have an internal oscillator and if there is an internal oscillator then it should properly configured and enabled by the proper configuration bits.

      Delete
  31. I had programmed led blinking program in pic16f628a. The led blinks for sometime and then automatically stops. Can you tell me the the reason for this ?

    ReplyDelete
  32. yes.. I try on ft232 based usb-com converter actually it's can't program 18f2550 :(

    ReplyDelete
    Replies
    1. i have mentioned this thing, it is not possible to support usb to serial converter

      Delete
  33. I am trying to put the firmware of pickit 2 to the 18f2550 through this serial programmer but i am gerring the following error
    'ERROR-> Writing address 0x000000
    Written : 0x2842 Read : 0x2800'

    Hardware test is ok
    Device detection is working fine but i am the getting the above error when i am programming the pic 18f2550

    ReplyDelete
  34. what kind of serial cable I need? stright or crossover? thank you!

    ReplyDelete
  35. Hi Gaurav,

    Your programmer is nice. I want to use this. But arising a confusion- should I connect comport pin 5 and pic vss pins and regulator/power supply ground together?

    Thanks
    Tinku

    ReplyDelete
    Replies
    1. connect it as per schematic. schematic shows its connected, at least take a look.

      Delete
  36. Can you tell me why it doesn't support USB to Serial converter?

    ReplyDelete
  37. hello Gaurav, good to see your posts..
    can you please tell does this circuit supports 16f676 PIC Mc??

    ReplyDelete
  38. hellow sir I am using a laptop of 15pin com port but ur design is for 9 pin, I have tried it using a 15pin com port to 9 pin com port cable but it dosent work can u please help me???? I am trying it from so many months but still failed.

    ReplyDelete
    Replies
    1. 2-row 15-pin ports are generally game ports. The signalling is diferent on game ports than on 9-pin serial ports.

      Delete
  39. Kindly give me your mail id, i need your help in one of my project

    or mail me on -- bhalodiahardik@yahoo.in

    Hardik Bhalodia

    ReplyDelete
  40. could I use a pc power supply. to supply the voltage have no regulators or money

    ReplyDelete
  41. Gaurav Chaudhary

    I notice that your schematic and the picture of "Pin Configuration of a serial port" have seen something error and confusing my mind, the "Pin Configuration of a serial port" said that the "pin 4" is not used, but on your "schematic" is having a connection on the "pin 4" may you please clarify this error/s

    thanks for making and posting of this very useful project,

    ReplyDelete
    Replies
    1. i am not getting what exactly you are trying to say
      pin 4 is DTR , and as per the "PIN Configuration window" it is used as DATA ,

      Delete
    2. have a view on this picture sir, that is what i'm trying to say, sorry for my english
      thanks in advance

      http://www.mediafire.com/view/vhh42579676t41x/Untitled.png

      Delete
    3. the serial port pin-out image is just to give you brief idea how the pins of the serial port on the back of the PC looks like this image give only the pinouts, the term "not used" does not concern to this application. that image is given in general, only for the pinouts thats all .

      Delete
    4. Now I got it, thanks again Mr. :) ,,, now i'm going to built one

      Delete
  42. Gaurav Chaudhary

    I've assembled your JDM programmer but I cannot seem to make it work properly after PC connection is made, perhaps you could enlighten me?

    When using WinPIC800:
    - at *detect PIC* it says "DETECTED -> unknown" on the status log window
    - at *hardware test* it says "ERROR -> hardware is not responding"
    erasing works without error messages, also read works but LED does not give away any light in WinPIC800 (It did when performing any action but I found out I had bad connection in 10k resistor [after MCLR] to ground and it just stays off since connection was fixed)

    I have double-checked and confirmed that all connections are correct.

    I have also tried other JDM-compatible programming software such as ICprog, althogh it does not have 18F2550 support, I wanted to make sure the circuitry was ok, and the LED gives light when performing actions but result is the same: it fails writing operation.

    Thank you very much for your time,
    Best regards,

    David

    ReplyDelete
  43. I have assembled this circuit and, after some initial difficulties, It´s working fine.
    But, I only had success using another program.

    This program is named PICPgm. It not only has worked well but also was able to identify hardware and the PIC appropriately.

    In my testing I used a PIC16F84a and a power supply with 16 Volts.

    If you want to test the PICPgm the site to download is:
    http://picpgm.picprojects.net/

    Hope this helps! :)

    ReplyDelete
  44. I have made this circuit ..... it works nice & perfect :) !!
    WinPic800 has detected the programmer and the PIC18F2550
    Thank you very much for your effort .... now I am going to make the PICKit 2 Circuit

    ReplyDelete
  45. Hello everyone
    are a beginner and want to know if you should use an external power supply. I have to program a 18f2550 thanks to all

    ReplyDelete
  46. yes you need a external power supply

    ReplyDelete
    Replies
    1. Gaurav Chaudhary
      you not mention the external power supply in practical circuit
      please tell me where the ground of the external power supply is connected

      Delete
  47. hello someone kindly would send a simplified diagram to ' the email nicola.capo87@gmail.com I can not program the pic thanks to all I ask kindly

    ReplyDelete
  48. This schematic was connected directly to COM2 on ASUS Motherboard K8V-MX/S. But neither "Winpic800" no "ICProg" can't programm PIC18F2550. I can do it so only through "PICPgm Dev.Prog. v.1.7.9.3".

    Thank you so much Gaurav Chaudhary!

    ReplyDelete
  49. thanks for circuit diagram,
    Pls I've made the circuit on a breadboard,but when i connect the power to the circuit the led doesn't lit(doesn't glow) and thewinpic app doesn't detect my hardware,
    when i measured the TX signal Pin 3 on the serial port i found it -10V and when start programming it doesn't change,
    pls advice

    ReplyDelete
  50. by the way I'm trying to programming PIC16F84A

    ReplyDelete
  51. hello
    great simple circuit... i haven't thougt to find some good alternative to the pikkit3, because my company don't want to buy one since i'm the only one able to use it. But am i able to programm my pic 18f46k22?

    ReplyDelete
  52. I assembled the circuit. But my PC doesn't have 9 Pin D connector. So I bought a USB to 9 pin D connector adapter. Now the mikroPrgram doesn't detect the MCU. It shows always 'Disconnected' Status. Now how to program the chip. Plz help

    ReplyDelete
  53. Pls help me for solving this error for LCD16X2 interfacing with atmega32

    c:/winavr-20070525/bin/../avr/include/util/delay.h:89:3: warning: #warning "Compiler optimizations disabled; functions from won't work as designed"
    ../lcd_lib.c: In function 'LCDshiftLeft':
    ../lcd_lib.c:257: error: 'for' loop initial declaration used outside C99 mode
    ../lcd_lib.c: In function 'LCDshiftRight':
    ../lcd_lib.c:264: error: 'for' loop initial declaration used outside C99 mode
    make: *** [lcd_lib.o] Error 1
    Build failed with 2 errors and 1 warnings...

    ReplyDelete
  54. Can I use this circuit on Laptop Serial Port?

    ReplyDelete