XML RSS
What is this?
Add to My Yahoo!
Add to My MSN
Add to Google

Home
LCD-KEYS OnePort
C Course
Schematic Tool
PIC Introduction
PIC Programming
PIC Programmers
PIC Compilers
PIC BASIC
Tips & Techniques
PIC Tutorials
PIC Projects
Store
My SECRET
Oscilloscopes
Web Directory
MicroBlog
Problem?-Solution
Books
Wish List
Contact Me
About Me
Terms of Use
Search This Site
Freebies
Articles
Resource Links
Site Map
Your Projects
Rant/Rave
Video du Jour
Privacy Policy

I use and
recommend Firefox
for the best internet
browsing experience. Click below for your
free copy today:

CLICK THE IMAGE:


Note: I find it faster
and easier to use and
it has great plugins.  

It even imports all your current
browser settings!

There's no risk as your existing browser is not affected in any way - you can just choose which one to use.

Google

Find Out How This
Site Works
Like any engineering problem with the right tools it's Easy.
CLICK HERE 

Social Bookmarking
Click & Add:
add to BlinkBlink
add to Del.icio.usDel.icio.us
add to DiggDigg
add to FurlFurl
add to GoogleGoogle
add to SimpySimpy
add to SpurlSpurl
Bookmark at TechnoratiTechnorati
add to YahooY! MyWeb
Readers comments

"I wanted to thank
you so so so much
for all the information
you have provided in
your site it's

SUPERB and FANTASTIC."


- Ranish Pottath


"This site really is
the best and my favorite.
I find here many useful
projects and tips."

- Milan

bursach<at>gmail.com

Learn PIC C Now
Wondering how to program your next project using C and need a great start?


"Awesome site,
very, very easy and nice
to navigate!"


- Matt
matt_tr<at>
wolf359.cjb.net


"I am a newbie to PIC
and I wanted to say
 how great your
site has been for me."


- Dave

de_scott<at>bellsouth.net

Learn Microcontrollers
"Interested in
Microcontrollers?"


Sign up for The
Free 7 day guide:

FREE GUIDE : CLICK HERE

"Your site is a great
and perfect work.
congratulations."


- Suresh

integratredinfosys<at>
yahoo.com

"I couldn't find the correct
words to define
yourweb site.

Very useful, uncovered,
honest and clear.

Thanks so much for
your time and works.
Regards."


- Anon





PIC Programming using ICSP and ICPROG.

How to program your PIC microcontroller
using
ICSP...


This page shows you how to use ICSP for PIC programming giving some ICSP connection diagrams and it also shows how to use ICPROG - the PC software for programming a PIC Micro.  


ICSP (In Circuit Serial Programming) is the serial interface used by the PIC micro to download a program into the PIC micro's program memory.

Note: You can also program the
internal EEPROM as well.  

You can learn more about ICSP here.


Jump to Using ICPROG





PIC programming block diagram

PIC ICSP connections

This section shows connection pins for PIC programming.

12F675 : ICSP PIC Programming connections:

12F675 ICSP connections

16F88 : ICSP PIC Programming connections:

16F88 ICSP connections

16F877A : ICSP PIC Programming connections:

16F877A ICSP connections

ICPROG for PICMicro

ICPROG is a free windows program that you can use for PIC Programming. It interfaces using either the serial or parallel port on a PC, via programming hardware, to the ICSP pins on the PIC micro.

You can download ICPROG here [opens a new window].

ICPROG uses the hex file generated either from an assembler such as MPASM or a compiler such as MikroC.

When you first start ICPROG this is the screen you see for selecting the hardware for the PIC programmer; I have selected AN589 programmer - a parallel port programmer.

ICPROG 1st screen


After this the main program screen is displayed.  Don't be put off by all the address program code area.  The important controls are the Open button and the buttons with ICs underneath.

ICPROG mai nleft ICPROG main right

Select Device

To  use it for PIC programming select the device from the menu Settings-->
Device-->
Microchip PIC.  

Here I have chosen a PIC16F877A device.

The Device menu also shows a lot of other devices that you can use with ICPROG.
 
Note: The screen changes to accommodate the chip features (here EEPROM oscillator, program 'Write enable' and chip configuration bits).


ICPROG 1st left ICPROG 1st right


Hardware check

You can check to see if ICPROG is communicating with your hardware by using the menu option Settings-->Hardware check.  This lets you toggle the state of individual ICSP signals and the VCC power.  

Note you'll need an oscilloscope or multimeter to check the signal state.

Load Hex file

The next thing to do with the PIC software is programming the PIC by loading up the hex file (unless you have a 12F675 that has an oscillator calibration value that you will want to keep -in this case do a read first).

Note: You have to select the device manually it is not defined in the hex file.  Although ICPROG stores the current device in use between sessions you have to select a new device manually when you start a new hardware project

Note: Fuses and oscillator settings are controlled from the hex file
so all you need to do is check that they match your settings in the compiler or assembler.

Hit the open button to load your hex file.

Note how the oscillator, write enable and fuses have changed (controlled from the hex file):

ICPROG hex loaded left ICPROG hex loaded right


Erase device

ICPROG erase buttonThe next PIC programming action is to erase the device by hitting the erase device button.  It sends a command to the PIC which erases the whole device including protection bits (in newer devices).  Old devices used to be un-usable after you had set the protection bits!

So this command quickly erases the chip.

Note: You don't have to use the erase button as the program button will overwrite the chip contents anyway.  It is sometimes useful if you want to convince yourself that the program is actually programmed into the device correctly.

Program device

ICPROG programme buttonThe program device button does just that it programs the contents loaded from the hex file (in ICPROG memory) into the program memory of the PIC micro.  If there is any EEPROM in the chip then it programs this as well. Finally it programs the configuration word.

Verify device

ICPROG verify buttonThe verify device button reads back the entire contents of the chip ensuring that it matches the hex file (loaded into ICPROG).

Note: Depending on settings in menu :

Settings--> Options--> Programming

verification may automatically happen at the end.

Once you get used to ICPROG and your hardware works reliably you may only want to do a verify if something does not work otherwise it takes more time up.

Read device

ICPROG read buttonThe read device button reads back the entire contents of the chip into the currently selected buffer (shown at the bottom of the ICPROG window). So you can save the hex file or compare it to the contents of another buffer.

These are the only controls you need for successful PIC programming using ICPROG.



Jump from PIC Programming to
Best Microcontroller Projects Home Page.



Don't forget to Sign Up for your

Microcontroller Newsletter

With "Essential tips and techniques",

..."New Site Info" and more...

Including a free project :

How to drive an LCD and 12key keypad using "Only One 8 Bit Port" with no interface logic!...

(Works for any microcontroller)

This costs you : Nothing...
Just fill out the form below and you'll get full C source code and project schematic and description.



Email

Name

Then

Don't worry -- your e-mail address is totally secure.
I promise to use it only to send you MicroZine.
Google
 
  Best Microcontroller projects.