ZDTJ7
所属分类:其他小程序
开发工具:Visual C++
文件大小:198KB
下载次数:1
上传日期:2017-07-22 07:35:20
上 传 者:
owyngrpy
说明: WIN PIC 单片机的编程软件,支持多种PIC编程器,不错的
(WIN PIC microcontroller programming software, support for multiple PIC programmer, good)
文件列表:
WinPicPr\sourcefiles.txt (4810, 2004-04-20)
WinPicPr\html\devlist_format.htm (17539, 2004-03-23)
WinPicPr\html\index.htm (63345, 2004-07-02)
WinPicPr\html\winpic_faq.htm (13389, 2004-06-03)
WinPicPr\An589Interface.INI (264, 2003-01-22)
WinPicPr\Bojan_Dobaj_Intf_P16PRO.ini (319, 2004-03-16)
WinPicPr\Bojan_Dobaj_Intf_P16PRO40.ini (319, 2004-03-16)
WinPicPr\devices.ini (17757, 2004-03-28)
WinPicPr\noppp_interface.ini (337, 2003-10-27)
WinPicPr\SampleInterfaceOnLptPort.INI (264, 2003-01-22)
WinPicPr\SampleInterfaceOnSerialPort.INI (271, 2003-02-24)
WinPicPr\settings.ini (670, 2004-02-18)
WinPicPr\SimpleProductionGradeProgrammer.ini (335, 2003-05-23)
WinPicPr\topic_interface.INI (361, 2003-02-10)
WinPicPr\clear.bat (109, 2000-09-02)
WinPicPr\AboutU.h (1026, 2004-01-09)
WinPicPr\APPL.h (3024, 2004-03-27)
WinPicPr\Config.h (2949, 2004-01-28)
WinPicPr\Devices.h (7636, 2004-06-05)
WinPicPr\Helpids.h (1305, 2004-02-03)
WinPicPr\PIC_HEX.h (6408, 2003-12-10)
WinPicPr\PIC_HW.h (10268, 2004-06-06)
WinPicPr\PIC_PRG.h (5852, 2004-06-05)
WinPicPr\SpecHwIo.h (820, 2000-10-20)
WinPicPr\ToolWin1.h (2817, 2004-04-03)
WinPicPr\Translation.h (921, 2004-03-24)
eExternal\smport\TSmPort.h (4899, 2003-01-26)
WinPicPr\WinPicPr.h (14891, 2004-06-02)
eExternal\YHF_tools\YHF_Help.h (7608, 2002-08-20)
eExternal\YHF_tools\YHF_MultiLang.h (4115, 2004-03-28)
eExternal\YHF_tools\yhf_type.h (1496, 2003-07-04)
WinPicPr\Translation.c (32849, 2004-06-05)
WinPicPr\AboutU.cpp (1378, 2004-01-09)
WinPicPr\Config.cpp (6186, 2004-06-04)
WinPicPr\Devices.cpp (78008, 2004-06-05)
WinPicPr\Helpids.cpp (2477, 2004-02-03)
WinPicPr\PIC_HEX.cpp (18207, 2003-12-11)
... ...
Information about DL4YHF's Pic Programmer for Windows
------------------------------------------------------
Last updated: 2004-06-03 (ISO-format,YYYY-MM-DD)
Short Description
-------------------
A PIC is a small single-chip controller which can be used for many purposes.
A simple piece of hardware is required to program a PIC via the serial
interface of a PC (COM1..COM4), or via parallel interface (LPT1..LPT2).
There was a simple DOS-program called "PIP-02" to do this, but that program
did not work properly on my PC under windows, so I decided to write my own.
Supported devices are: PIC16C84, 16F84, 16F626, 12F675,
16F818, 16F87X, 16F88, and some more.
The programer runs on aPC with WIN95/Win***/Win2000/Win XP .
Under Windows NT 4, you will need an administrator account
otherwise the SmallPort utility will not work properly.
THIS SOFTWARE IS PUBLIC DOMAIN. THE ENTIRE RISK FOR ITS USE IS WITH YOU.
NOTE THAT THIS PROGRAMMER DOES NOT MEET MICROCHIP'S REQUIREMENTS FOR
A "PRODUCTION GRADE" PROGRAMMER BECAUSE IT CANNOT VERIFY THE PIC
AT DIFFERENT SUPPLY VOLTAGES.
After installing the software, you can find MORE UP-TO-DATE INFO in the manual,
see html\index.htm .
What you will find in THIS document, but not in the manual (html),
is how to customize WinPic and how to translate the user interface
into other languages.
See chapter Customizing WinPic for special applications
and Translating WinPic into other languages
near the end of this readme file.
Command Line Arguments
----------------------
You may call WinPic from a batch file, or an integrated development environment
to do an automated job without any user intervention.
For example, you can tell WinPic to load a program from a hexfile,
write it into the target device, and terminate itself afterwards.
The following list shows all command line parameters which are accepted:
considered a file name which will be loaded or saved (depending on /p or /r).
If a file name is specified but no other argument, the file will
be LOADED from disk but not programmed into the device.
/p
program (write data from HEX file into the connected device).
/r
read the contents of the device and dump them into a HEX file.
/q
terminates WinPic. Helpful for "batch programming" from a shell.
/nodelay
suppress the "pause" before command-line driven operation starts.
/overwrite
With this option, WinPic won't ask before overwriting an already
existing disk file. Use it together with the /r command if necessary.
/device=XXXX
Override the PIC device from the last session.
/config_word=XXXX
Override the configuration word loaded from a HEX file. 4-letters HEX
without prefix !
The command-line driven operation can be cancelled by pressing ESCAPE.
The main menu will be enabled anyway. Selecting certain menu items also
cancels command-line mode (and 'batch' mode).
Example (in a DOS batchfile):
winpic.exe keyer1.hex /p /q
Loads the file KEYER1.HEX, programs it into the connected device,
and terminates WinPic ("quit").
Interface for PIC16x84
----------------------
The required interface is a very common *SERIAL* interface. The connections
between COM-Port and the PIC are:
Serial Interface Signal | direction | PIC signal
-------------------------+----------------------+-----------------------------
RTS (pin 7) | >> | Pin 12 = RB6 = clock
DTR (pin 4) | >> (via resistor) | Pin 13 = RB7 = data
CTS (pin 8) | << | Pin 13 = RB7 = data
TXD (pin 3) | >> (12 Volts!) | Pin 4 = MCLR = Vpp
TXD (pin 3) | >> ( 5 Volts) | Pin 14 = "Vdd" = +5V supply
GND (pin 5) | - | Pin 5 = "Vss" = ground
There is a schematic for the simplest possible PIC programmer below;
however I don't prefer this one but a slightly improved version which appeared
in the German "Funkamateuer" magazine, May 19***, page 544
(Warning: The circuit diagram in the FUNKAMATEUR article has some design flaws.
See comments below !)
If your interface for the serial port uses inverted control signals (because
you have an inverting RS-232 level converter like the MAX232), you can drive
your interface with a customized interface definition file. This is explained
in the HTML document.
EXTRA SIMPLE Interface schematics (not recommended)
----------------------------------------------------
Before building this, check the output voltage of your TXD signal (the programmer
software allows you to "switch" the signals manually for this purpose !).
If it is less than 12 Volts, you should prefer an interface which uses the TXD
signal to switch a stabilized Vpp and Vdd instead of directly driving the PIC.
(use a fixed font like COURIER NEW to display this diagram)
-------------------------<< TXD(3)
__ | __
|----|__|-----------|__|----
| 10k 2k2 | |/ D1
| |------|------------------|
| ---------------- | |\ Zener 5.6V |
| --| 1 18|-- \|/D2 |
| --| 2 17|-- --- || C1 |
| --| 3 16|-- |------||-----------------|
|-----| 4 MCLR 15|-- | +||- 10uF |
-----| 5 gnd Vdd 14|------ |
| --| 6 RB7 13|-------------------->> CTS(8) |
| --| 7 RB6 12|------ | __ |
| --| 8 11|-- | -----|__|---<< DTR(4) |
| --| 9 10|-- | 2k2 __ |
| ---------------- --------|__|---<< RTS(7) |
| 22k |
|------------------------------------------------------() GND(5)
Note: I do not RECOMMEND this schematics, though some folks use it
(see the link list at the end of this document).
You should add a few diodes to limit the voltages on RB6 and RB7 to the
range of 0V to 5V (the serial interface produces up to +- 12V !)
to prevent latch up.
D1, D2 and C1 produce the supply voltage for the PIC from the programming
voltage. Not all serial interfaces are strong enough on TXD to produce
the required Vpp pulse (on MCLR) ! The schematics for a better programmer
which programs EPROM-based PICs too can be found in the manual
(see html\index.htm ).
Adaptions for other PIC programmer hardware
---------------------------------------------
It would be easy to modify the programmer to support some other
PIC programmers, especially those using the parallel port.
The problem is I do not have/need other PIC programming hardware,
so I cannot test it...
Since February 2002, its possible to use some PIC programmers
for the parallel port, though Windows (especially the newer
versions like XP) sometimes play a trick on us, it fiddles around
with the ports if some input signals (like "PAPER OUT") change.
However, you may try to get your old parallel programmer running.
Maybe it helps to de-activate (or even uninstall ?!) the printer
driver but IMO that is a bad situation.
Since October 2002, you can define the hardware connections
of your programming interface in a simple text file
(the HTML documents have more info how to achive this,
at least one sample file is contained in the program archive).
You can test the behaviour of the LPT port with the interface
test built inside the programmer. You can modify the control
signals and watch the state of the data input signal.
I connected a couple LEDs to the parallel port and noticed them
flashing while the "PAPER OUT" line changed.
Notes on the "AllPic2"-Programmer from "FUNKAMATEUR 5/19***"
------------------------------------------------------------
This article appeare in the German amateur radio magazine "FUNKAMATEUR" in
May 19*** on page 544. The principle is basically the same as the above circuit,
but it uses an external power supply and a stabilized +5V and +13V source.
The basic idea is ok, but the realization is not as good as it COULD be...
- The "positive" protecting diodes for RB6 and RB7 must be connected to
the PIC's Vdd pin, not Vpp like the author did. Vpp carries 13V, but the
voltage at RB6 and RB7 must never exceed Vdd to avoid latch-up.
Connecting D6 and D9 to Vpp is really stupid. Connect them to Vdd,
and add a 5.6V-Zener to prevent Vdd from rising too high.
- Do NOT use 1N4148 as "protection" diodes against ground and Vcc because
their forward voltage is too high to protect the PIC.
Use a BAT42 or similar schottky type !! (D6,D7,D8,D9)
- Reduce C1 to 4.7 or 10uF. There is no need for C1 to be 22uF !
Because this programmer switches Vdd together with Vpp, a problem may
result if C1 charges too slowly (the PIC needs a steep slope at Vpp).
- Connect a 220 Ohm resistor in series with the collector of Q4 .
Without this, too much current is drawn when charging C1, as a result
the Vpp signal does not rise fast enough, possibly causing trouble.
- Some newer devices (like PIC12F675) *REQUIRE* Vpp raised before Vdd.
Older programming specifications did not mention Vdd in the sequence
to enter programming mode. This may cause some trouble, also related
with C1 having a too high capacity in this design !
Software Installation
----------------------
Copy the following files into one directory, where you will start the
programmer later. The following files and directories are required:
WinPic.exe = the executable file
SampleInterfaceX.ini= some sample programming interface definition files
AN589Interface.ini = programming interface definition for "AN589" programmer
topic_interface.ini = programming interface definition for D.Tait's "TOPIC"
html\*.htm,*.gif = the manual (keep this directory structure!)
smport.sys, smport.vxd = driver for direct port access under
Win95, Win***, Win ME, 2000, Win NT and Win XP.
The SmallPort utility was written by A.Weitzman.
To run the program, you may possibly need Borland's VCL40.BPL .
This is a BIG DLL (1.88MB) so I did not include it in the WinPic archive.
It is available in a different archive. If you already have the VCL40.BPL
in your WINDOWS\SYSTEM directory, you don't have to download it.
If you get a 'missing DLL error', download VCL40 from the author's
homepage (see links below).
After the first successful program start, select your PIC type and your
programmer hardware. Don't forget to choose the COM port where you want to
connect the programmer (usually COM1 or COM2). You will only have to do
that once, because all important settings are saved in a INI-file.
Do not select the "LPT"-interface because I have not been able to test them
(applies to the "Tait"-Interface and Microchip's "AN589"-programmer) .
Operation
-----------------------
Not much to say about this.. if you have ever used PIP02, you will find
almost the same functions and menu structure in this programmer.
The usual operation sequence is:
1.) Start the programmer (and, if required, connect a 13V-power supply)
2.) If not done before, select the proper device type
3.) Load a HEX-file with "File..Load"
4.) Insert a PIC in your programmer
5.) Program the PIC with "Device..Program"
You don't have to erase the PIC before programming, the software will do
that automatically.
It is important to select the proper device type *before* loading the
HEX file, because if you try to load a 2kWord program into a 512Word
buffer, something may be truncated (you'll get an error message).
The help system (in html format) offers a solution if you want to program
PICs which are not listed in the combo box on the "device" sheet.
The software will always show you the success or errors of all actions.
If there is an error message in the status line at the bottom of the
programmer's window, change to the "message"-tab where you see a complete
list of all errors (with more infos about the cause of the error, etc).
Also the configuration word and the initial DATA EEPROM will be programmed,
if the HEX-file you loaded contains data in the equivalent memory ranges.
For more information on this, you should look into Microchip's data sheets.
Customizing WinPic for special applications
----------------------------------------------
What you will not find in the manual: It is possible to turn off
some parts of WinPic's user interface. You can use this if your
'customer' shall not use all options. For this purpose, you must
supply your own SETTINGS.INI (or at least some fragments) with
the WinPic archive. In the segment [PicMain] you must add the
parameter 'Customize' with a text editor, for example:
[PicMain]
Customize=3
The 'customize' value is a bit-combination with the following
meaning (maybe more, look into APPL.H if you have it):
bit 0 : "don't show the interface selection list"
bit 1 : "don't use the internal device list"
bit 2 : "don't allow using the HEX-EDITOR"
bit 3 : "don't allow editing the CONFIG word"
bit 4 : "hide the EDIT menu and all its contents"
bit 5 : "hide the SPECIALS submenu"
Translating the WinPic user interface into other languages
-------------------------------------------------------------
You can translate WinPic's user interface into your own
language if you like. Most strings are read from a lookup-table
which can be loaded from a textfile.
The language used by WinPic can be defined in SETTINGS.INI,
in future revisions it can also be selected from a combo-list
in WinPic. At the moment, only English and German are "built-in"
WinPic. The current language is specified in SETTINGS.INI like this:
[PicMain]
LanguageTestMode=0 (see below)
LanguageFile=translations.txt (definition of optional 'dictionary')
Language=de (ISO 639-1 code for user's language)
To add other languages, you do NOT need to have the
sourcecodes of WinPic - because the language can be read from a
textfile (which is not included in the standard distribution).
If the file 'translations.txt' does not already exist,
you can generate a template for such a textfile with WinPic itself.
From the 'Tools' menu, select 'Specials',
and then 'Dump translation table to file'.
This will produce a file named 'translation_test.txt' in the WinPic
directory, which you can edit and extend with a text editor.
The file will look like this:
:Delete
de:Lschen
:Cut
de:Ausschneiden
(...)
Each line in the file contains exactly one translation.
The first characters in a line define if it's the reference string
(which is searched in the table when translating a string),
and the translations in the following lines.
A colon (:) in the first column indicates a reference string,
which YOU MUST NOT MODIFY otherwise WinPic cannot find the translation
(there a no "string reference numbers" or similar stuff).
One or two lower-case letters followed by a colon indicate the language
of the translation which follows in the text line.
For example,
de:Lschen is the German translation of "Delete".
If you were to add a French translation, you would add a new line
after this (in the same group of translations for "Delete") like this:
:Delete
de:Lschen
fr:Couper
Do this with a few hundred other lines, too ... and if it works,
and its one of the "common" languages listed below, please send me a copy !
The language identifiers use the ISO 639-1 language codes :
en: english (may be abbreviated as e: here)
de: german (may be abbreviated as d: here)
fr: french (may be abbreviated as f: here)
it: italian (may be abbreviated as i: here)
es: spanish (may be abbreviated as s: here)
da: danish
nl: dutch; flemish
pt: portuguese
sv: swedish
To check if all translations are complete, you can activate the
LanguageTestMode by setting this parameter to 1 (one) in SETTINGS.INI.
WinPic will show a list of untranslated strings in that case, and show
the missing strings in the main window.
There are a few special characters in the translation table
which must be treated carefully. These are so-called "format strings"
which are replaced by variables (numbers or strings) during run-time.
Some examples: %d = integer number, %s = placeholder for a string.
The count, sequence, and correct spelling of these numbers is very
important, otherwise WinPic (or, to be precise, the sprintf function)
will crash !
If you are considering to produce a translation into your native
language : Many thanks in advance ! But please contact me before you
start, because only one translator (person) can modify the translation
table at a time - I have no utility to "merge" two translations into
one file. Contact me before you start, to make sure you translate
the very latest version ! (I may be working on an unreleased version
at the moment you read this).
Revision History
-------------------------
Please note: Meanwhile there are a few other programs called "WinPic"
on the web, so if you look for an update of this one search the net
for "WinPic" AND "DL4YHF" (which is the author's amateur radio call).
V2.42, May 2004: Added a small delay between "program" and "verify"
to discharge a capacitor between MCLR and GROUND
(required for certain boards when programming
PIC16F8xxA, but not for PIC16F84 ).
Added support for the JDM-PIC-programmer 2.
V2.41, March 2004: A few minor bugfixes, and
added two interface definition files for the
Bojan Dobaj programmer - thanks Ricardo Teves !
Added support for PIC16F***8A - thanks Mikkel !
V2.4, January 2004: Added support for PIC16F873A(!) .. PIC16F877A
in the file DEVICES.INI. Only tested PIC16F873A .
Also for PIC16F628A(!) which has a different
'bulk erase' algorithm compared to the 16F628 .
V2.3, December 2003: Added support for PIC16F88 (with TWO config words),
and implemented the 'most recent file' list in the
FILE menu.
V2.2, November 2003: Fixed a bug which caused problems with the
manual replacement of the bandgap calibration bits
in a 12F675 .
V2.1, November 2003: Added a test for the DELAY routine.
Added command line option "\v" (verify).
Added the "ID location" tab.
V2.0, September 2003: Added support for PIC16F818. New devices may be
added by the USER now by modifying DEVICES.INI .
V1.9, May 2003: Algorithm for PIC16F73..77 modified, but not tested.
Plans for an optional "production grade" programmer
which can VERIFY at different supply voltages.
V1.8, February 2003: Interfaces on the serial port ( ... ...
近期下载者:
相关文件:
收藏者: