Pic Serial Programmer

  1. Microchip Pic Programmer Kit
  2. Pic Serial Programmer Operator
  3. Pic Serial Programmer Download

Serial port programmer for 8/18/28/40 pin PIC microcontrollers and I2C EEPROMS + ICSP connector and cable. Parallel port PIC 8/18/28/40 pin devices programmer. World smallest PICMICRO IN-CIRCUIT debugger and programmer. The PIC programmer has a USB connector so that it can plug into the USB port of a computer. When software is compiled and ready to be run, it travels from the USB into the PIC programmer, then through the ICSP connector, then to the micrcontroller, which then executes the code.

1 Overview

Has same purpose like parallel port programmer. You have to use it to get PIC bootloader before you use USB HID programmer or you may use it to put any other FW into your PIC. Programmer uses In-Circuit Serial Programming (ICSP) interface described in PIC18F2455 / 2550 / 4455 / 4550 Data sheet.

Serial port is not used in standard communication mode (where RxD, TxD are used for regular data transfers). Programmer uses control pins of serial interface to send data into / read data from PIC. Unfortunately this programmer does not work through USB to serial conversion cables (like Prolific USB-to-Serial). I assume it is because of specific RS232 implementation on “irregular” use of COM port. I did not found programming SW working with such a conversion cable.

Here are briefly summarized positives and negatives of Simple serial port programmer (JDM programmer):

+/-WhatWhy
+freeHW & bootloader & programming SW are available for free
+easy1) plug to COM port
2) power on
3) run FW update from PC
+cheapjust few components needed
+no Windows
driver needed
uses standard Windows serial port driver or drivers shipped with PC / NB chipset
-external
power supply
needed
serial port programmer needs external power supply +5V to operate
-slowmore slower than USB programmer
-no COM ports
on new PCs
actual PCs and NBs does not have COM ports, due to RS232 obsolescence; but you may try to use for your new PC/NB without COM port:
- for PCs: serial (and parallel) port PCI or PCI express cards
- for NBs: PCMCIA card or ExpressCard to RS232
USB to COM converters seem to not work.

2 HW

Scheme is inspired on article Super Simple PIC Programmer. But it does not worked for me, because there is one missing wire. This is my working scheme:


Figure 1: PIC18F2550 serial programmer scheme

Scheme contains just 3 resistors. This serial programmer needs external power +5V.
But it is easy to overcome this problem by getting needed power from USB port (as shown on bottom right corner of scheme}. See USB pinout on USB programmer web page. There are few additional components used (two capacitors C1 and C2), but nothing critical will happen if you omit them both.
If there is not +5V source from USB available, you can use DC power adapters. Typical adjustable DC adapter nor have +5V output, nor has stabilized output. That means you should use some more components to get stabilized DC +5V from power adapter:


Figure 2: DC power stabilizer +5V

To simplify scheme you can omit R1 and LED1 which role is to signalize that +5V is available on output. C3 is not critical, too. But I do not recommend removing of capacitors C1 and C2.

And this is how it looks on my experiment solderless breadboard:


Figure 3: PIC18F2550 serial programmer on experiment solderless breadboard

Red framed part is external power supply stabilizer from Figure 2.

Here is COM pin out you may find useful:

pinnamedirection
1DCDin
2RxDin
3TxDout
4DTRout
5GND-
6DSRin
7RTSout
8CTSin
9RIin
MALE
FEMALE

Figure 4: COM port (serial port) pinout

Microchip Pic Programmer Kit

2 SW

I have decided for PICpgm. It is really mature and universal programming SW (I have also used in parallel PIC programmer). And it is for free, too.
No additional drivers are needed to run programming SW.

All needed you could find packed in 1 archive at the bottom of this article.

Let’s look how to use it:

