DIY编程器网
标题: MULTI CHIP PROGRAMMER--pic编程器制作说明,该看看 [打印本页]
作者: liyf 时间: 2011-11-4 07:28
标题: MULTI CHIP PROGRAMMER--pic编程器制作说明,该看看
This project consists of 3 Pages plus a separate feature on Page 4, using Disasm Program:
Page 1 - Introduction (this page)
Page 2 - Construction
Page 3 - Using the Multi-Chip Programmer - Burning PIC16F628 chips
Page 4 - Disassembling a .hex File This is a separate feature using: Disasm Program to
convert a .hex file into a .asm file.In a nutshell, here is what you do:
1. Read the Multi-Chip Programmer article. It needs a program called IC_Prog to carry out the burning operation.
2. Buy and build the Multi-Chip Programmer project.
3. Download IC_Prog.zip file from our website to get the software. 4. Read the notes on Page 3 by Jason Williams, on configuring your computer to run the software. | 5. Program a PIC chip, using the IC_Prog software and Multi-Chip Programmer hardware. You will need a .hex file to do this. For a list of .hex files click: 5x7hexFiles.zip - but you can use any file.
To create a .hex file from a program you have written yourself, you will need MPASM.
If you want to convert a .hex file into readable lines of code,
Page 4 has a disassembly program Disasm. |
This project is designed to program the 8-pin PIC12c508A and 18pin PIC16F84 microcontroller chips to support the projects we have designed, however it will also program a number of other 8-pin & 18-pin microcontrollers and the full list can be seen when using IC-Prog.
We could have called this project a "free programmer" to attract your attention, but let's be fair, at the cost of a few dollars for the PC board plus a few on-board components and a lead, you can call it a very low-cost programmer. With free software the project will not only be the cheapest on the market, but it comes with full documentation to get the absolute beginner into programming.
There is only one point I must mention. The Multi-Chip Programmer does not work with all computers and all operating systems. Some computers do not have sufficient voltage-swing to generate the 13-14v required to put the chip into program-mode. Lap-top computers come into this category. The only problem we have had is getting the programmer to work with “XP.” To get it to operate with XP: select in the HARDWARE menu -> Interface Choose: Windows API. This may solve the problem.
Why put it on the web?
The web is expanding at a phenomenal rate. By putting our projects on the web, we are delivering them to the whole world. We have priced each kit to be less than buying the components separately. Once you work-out the cost of producing the board yourself and buying the parts from different suppliers, you will agree; it's cheaper to send for a kit. We send everything out the same day and no matter where you live in the world, air-mail delivery is only a long-distance flight away. Buying is so simple. Simply send us an email to say you want to buy a particular kit (we have over 200 kits) and we will email you with the total cost including postage. Click if you want to buy the Multi-Chip Programmer kit.
THE MULTI CHIP PROGRAMMER
This is a very simple project. It is a Multi-Chip Programmer that will burn a wide range of PIC chips.
The Basic Electronics course has concentrated on the PIC12c508A and PIC16F84 chips as these cover the "beginners" end of the market.
The advantages of these chips has been fully documented in our articles and now we come to the need to burn them.
Programming or Burning these chips is very simple and any project you design can include a 4-pin socket so that the chip can be programmed "on-the-board." The 5x7 Display project is a typical example. It has a "burning socket" on-board for a PIC16F84 chip. The only thing you have to remember when designing a project, is to keep pins 12 and 13 lightly-loaded so they can be used for the programming operation. If these lines are used as outputs, the programming operation must be able to take them HIGH and LOW. Refer to the 5x7 Display project to see how we have designed the programmer section.
The '508A has not been catered for in the 5x7 Display project and so you need the Multi-Chip Programmer to burn this chip and any others you want to program. HOW THE CIRCUIT WORKS
The first thing you have to remember . . . . this is not a normal circuit. A normal circuit has a positive voltage connected to it and thus it has a supply rail and a ground rail - the ground rail is called the zero volt rail.
In the Multi-Chip Programmer circuit, the supply voltage for the chip comes from the RS-232 feature of the serial port. Some of the lines making up the RS-232 are capable of rising to a positive voltage (about 8 to 12v) and falling to a negative voltage (about -8v to -12v). There are also lines that fluctuate from 0v to +5v. If all computers had a line that fluctuated between +12v and -12v, the programmer circuit would be very simple. But unfortunately some computers fluctuate between +8v and -8v. To make a circuit that works on all ports was a challenge. The circuit we have used was designed by JDM (http://www.jdm.homepage.dk/) and full credit is given to him.
The chip requires a voltage of 13v on the MCLR pin (between12v and 14v) to tell the chip to go into program mode. The chip does not require any current on this line, just a voltage so the program mode can be invoked (begin).
If one of the lines from the computer goes to +8v, and another goes to -8v, they can be combined together to get a total of about 16v. This is more than enough to create the necessary 13v.
This is the basis of how the circuit works and the reason for the diodes and zeners.
But it's more complicated than that. The voltage-delivering lines are also the lines that provide the signals to and from the chip during programming and reading modes. So, the circuit becomes quite complex. The lines delivering the signals are also the lines that charge the electro's.
To understand how it works, we need to cover some basic theory.
If a line starts at 0v and moves negative to say -5v, it will charge an electrolytic and the electrolytic will have 5v across it.
The circuit in Fig: 1 shows this: The next new point is how to use a transistor in a completely different mode to that covered in our Basic Electronics Course.
Normally, a transistor in emitter-follower mode is connected with the collector to the supply rail and the base is raised and lowered from 0v to supply voltage. The voltage on the emitter is 0.7v lower than the base, but it has a higher current capability than that delivered by the base. It's quite simple, the current comes from the collector!
The normal emitter-follower circuit is shown in Fig: 2. (Also called common collector)
But, suppose the transistor is connected with a LED on the emitter AND collector as shown in Fig: 3. This time, the current for the LED cannot come from the supply rail (via the collector) and thus the base must supply the current. It is easy to see that the lower LED is turned on via the current from the base. But the interesting feature is the LED in the collector circuit will also come on with the same brightness as the LED in the emitter circuit.
The base-collector junction is reverse biased and will perform exactly like the base-emitter junction. The base must supply the current for both LEDs
This is how the first transistor in the circuit is operating. The base is supplying current to charge the 10u electrolytic and the 8v2 zener is allowing the 10u electrolytic to charge to 8.2v higher than the 22u electrolytic and supplying a voltage-reference for the MCLR pin. The 10u electrolytic does not deliver its energy to the MCLR pin, no current flows between the emitter and collector leads of the transistor in this arrangement.
With this basic theory understood, you will be able to see how the Multi Chip Programmer works, but before we get to the full circuit, Fig: 4 shows how the voltages on the chip are developed with reference to the GND line.
Fig: 5 shows how the chip actually "sees" these voltages. You simply add 5v to each of the voltages to make Vss = 0v. This makes Vdd = 5v and the programming voltage = 13v.
Fig: 6 shows the complete circuit diagram: The 2k2 resistor is fitted inside the 9 pin plug. This gives the project 4 communication lines and thus 4-core telephone cable can be used.
The transistor on the Data line also operates in an unusual way. It functions in a bi-directional mode, since the data must be transmitted into the chip when burning and from the chip when reading.
Fig: 7 shows how the transistor is actually in an emitter-follower arrangement with the data line of the chip on the emitter.
When delivering data to the chip, the DTR line goes HIGH and the transistor is in emitter-follower mode. The input of the chip will be high-impedance and the emitter voltage will be HIGH, being pulled up by the 10k resistor and fed by the voltage from the DTR line.
When the DTR line goes LOW, the collector of the transistor will go LOW, because the only voltage supplying the circuit comes from the base. Since the resistance on the base is 10k, and the resistance between collector and ground is 2k2, the voltage division will produce about 1v on the collector. Since the collector voltage goes LOW, the emitter voltage will also go LOW as the transistor is in exactly the same arrangement as shown in fig: 3, above.
Thus, by taking the DTR line HIGH-LOW, the data line of the chip will be taken HIGH-LOW.
When the transistor is being read, the data appears on the Data line. This time the DTR line is kept HIGH and when the data line of the chip goes LOW, current is drawn through the collector lead. This current flows through the 2k2 resistor and produces a voltage drop across it. This voltage drop is enough to bring the collector voltage down to about 1v or less and the CTS line reads this as a LOW.
When the data line of the chip goes HIGH, current does not flow through the 2k2 resistor and CTS reads the line as a HIGH.
There are three more signal diodes in the circuit (the 4th diode has been explained as it charges the 22u when RTS is LOW).
The diode on the MCLR line takes MCLR LOW when TxD goes LOW, while the other diode on this line prevents the voltage on TxD from going below 0v.
The two diodes on the RTS line prevent the line going above 5v or below 0v.
Click on the diagram below to see an animation of the chip being set up for programming and data being clocked in. This is only a simple representation as the chip looks for 6 initial clock cycles and depending on the data it receives during these 6 cycles, the chip will go into one of 9 different modes. For instance, it can go into a mode called Load Configuration where the next 16 clock cycles will load the Configuration Memory with the necessary data bits.
The MCLR line must then be taken LOW and HIGH again and the chip is ready to receive a different loading mode. One of these modes is Load Data for Program Memory and after 6 clock cycles the next set of 16 cycles will consist of a zero start-bit, 14 bits of data and a zero stop bit.
As you can see, it takes a lot of cycles to get each byte of data into the chip, but this is always the case when information is being serial-fed.
Once you know how the circuit works, you will feel much more comfortable about working on it and/or modifying its operation.
At the moment we don't have any access to the software so you will not be in a position to modify the operation of the program. But since it works perfectly, I don't see any need for modification.
作者: liyf 时间: 2011-11-4 07:29
CONSTRUCTION
All the components fit on the single-sided board and the project is connected via a 4-pin US telephone plug to the serial port of a computer. It gets all its voltages from this port as well as the programming signals.
The diagram below shows the layout of the board. The three jumper links should be fitted first and then the diodes. Make sure you can identify the 4 signal diodes and the 5v1 and 8v2 zeners. The band or "line" on the diodes is the cathode end and this is shown by a line on the overlay. The only other components requiring careful fitting are the LEDs and transistors. Don't fit them too close or leave them too high off the board. A gap of about 3mm to 5mm looks the most professional. Solder them quickly to prevent heat running up the leads and damaging the semiconductor junction. The electrolytics are identified on the body of the component with a black stripe while the positive lead is identified on the board.
No ZIF (zero insertion force) socket is provided in the kit because they are very expensive and not necessary if you put the chip you are programming in an additional socket. This will make the PIC chip easy to fit and remove from any socket and keep costs down.
The cut-out on the end of the socket identifies pin 1 and the diagram below shows how to fit different types of 8-pin chips to the programmer.
The last components are the resistors and socket and the board is ready.
The next thing is the assembly of the serial cable.
THE SERIAL CABLE
The Multi-Chip Programmer is connected to a computer via a serial cable. The components to make this cable are included in the kit.
You have to be careful when soldering the 4 wires to the pins of the 9-pin D-plug to make sure they are soldered to the correct places. It's very easy to make a mistake. A 4-pin US plug (telephone plug) is supplied clamped to the cable and it clicks into the socket on the PC board. Attach it to the board and bare the free end to see how the 4-core cable has been connected. From this information, you should determine how the leads will be connected to the 9-pin plug. Select the appropriate diagram from the layout below and wire the conductors to the plug, including the 2k2 resistor. This should be done neatly as it has to fit inside the backshell. Screw the 9-pin D-plug together and you are ready to program a chip. 9 PIN D-SUB MALE at the Computer. Pin | Name | I/O | Description |
1 | CD | I | Carrier Detect |
2 | RxD | I | Receive Data |
3 | TxD | O | Transmit Data |
4 | DTR | O | Data Terminal Ready |
5 | GND | - | System Ground |
6 | DSR | I | Data Set Ready |
7 | RTS | O | Request to Send |
8 | CTS | I | Clear to Send |
9 | RI | I | Ring Indicator |
Modification: Use 470R in the back-shell of the serial cable.
The circuit contains three indicator LEDs:
The 5v Power LED shows when 5v is present on the circuit.
The 13v Programming LED. At the commencement of the "burning" process, the chip will be put in "Programming Mode" by applying 13v to pin 4.
The Clock LED. During the "burning process" the "Clock LED" will illuminate to show data entering the chip.
Multi-Chip
Programmer
PARTS LIST
Cost $13.35 USD
(incl: all parts, PCB, cable, and postage) |
|
2 - 470R 1/4 watt resistors
1 - 4k7 1/4 watt resistor
1 - 10k " "
1 - 10u 16v electrolytic
1 - 22u 16v electrolytic
1 - 3mm Red LED
1 - 3mm Green LED
1 - 3mm Yellow LED
4 - 1N 4148 signal diodes
1 - 5v1 zener 400mW
1 - 8v2 zener 400mW
2 - BC 547 transistors or similar
1 - 18pin IC socket
1 - 30cm fine tinned copper wire
1 - 30cm very fine solder
1 - 4-pin US telephone socket (low profile)
(RJ12 6P4C PCB socket)
1 - Multi-Chip Programmer PC board
Kits can beobtained for $13.35 (posted) by clicking HERE. |
|
Serial Cable: 1 - 2k2 resistor or 470R
1 - 4-pin US plug on 6ft 4-core cable
( RJ12 6P4C crimp plug)
1 - 9 pin D-type socket
1 - 9 pin backshell
|
|
作者: liyf 时间: 2011-11-4 07:30
This is the section you have been waiting for. It's the "burning" section.
Burning is also called "Programming" or "Downloading a Program" It's the action of putting a .hex file into a microcontroller.
The things you need are:
- the Multi-Chip Programmer project. See construction HERE.
- an interface cable (the components come with the Multi-Chip Programmer). Click HERE.
- IC-Prog file Download it HERE. (See below first)
- a computer. PROGRAMMING/BURNING
STARTS HERE
1. Build the Multi-Chip Programmer Project and insert a PIC chip. The programmer does not have a zif socket and does not need one. We get around the problem in a very simple way. The chip you are programming is firstly fitted to a standard 18-pin IC socket and it is moved from programmer to project in this socket. This makes it easy to fit and remove. All you have to do is push the chip slightly sideways and it comes out of the socket without any effort. This saves you stabbing your fingers on the pins.
Before the programmer “burns” a chip, it will automatically erase any program in the chip, so make sure the chip is available for re-programming.
2. To get the programmer to work you need IC-Prog.
Unzip the program and create a shortcut to your desktop.
3. You will need a .hex file for the programming operation. It can be any .hex file and our website has over 100 .hex files for our projects. Choose any file.
(To make full use of a .hex file, you will need the project)
5x7 .hex files See the project: 5x7 Project
Robot Beacon .hex file for PIC16F84A See the project: Robot Beacon
PIC LAB-1 .hex files See the project: PIC LAB-1
4. Open IC-Prog from your desktop.
Select PIC16F84A as the processor and untick WDT, PWRT and CP. Select Oscillator: RC.
click on the file ICON at the top left of the screen.
A window will open up and show .hex files (if not, find a folder with the files).
Click on the file you need and click on OPEN.
The .hex values will be loaded into the window.
Click on the icon with the lightening arrow and the chip will be “burnt.”
The programmer is capable of burning a number of different types of chips - both 8-pin and 18-pin types. The 18-pin chips fit into the socket as shown in diagram 1 above, while the 8-pin chips fit into the socket according to the type of chip. For PIC12c5XX chips, pin 1 aligns with pin 1 of the socket. For PIC24cXX chips, pin 1 of the chip aligns with pin 5 of the socket as shown in the third diagram. You will notice the chip is NOT at the end of the socket and you have to be careful when inserting it.
If you do not have a .hex file, you will have to create one using MPASM.
Unzip the file and create a shortcut to your desktop.
Open MPASM v2.07 and tick Radix default, untick case sensitive, tick warning level default, tick macro expansion default, tick HEX output default, tick generated files: Error file and List file. Processor 16F84A, tab size 8.
In the browse window, find the file you want to assemble. It must have an extension .asm Put the location of the file into the window. Click the button ASSEMBLE.
MPASM will take the .asm file and produce a .lst file and .hex file. The .hex is the file you need.
We have provided a number of projects on the website and they explain everything you need to know to get a project working.
The programmer is capable of burning a number of different types of chips. These come in 8-pin and 18-pin. The 18-pin chips fit into the socket as shown in diagram 1 above, while the 8-pin chips fit into the socket according to the type of chip. For PIC12c5XX chips, pin 1 aligns with pin 1 of the socket. For PIC24cXX chips, pin 1 of the chip aligns with pin 5 of the socket as shown in the third diagram. You will notice the chip is NOT at the end of the socket and you have to be careful when inserting it.
The following has been provided by a constructor: Jason Williams.
He has built the Multi Chip Programmer and 5x7 Display and has sent the following:
You will need the following files: directio.zip (35KB) loaddrv.zip (28KB)
I have solved the burning bugs (with the Multi-Chip Programmer AND the 5x7 Display) and it appears the problems were to do with running Windows XP and using the "Windows API" option in IC-Prog instead of "Direct IO".
By running a cool utility called "totalio.sys," (in directio.zip) all applications get full control of the I/O ports and thus IC-Prog works perfectly under Windows XP and Windows 2000, since the IC-Prog driver that is available doesn't work for XP (at least it doesn't work for me).
How To Use IC-Prog with Widows XP/NT/2000:
You can download a driver for IC-Prog from their website - it is called "icprog.sys" but it is really just a renamed driver originally called "giveio.sys". This utility was written by Dale Roberts as one of a set of utilities to give applications under NT more control over the I/O ports. Clicking on the "Enable NT/2000/XP Driver" check box in the settings will try to install this "icprog.sys". Under XP (on my box anyway), it installs but can't be started. There is probably some black magic regarding security permissions when creating symbolic links.
The purpose of this driver is to give an application access to the I/O port but only through the driver. This is because XP, like 2000 and NT, doesn't let you have full access to I/O ports like in 95/98/MS-DOS.
However, there is another way. By using another utility written by Dale Roberts, called "totalio.sys", ALL applications can have full control over the I/O ports, and not through a driver's interface. This means you can let IC-Prog use "Direct I/O" instead of "Windows API (in the "Interface" group of hardware settings) and ignore the "Enable NT/2000/XP Driver" option completely. "totalio.sys" (in theory) should also let any programs which control ports directly to work under XP.
Installing "totalio.sys":
Extract "totalio.sys" from the "directio.zip" file to "C:\Windows\system32\drivers" directory (or equivalent). Extract "loaddrv.exe" from the "loaddrv.zip" file and run it.
In the edit box, type in the full path to "totalio.sys" eg. "C:\windows\system32\drivers\totalio.sys"
Click "Install".
Click "Start".
Click "OK".
The driver should now be running. You can check this by running "Start->Programs->
Accessories->System Tools->System Information", then clicking on the tree item "System Information->Software Environment->Drivers" and looking for "totalio" in the view on the right.
To start or stop the driver after it has been installed, you could use the "loaddrv.exe" program, or use the following commands in a command prompt:
"net start totalio" to start the driver.
"net stop totalio" to stop the driver.
You could put this in a batch file in the IC-Prog directory, eg.
@echo off
net start totalio
icprog
net stop totalio
You can configure the driver to run automatically on startup, but I wouldn't recommend it. You can do this via Device Manager, select "View->Show hidden devices" and look under "Non-Plug and Play Drivers" to find "totalio", look at its properties, and change the startup type from "Demand" to "Automatic" (NOT "Boot" or "System") in the "Driver" tab.
The batch file concept is safest, as you only run the driver when you need to and unload it when you don't need it.
How to configure IC-Prog:
Goto: Settings->Options->Misc. Tab
Uncheck "Enable NT/2000/XP Driver"
Uncheck "Enable Vcc control for JDM" (the help file says it is experimental and not to use it).
Select "Realtime" in the "Process Priority" group. (in theory, this will prevent other CPU-intensive applications from interrupting your burn process).
Goto: Settings->Hardware
Select "JDM Programmer" from "Programmer" dropdown list.
Select "Direct I/O" from "Interface" group.
Uncheck all the check boxes under "Communication".
Select correct COM port.
Move the "I/O Delay" slider to 10. (other values gave errors for me, but this value could be specific to the PC's CPU speed - tweak until you get no read/write errors).
Why "Windows API" doesn't work:
My hypothesis is that using the Windows API introduces slight delays in setting the serial control lines, such that occasionally the data pulses aren't co-ordinated with the clock pulses during a burn. Whole 14-bit words don't get written, depending on the circuit the word will be all 0 bits or all 1 bits depending on the state of the chip's data line. In my experience using the Multi-chip programmer, it meant 5% of the words were burned 3FFF, but not consistently, ie. the errors moved around each burn. Read errors were rare (multiple reads returning different data) but they also experienced the occasional incorrect word of 3FFF or just a few bits gone to 1.
These problems all magically disappear once you use "Direct I/O".
|
Settings to use IC-Prog with Windows XP:
- Open a browser and select the file ic-prog.exe
- Press right button on your mouse
- Go to Propertties
- Go to Compatibility menu
- Set compatibilty mode as Windows 2000 or Windows 98 / Win ME
- Press Apply icon
- Press Accept icon
You need to copy icprog.sys into the SAME directory as icprog.exe. Then you can enter in the ic-prog software, go to Settings, Options and choose the Misc. page. There you can enable the "NT/2000 Driver" it will then be installed.
Latest PC board v628
The latest version of the Multi Chip Programmer (v628) will now program a PIC16F628 via "normal" mode (12-14v on pin 4).
Mod:
To convert previous versions of Multi-Chip Programmer PCB's:
Cut the track connecting pin 10 to 5v rail.
Fit a 10k resistor between pin 10 and 0v rail. (see the layout below)
When a chip is to be programmed for the first time, either the low voltage or high voltage method can be used.
When a PIC16F628 is programmed in the "high voltage" mode, the chip can be re-programmed in the high-voltage mode or you can set the LVP bit to "0" so that the chip can be re-programmed "in-circuit" via the LVP mode. The Low Voltage Programming-mode allows the chip to be re-programmed by applying 5v on pin 10 (instead of 12-14v on pin 4).
The Multi Chip Programmer "burns" a PIC16F628 in the "high voltage" ONLY. You can re-burn the chip "in-circuit" or in the Multi Chip Programmer, depending on the setting of LVP. The chip comes with LVP set to "1." See below for details on this. When burning a chip for the first time, an instruction in your program sets LVP to "0" or "1." If it is set to "1" you can use either re-programming method, but you lose RB4 as an in-out pin.
PROGRAMMING THE PIC16F628
This chip has two programming modes:
Normal Mode: 12-14v on Pin 4
Low Voltage Mode: (LVP) 5v on pin 10.
The PIC16F628 has a Low Voltage Programming-mode (LVP) for in-circuit programming. In this mode, the chip can be programmed with 5v on the programming pin (pin 10) instead of 12-14v on Pin 4.
Before deciding on the way you will program the chip, you need to know some of the differences and limitations.
The PIC16F628 chip is supplied with the LVP bit as "1."
When the LVP bit is "1," RB4/PGM (pin 10) is dedicated to the programming function and is not available as in-out pin RB4.
The chip will enter programming mode when a HIGH (5v) is placed on RB4/PGM (pin 10).
This makes the chip "in-circuit" programmable and re-programmable "in-circuit."
If you don't want the "in-circuit programmable" feature, LVP bit must be "0." To make LVP bit "0," the chip must be programmed via "Normal Mode," using 12-14v on Pin 4. The LVP bit cannot be changed when programming "in-circuit."
When programming via "Normal Mode," an instruction is available to change the value of LVP. This instruction is covered in our PIC Programming course, Page 33.
A Recap:
If you program via the "Normal Mode" (12 - 14v to "activate" the chip - to put it into "program mode"), you can use all the features of the chip. (Remember RA5 is input-only, so "Port A" is not a "complete port.")
If you program via "Low Voltage Mode," output line RB4 (pin 10) is not available as you are reserving the pin for re-programming via LVP.
This is very inconvenient as "Port B" is normally used as a complete 8-line output to drive displays etc. To have one line missing from the port is like buying a book with 15 pages missing! Port A is already an incomplete Port, with RA5 as input-only. It would have been much more convenient to put LVP pin on port A and leave Port B complete! Such are the limitations of life!
If you program a chip for the first time: "normally," you can re-program it "in-circuit" (via the 5v feature) or re-program it via the "normal" method.
If you program a chip for the first time: "in circuit," you can regain the RB4 as an in-out line by re-programming it "normally." You cannot regain RB4 as an in-out line by re-programming it "in-circuit."
I hope this covers all the possibilities.
For more information about writing a program for the PIC16F628, see our PIC Programming course, Page 33.
PROGRAMMING THE PIC16F628A
The PIC16F628A has some different features to the PIC16F628 and cannot be programmed on the old version of IC PROG (version v105c). The new version is called (v105c-a)
IC PROG.
A .pdf file outlining the differences can be found
HERE.
This completes the Multi-Chip Programmer project, but it's just the beginning of PIC Programming.
There are so many places you can go.
See our other projects in the "FREE Projects" section.
作者: liyf 时间: 2011-11-4 07:31
This section does not use the Multi-Chip Programmer but it is in this section as it is a part of the process of programming. If you take a .hex program from a book or magazine, or read a program from a chip, the block of digits is almost impossible to read. Sometimes it is important to know if the numbers refer to a particular program and you may wish to know if it is the latest version. You may also need to make a modification.
The program in this article (the program is called Disasm) will take a .hex file from a PIC16F84 and convert it back into a layout very similar to the set of instructions in an .asm file. The only difference is the absence of annotations and labels.
The program is called Disasm (for Dis-assembly program) and the files you need to get this program up-and-running, are contained in 84disasm.zip
The files are:
About.frm 3k FRM File
Cmdialog.vbx 19k VBX File
Disasm.exe 15k Application File This is the file you use (see below).
Disasm.frm 10k FRM File
Disasm.mak 1k MAK File
Disasm.txt 1k Text Document
To put these files on your computer, create a new Folder (go to Explore) and call it: Disassembler
To download the above 6 files in a .zip file, click HERE
Disasm requires an Application Extension File: Vbrun300.dll You may already have it on your computer. If not, to download a 226k .zip file Vbrun300.zip click HERE
Unzip the files into the Disassembler folder.
Two files are needed in C:\Windows\System. Move Cmdialog.vbx and Vbrun300.dll into C:\Windows\System
Installation is now complete. USING DISASM
Disasm will disassemble your .hex files. Firstly you will need a .hex file. Create a new folder and call it: 5x7 Display Files.
To download all the .hex files for the 5x7 Display Project, click HERE.
Unzip them into 5x7 Display Files folder.
To make it easy, you can put them onto a disk and access them in drive A as 84 Disasm only sees the first 8 letters of each name and this is very difficult to follow!
You will need to unzip 84disasm.zip to get DISASM.EXE
When you access Disasm on the "click HERE" below, you are accessing your own computer , so make sure the folder is in "C." You are now ready to use Disasm.
To access Disasm, click HERE.
To run Disasm, double-click on the icon: | |
and a window will appear. |
Click on File. Click on Open. Double-click on the open folder: c:\ The folders on drive C will appear. Move down the list until 5x7dis~1 appears. Double-click on 5x7dis~1. The .hex files in this folder will appear in the window. Double-click on the file you want to disassemble. It will disassemble immediately. You can open two or more .hex windows (Disasm windows) at the same time to compare listings.
To save a disassembled file you MUST rename the extension to .asm, otherwise you will LOSE the original .hex listing.
To save a file, click on File. Click on Save as: Click on the highlighted file in the address window to de-highlight it. Change the extension to .asm Click ok.
If you are working on a project, you must keep a back-up copy of your program on a floppy, just in case something goes wrong. It is very difficult to re-build something that is lost, especially if it is a written piece of work.
作者: hdzl 时间: 2011-11-4 13:19
很详细。可惜就是26个字母和10个数字组成的。看着费劲!
作者: 古道热肠 时间: 2011-11-4 16:01
风格比较简洁。
作者: liyf 时间: 2011-11-4 18:34
看着不错就发出来了,有点考验人了
作者: zydl123 时间: 2011-11-7 01:31
这个软件没有中文选项,我有中文的
作者: liyf 时间: 2011-11-7 07:18
ic-prog106C下载线编程软件,有设置教程的,中文的大多数人喜欢
作者: robter 时间: 2013-2-2 09:09
很好,向楼主学习
欢迎光临 DIY编程器网 (http://diybcq.com./) |
Powered by Discuz! X3.2 |