4th December 2007

Tutorial 1 – 18F4550 Development Hardware setup

Tutorial Goal: Introduce and describe development setup

    As mentioned in the Introduction, I am going to be working with the following until further notice:

    • PIC18F4550
    • PicKit 2
    • MPLAB IDE V8.00
    • MPASM V5.14

    Here is a picture of my setup:

    18f4550 protoboard

    Small FAQ:
    Q: Some of the wires are not as straight as they should be. Could you fix them?
    A: No.

    I am using a 5V (1A) DC adapter as a power source. I cut off the end and attached the banana plugs.

    The LED on the top left (with 1KOhm adapter) serves as an ON-light. Also, if anything accidentally shorts, the light turns off. (I will be using 1K resistors for LEDs since they provide an adequate amount of current and because I have many of them. Resistors as low as 270 Ohms may be used safely for regular 20mA LEDs.)

    The PicKit 2 package is an In-Circuit Serial Programmer (ICSP). This means that the PIC can stay on the development board during programming. Unfortunately, the programmer did not come with a connector to the PIC so I had to make one.

    pin header

    Unable to find a 6 pin header, I purchased a longer one and cut off 6 pins. I trimmed the long side of the pins to fit into the PicKit and soldered the wires onto the short side, using a red wire to indicate pin 1. Then, I wrapped the black tie thing shown in the picture around the soldered connections to make sure they don’t touch. It turned out ugly, but functional.

    PicKit2 ICSP connections: 1 - VPP, 2 - VDD, 3 - VSS(GND), 4 - PGD, 5 - PGC, 6 - PGM (or NC)

    I’m not sure where I found the above diagram, but I believe if was some MicroChip PDF.

    Looking at the 18F4550 datasheet, the corresponding pins are:

    • Vpp (1)
    • Vdd (11)
    • Vss (12)
    • PGD (40)
    • PGC (39)

    The 18F4550 supports low-voltage programming (using 5V instead of ~11V). To use LVP, the PGM (38) pin needs to be set high. If LVP is disabled, it functions as an I/O pin. (Side note: An HVP programmer must be used to enable LVP on a new PIC. Also, with LVP enabled, PGM (38) no longer functions as an I/O pin.)

    The 5V/GND connections on the 18F4550 should be made as follows:

    • 5V (11)
    • 5V (32)
    • GND (12)
    • GND (31)

    Notice that there are 2 connections for Vdd (5V) and Vss (GND). All four must be made.

    I believe that the PicKit programmer can power the chip via these pins, however it is better to use your own power source. Connecting both a 5V signal and the PicKit to pin 11 relieves the programmer (and the USB port) or the unnecessary current draw. Either way, the Vdd pin of the programmer does need to be connected to Vdd on the 18F4550.

    I believe this fully describes my setup. Any suggestions or questions about this post can be posted as replies and will (probably) be answered in a timely manner.

    This entry was posted on Tuesday, December 4th, 2007 at 3:26 pm and is filed under 18F4550 Assembly Tutorial. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

    There are currently 15 responses to “Tutorial 1 – 18F4550 Development Hardware setup”

    Why not let us know what you think by adding your own comment! Your opinion is as valid as anyone elses, so come on... let us know what you think.

    1. 1 On February 4th, 2008, zaid said:

      hello, is polarity -ve +ve an issue when working with pic? or we just can plug as long its 5volts??

    2. 2 On February 8th, 2008, Andrey said:

      Yes, polarity is definitely an issue. You must plug the +ve voltage into pins 11 and 32 and 0V into pins 12 and 31. If you reverse the connections, you will likely have a broken chip.

    3. 3 On June 15th, 2008, Brian Letts said:

      Hi, its good to see a site and tutorials dedicated to the 18F. Your tutorials and site are a credit to you. Keep up the good work.

      Brian

    4. 4 On July 19th, 2008, Dr. Amer said:

      That is really nice. However I would love to see, some USB based projects, as 18F4550 has built in USB 2.0 support. That is nice work. Moreover a C or BASIC version would be more user friendly.

    5. 5 On August 5th, 2008, Jeff Greer said:

      Great site! Thank you for the useful information. I hope to see it continue.

      Jeff

    6. 6 On August 14th, 2008, JPM said:

      Are you using stranded or solid wire for your breadboarding? When I started out, with stranded, it got to be rather cumbersome twisting the stranded ends all the time and then dealing with wires that wouldn’t go into the breadboard hole. But then, I came across a spool of solid, multi-conductor telephone wire! Great for breadboarding! Plus there are many different colors.

    7. 7 On October 15th, 2008, minal said:

      Help me to write code in c language with c18 compiler for pic18f4550 demo board.i am new one.

    8. 8 On February 15th, 2009, siddharth said:

      thanks a lot for the connections, it was so useful.

    9. 9 On March 26th, 2009, dingarac said:

      Can anybody give me the PC software for commutation of PC with 18f4550

    10. 10 On April 15th, 2009, sridhar said:

      this is a nice job. it would be helpful if you can give a functional programmer circuit. like ICSP.

    11. 11 On May 10th, 2009, jpp said:

      I have one question… Do you know if this same setup works with the pic16f877a?
      i was looking at the datasheets and they are quiet similar.
      It seems like it could work.. but im a beginner with this stuff and maybe there’s something i dont know.

    12. 12 On February 9th, 2010, PG said:

      You say “I believe that the PicKit programmer can power the chip via these pins” – can anyone confirm/deny this? I already have a PicKit and a looming 4550 project – *surely* just the PicKit is enough?

    13. 13 On May 15th, 2010, kouqiang said:

      A comment to “Notice that there are 2 connections for Vdd (5V) and Vss (GND). All four must be made.” in
      “Tutorial Goal: Introduce and describe development setup” :

      I found that it also works only wired a Vdd(5V) and a Vss(GND),i use my multimeter to test the two Vdd and Vss pin,they are connected in chip, so i think that we can wired just one Vdd and one Vss.

    14. 14 On June 7th, 2010, Martin said:

      I just programmed a 18f4550 and used only the pickit, without external power source, from an usb port of my laptop… I think that is enough.

    15. 15 On August 4th, 2010, Ivan said:

      Yes , you can program the pic with just th power source from the pickit itself. But, from my own experience(in my own developement board), it can’t power the PiC in running mode. Wonder if it *IS* capable of doing that, or it’s just for supplying power when programming.

    Leave a Reply

    • Sponsored Links

      December 2007
      M T W T F S S
          Nov »
       12
      3456789
      10111213141516
      17181920212223
      24252627282930
      31  
    • Donate