Pic Serial Programmer Operator

  1. Connect your serial PIC programmer to PC / NB.
  2. Power up serial PIC programmer with +5V.
  3. Start PICpgm (I have used v. 1.7.8.0).
  4. First you have to check configuration - from main menu select item Hardware - subitem Hardware Selection/Configuration:


    Figure 5: PICpgm - Hardware - Hardware Selection/Configuration

  5. Check your settings are same like here:


    Figure 6: PICpgm - Programmer Selection/Configuration

    The only difference should be in Port configuration - mine serial port is named COM1. Here chose serial port name your serial port has. You are limited to choose COM1 to COM4. If your serial port number has higher number you have to change it in your windows device manager in your serial port device driver.

  6. If your configuration is right, you will see that PICpgm detects your PIC chip:


    Figure 7: PICpgm - PIC detected

    Be patient, it takes some time till PicPgm reads information after you click OK in previous step.

  7. Browse your HEX file you would like to get into PIC
    I have used HEX file of USB bootloader for PIC18F2550, see archive file for download in USB programmer.
  8. Press Program PIC button


    Figure 8: PICpgm - Program PIC

    Now rest of the work does PICpgm automatically.

  9. PICpgm in first step erases PIC:


    Figure 9: PICpgm - PIC erasing start


    Figure 10: PICpgm - PIC erasing finished


  10. PICpgm in second step programs content of FLASH:


    Figure 11: PICpgm - PIC FLASH programming progress


  11. PICpgm in third step verifies programmed FLASH memory:


    Figure 12: PICpgm - PIC FLASH content verifying progress

  12. PICpgm in fourth step programs data memory:


    Figure 13: PICpgm - PIC EEPROM data memory programming progress


  13. PICpgm in fourth step programs data memory:


    Figure 14: PICpgm - PIC EEPROM data memory verifying progress


  14. PICpgm in sixth programs and verifies configuration memory:


    Figure 15: PICpgm - PIC configuration memory verifying progress

    That is just few bytes to program, so this step goes fast.

  15. PICpgm in last step evaluates verification:


    Figure 16: PICpgm - PIC verification errors

    Even verification fails, programming was successful, as is also written on PICpgm web pages: If you do not need RB5 as I/O pin and RB5 is held on GND level you can ignore this verify error. It will not cause any problems.

  16. For sure check the PICpgm Log, which should have only this one verification error:


    Figure 17: PICpgm - Verify Error: Cfg Mem 0x000006: PIC=0x0085 Buf=0x0081


  17. But if you would like to prevent error message in previous step, you can do it by changing configuration of LVP bit (Low Voltage Programming bit):


    Figure 18: PICpgm - PIC LVP change to Enabled

    You have to go to Config Bits tab of PICpgm and change the configuration of LVP bit manually from Disabled to Enabled, when there is Disabled value.
    You have to do this every time you load HEX file into PICpgm.
    After this change you will see this 'Success dialog' except that one on Figure 16:


    Figure 19: PICpgm - PIC programming finished successfully

    This 'Success dialog' will automatically disappear after few seconds.

    Just for comparison with Log containing errors on Figure 30 here is Log without any error:


    Figure 20: PICpgm - Log without error

    Do not forget that changing LVP to Enabled will block RB5/VPP pin of PIC18F2550 as clearly described on PICpgm pages:
    The bit for which the verification fails here is the 'LVP' configuration bit:
    LVP: Low-Voltage Programming Enable bit:
    1 = Low-Voltage Programming enabled, RB5 is the PGM pin
    0 = Low-Voltage Programming disabled, RB5 is an I/O pin

Pic Serial Programmer Download

5 Downloads

Archive COM programmer package.zip contains:

  • PICPgm version 1.7.8.0 portable,
  • COM programmer schematics in PDF.
Pic

You can start with programming USB HID bootloader into PIC - see section USB bootloader.

6 Final remarks

  1. This article just shows what worked for me, it does not mean there is not another way to achieve same result.
  2. You can find many other programming SWs. I like PICpgm.
  3. Programmer has to work with PIC18F2455 which has 24kB FLASH comparing to PIC18F2550’s 32kB FLASH. So this is Simple serial port programmer (JDM programmer) for PIC18F2550 and PIC18F2455.
  4. Don’t forget, everything you do is at your own risk. You have to know what you are doing. I am not responsible for any damages caused by using any information from these web pages.
  5. If you want to work with PICs professionally, see some commercial products with debugging capability.
  6. If you found these information useful, please consider to:

    in EUR

    in USD

    This will allow me to bring more information and projects for you.


© 2013, Radoslav Kastiel