Flash PIC Programmer Software
Introduction
I get many requests for better software to go with my simple PIC programmer
designs:
If you've never come across them before, more information on some of them,
including my old DOS software, is available from
several sites.
The designs are so simple because all the intelligence needed
to program the PIC resides in the PC. The programmer hardware is
just a way of interfacing a PIC directly to the PC via either a parallel
(printer) port or a serial port. Basically the PC must arrange for
the PIC to be placed in programming mode (though for extreme
simplicity this can be done manually)
and then it waggles a couple of PIC pins to
download the program to the PIC from a hex file representation. On the early
EEPROM PICs (such as the 16C84) programming mode is entered by
applying approximately 12V to the /MCLR pin, but the latest chips
can also be programmed without the need for a 12V supply. Apart from
memory size differences most flash PICs look the same to the
programmer software (there are exceptions like the 16F74
- currently this program doesn't work with those).
All the software needs to do to control virtually any
simple PIC programmer hardware setup is to generate or accept
these logical signals:
- OUT -- data from the PC to the PIC (usually RB7)
- CLK -- clock from the PC to the PIC (usually RB6)
- VDD -- turn on the PIC +5V supply (not always needed)
- MCLR -- control the PIC /MCLR pin
- PGM -- used (with MCLR) to establish programming mode
- READ -- high when PIC must be read
- IN -- data from the PIC (RB7 again) to the PC
That's what my software does. It also provides a way of specifying
which port pin carries which signal. Not all the signals need to
be generated to program a PIC. For example, to control the "quick-and-dirty" programmer
only OUT and CLK are required. That's because programming mode is
established manually (by connecting /MCLR to 12V) and the PIC cannot be read.
In its present state, alhough not complete, the software has enough functionality
to be useful (I hope). I've supplied
a Win32 executable (FPP.EXE), a DOS executable (FPPDOS.EXE) and a batch file (FPP.BAT)
for running the Win32 software from MPLAB. When the Windows software is run for the
first time it will need to be configured by hitting the setup button to
specify the programmer hardware (and other things).
Running FPP under NT/Win2k/XP
FPP fiddles with I/O ports directly and while this is
tolerated under Win95/98/Me, it is a definite
no-no on NT-like versions of Windows. To
get around this the program looks for and uses a special driver
called "GIVEIO.SYS" which can be downloaded as
directio.zip
from the Dr Dobb's Journal archive. You only need this driver if you use
Windows NT, Windows 2000 or Windows XP. The driver can be installed
in a variety of ways but I used a program called "LOADDRV.EXE" (one
source of this program is
loaddrv.zip). The method I used was as follows:
- Copy GIVEIO.SYS to a folder (for example SYSTEM32 in the Windows system folder)
- Run LOADDRV, specify the full path name of GIVEIO.SYS, and hit install
- Reboot
- Run the Device Manager (from the hardware tab of the System control panel item)
- Select the menu option to show hidden devices
- Look for "giveio" under non-plug&play drivers, right click and select properties
- Using the driver tab of the properties sheet select Automatic
- Reboot
Using FPP
To be completed ...
Command line options
To be completed ...
Using FPP with MPLAB
To be completed ...
All schematics and pictures
Copyright © 2001 David Tait
Russian translation of this article by Yuri Lysenkov you can see here
Используются технологии
uCoz