Home |
Products |
Prices |
Directory |
Order |
Contact |
New |
Books |
Files |
Links |
Other
Bottom_of_Page
Have a look at the DT001 SimmStick Development platform for the updated version of this programmer.
PIC16C84 Advantages:
How many times can I re-program an 84?
PIC84PGM Programmer Hardware Assembly Instructions:
Walking Led Programs in MicroChip and Parallax Code:
Walking Led Program. Updated for later version MPASM Code:
84 Data example: Setting the 84 data, ID, and fuses:
How Many 7407's?:
Some sample code using the output of the PIC Basic
Compiler:
Quick-PIC One page Beginners Summary:
Download wl84.hex
test file provided for a trial burn. (Walking LED).
View pgm84ovl.gif Overlay in GIF
Viewable format.
View pgm84cct.gif Full circuit in gif
format.
Download pgm84cct.zip
14,669 bytes. Circuit in HP Laser Jet format.
Download pgm84ovl.zip
26,720 bytes. Overlay in HP Laser Jet format.
Why is my Programmer better than theirs?
I got my first production PIC84PGM programmer boards on the 14th of Feb-95, and assembled one. It worked fine, no bugs, no problems. What have I done wrong? I usually have to find the "Gotcha!".
You don't have to spend $275 (AUS) on a PICSTART kit to get into PIC's. The new 84 series has an EEPROM right on board. My PIC84PGM programmer board takes advantage of this by using minimal hardware and a standard IBM PC printer port to program this chip in a socket on the programmer board, or "in-circuit" on a target system.
This chip can be re-programmed around a thousand times, has data retention longer than 40 years, is very cost effective, and prices continue to drop as they become more popular. Being a member of the PIC family, it has the advantages of low power, clock speeds up to 10Mhz (for the 84 only, others are faster), the same CPU instruction set, and 13 I/O lines.
I have put together an 84 Data Pack to overcome the problems of getting manuals and information from chip importers. They don't take too kindly to hobbyists, students, and smaller customers, however this may change. This is detailed elsewhere in these files.
A Zero Insertion Force (ZIF) socket can be used for programming a run of 84's if required, however it isn't essential. The ZIF sockets are expensive, and the 18 pin version is hard to get. An 18 pin "Machine Pin" type socket could be substituted for hobbyist use.
The normal method of programming an 84 with my board, is to use something like my PIGMY board as a target system. The 84 stays in the 18 pin socket on the PIGMY board at all times during programming. You simply flick your 4PDT switch to program, program the device in 2-10 seconds, flick the switch to Run, and the 84 will run your program.
It's a little like my ZLOAD Z80 development system. Almost instant download, via a parallel printer port, and no waiting to erase EPROM's between downloads. The burn, crash, erase cycle is removed. The PICSTART kit will program 84's, but it doesn't offer the "in-circuit" advantages.
This is equivalent to the Parallax 16C5x downloader facilities. No, I don't mean my board is the same as the Parallax 16C5x downloader, my board is to 84's, what the above mentioned Parallax board is to 16C5x's. It allows you to download and run a program in the target system.
If you wish to SIMulate an 84 program for de-bugging purposes, the MicroChip SIMulator will do this for you on a PC. All of the MicroChip files including the MPALC and MPASM Assemblers are on the PIC Disk No#1 that comes with my PIC84PGM board.
Just to point out one or two things, it can run on a plug pack (9-12V AC/DC) and a standard 9 V battery, or two batteries, or a plug pack at 15 to 25 volts. This means that you could burn a chip using a Notebook computer with a battery powered PIC84PGM up a gumtree, down a man-hole, or any inconvenient spot where power is a problem, and isn't that one reason why a lot of you are looking at PIC's.
I designed and produced my board in Feb-95. It's still the only Programmer
that supports a LOAD/RUN Switch on board for instant program development.
Back to The Table of Contents.
How many times can I re-program an 84?
This is a little experiment I conducted in April-95 to see how many times I could re-program a PIC16C84/04/P. The messages were posted on the MicroChip BBS.
Date: Saturday, April 8, 1995 4:55am Forum: PIC16CXX From: Don Mckenzie Msg#: 79526 To: ** ALL ** Re: To Spade a PIC... How do you neutralize a PIC16C84? Stick it in a programmer for a few hours and watch it fry! Maybe... I got hold of the 84 that I have been using day after day for development work, the one I have programmed maybe 100 to 150 times already, and decided to see how far I could push it. I made this decision after it had been pointed out to me by several people that the 1Mb re-program figure in the data sheets related to EEPROM Data memory, not Program memory. I had read the specs incorrectly. I suspect others have done this too. I can't be the only one to interpret a Data manual incorrectly. A further search found a minimum figure of 100 and a typical figure of 1000 endurance cycles apply. OK, I'm about 999K burns short of what I thought. I am really PPPeeved now. Do I program it 999 times for my development, then get rid of it by sticking it in a customers final application? I put my .EXE programmer file in a Basic X=X+1 type loop and waited for the part to fail. I should add the odd 100 to 150 burns to this figure which will give me a reasonable guesstimation of the endurance count of this part. When I had reached around the 1000 total burn point, I switched from the program mode to run mode on my in-circuit burner, and tested my application which is a 2 line by 16 chr LCD in 8 bit mode, a 16 button keypad and a Piezo Transducer. This uses up lots of I/O lines and all seemed to work fine. But what had I proven? The I/O pins seem stable enough. Has anybody else had a play around with this? My X=X+1 count still continues as I write this. Will keep you posted! Don...
Date: Saturday, April 8, 1995 6:23pm Forum: PIC16CXX From: Minkey Msg#: 79591 To: Don Mckenzie Re: To Spade a PIC (2 replies) Don, sounds intriguing - keep us posted. In actual fact, you've already reached 2000 erase cycles , if as I suspect, you are using PP.BAS for serial programming. That's because PP.BAS always does a bulk erase first. To sqeeze more cycles from my 16C84's, I've modified PP.BAS to only bulk erase when necessary, i.e. when previously code protected. If you are interested, I can send you the minor mod. to David's excellent programme. Regards, Minkey.
Date: Saturday, April 8, 1995 7:22pm Forum: PIC16CXX From: Don Mckenzie Msg#: 79595 To: Minkey Re: To Spade a PIC (Reply to #79591) MI>Don, sounds intriguing - keep us posted. In actual fact, you've already MI>reached 2000 erase cycles , if as I suspect, you are using PP.BAS for MI>serial programming. That's because PP.BAS always does a bulk erase MI>first. MI> To sqeeze more cycles from my 16C84's, I've modified PP.BAS to MI>only bulk erase when necessary, i.e. when previously code protected. MI>If you are interested, I can send you the minor mod. to David's MI>excellent programme. MI> Regards, Minkey. 2001, 2002, 2003...
Date: Saturday, April 8, 1995 7:34pm Forum: PIC16CXX From: Don Mckenzie Msg#: 79596 To: Minkey Re: To Spade a PIC (Reply to #79591) (2 replies) Hi again Minkey, I am using a variant on PP.BAS, a New Zealand Virtual Basic version based on this code. Yes, it does a bulk erase each time before programming. Of course I would welcome your changes. Perhaps a flag could be set in the VB version menu to control the erase. Do you think I should offer a prize for the nearest correct entry? 2028, 2029, 2030... Don...
Date: Sunday, April 9, 1995 3:23pm Forum: PIC16CXX From: Don Mckenzie Msg#: 79664 To: Don Mckenzie Re: To Spade a PIC (Reply to #79596, Reply to #79591) (1 reply) 7648, 7649, 7650...
Date: Monday, April 10, 1995 4:23am Forum: PIC16CXX From: Don Mckenzie Msg#: 79714 To: Don Mckenzie Re: To Spade a PIC (Reply to #79664, Reply to #79596, Reply to #79591) (1 reply) 11742, 11743, 11744... I'm starting to think I am not doing something correctly. This 84 continues to program... Don...
Date: Monday, April 10, 1995 11:54am Forum: PIC16CXX From: David Tait Msg#: 79764 To: Don Mckenzie Re: To Spade a PIC (Reply to #79714, Reply to #79664, Reply to #79596, Repl*) (1 reply) Hi Don, Try programming the inverse pattern (invert each bit that is) every second iteration. David
Date: Monday, April 10, 1995 11:25pm Forum: PIC16CXX From: Don Mckenzie Msg#: 79880 To: David Tait Re: To Spade a PIC (Reply to #79764, Reply to #79714, Reply to #79664, Repl*) DT>Hi Don, DT>Try programming the inverse pattern (invert each bit that is) every DT>second iteration. Hi David, I felt I was doing something wrong as the burns continued for around 50 hours until I got to 16,578. At this point, I decided that 16C84's are cheaper than hard disks, so I decided to give it away for a while. After a little prompting, I set the code protected, and started burning again. From a new zero count, that is, on top of the 16.5K burns, I logged the following: Burn 1319: Fail Burn 1356: Fail Burn 1372: Fail Burn 2011: Fail That is, is has failed only four times in 2000 burns in code protected mode. This is on top of the original figure. I am still using the same chip for my development. If it fails more often, I'll throw it away. Does this mean that I can program forever using non-protected mode, and 1000+ in protected mode? Either way, I'm happy with the results. I still haven't been able to fully spade this PIC... Don...
Date: Wednesday, April 12, 1995 6:32pm Forum: PIC16CXX From: Minkey Msg#: 80196 To: Don Mckenzie Re: To Spade a PIC (Reply to #79596, Reply to #79591) (1 reply) Don, here goes - PPC.BAS on its way via e-mail. Hope it's useful There are some other minor (commented) changes to rearrange some of the defaults to suit myself. I wish Microchip would bring out some more chips in the 16C8X series, there's still nothing quite like it worldwide. Regards, Minkey.
Date: Wednesday, April 12, 1995 9:33pm Forum: PIC16CXX From: Don Mckenzie Msg#: 80220 To: Minkey Re: To Spade a PIC (Reply to #80196, Reply to #79596, Reply to #79591) Thanks very much. I'll have a good look at it. I agree 110%, no make that 120% about the 16C8x series. Don...
I am still programming the same 84 today. It's the one with the little
spot of liquid paper on the top of it.
Back to The Table of Contents.
Full Hardware assembly instructions for the PIC84PGM Programmer.
PIC84PGM Board Programs 61,62,63,64,65,71,73,74,84,620,621,and 622.
Use the software in {ken}.zip or {nigel}.zip for running this board. David Tait's original code for 7407 configuration also works. These files can be found on my Promo Disk, my Internet Home Page, and MicroChip BBS.
Download NIGEL.ZIP
Download KEN.ZIP
Many other International Authors are now including the "Don McKenzie"
configuration in their software packages. I'm becoming a "Generic"
brand.
This programmer can be built up in one of two ways:
(1) Sit on the table top principle, same as the MicroChip PICStart
programmer with a nice rubber foot in each corner, LED's,
switch, and everything else mounted to the board. Very easy,
very practical.
(2) Built into a protective box with a DB-25 Male at one end, a
flying ribbon cable lead with a 10 pin IDC header at the
other, and the operational hardware fitted to the front cover
of the box.
It's your choice. Me? I'm lazy. I took option (1).
EITHER WAY, THIS IS IMPORTANT....
SOMEWHERE, FIT A DOUBLE POLE SWITCH TO CONTROL TARGET POWER IN.
On my PIGMY target board, I included a +5V isolation header. The idea
was, during programming, remove all power to the target PIC16C84 chip,
and any I/O lines that it could drive. I soon found out that this
wasn't enough, as grounding, and plug-pack polarity caused power
feedback problems.
So forget the +5V Volt isolation method. Switch both legs of the power
to the target 84 board, and any add-on boards.
PROGRAM/RUN
The programming/Run operation goes like this:
(1) PROGRAM MODE: Target Power Off. Switch 1 to Program.
Burn (or Program) Target Device.
(2) RUN MODE: Switch 1 to Run and Target Power On.
Program auto-runs in Target system.
(3) RETURN TO PROGRAM: Target Power Off. Switch 1 to Program.
Burn (or Program) Target Device.
Yes, step (1) and (3) are the same. This simple cycle continues. Ever
driven a manual car? Think of the power switch as the clutch. You
shouldn't change gears without first stepping on the clutch.
This is a good reason for fitting a power LED to the spot provided on
the target PIGMY board.
(Q) Why go to this trouble?
(A) To save putting any strange voltages on the 84 device during the
programming cycle.
Switch one already isolates the PIC84 +5V source, but if you have
relay boards, or what have you, connected to the other legs of the 84
during programming, damage may be caused to the 84.
If you are using the on board 18 pin ZIF (or machine pin) socket, then
the power switch operation doesn't apply. The Program/Run switch also
has no effect on the ZIF socket position.
If you choose (1) of the "How do I build it" options, you may need to
mount a double pole switch in a box, or on a bench. Perhaps a large
brass "Frankenstein Laboratory" like knife switch could be mounted to
a nearby control panel. Option (2), build it in a box principle means
that you can route target power through your box via a double pole
power switch, giving you both switches on the front panel. Clutch and
gears together hey!
HOW DO I RUN IT, CONTINUED.
This article on assembly seems to have started at the wrong end. I
usually start with the board and components, but because of possible
building options, I have started at the "How do I run it" end.
So, I guess I now finish the How do I run it bit as there isn't much
to go. There are 4 LED's. Use a RED for VPP (13V), green for VDD (5V),
and perhaps orange for the other two.
When the device is powered up and the Software is run with the
appropriate command ,the 21V and the +5V power monitor LED's should be
on, and the VPP and VDD LED's off. During the initial "RUN" of the
program, the green LED will switch on for a short time.
Before inserting an 84, you can do a few tests.
Try the Nigel program. Even without the VPP voltage connected, the
program should test your board and report the printer port to be used
in the top right hand corner of the screen. This should say 278, 378
or 3BC. This is the hex value of the printer port detected.
The command line for this is: PICPROG
You should have the Program/Run switch and the target power switch in
the correct positions as detailed above. This socket could be the ZIF
(or Machine pin) socket on board the programmer, or a socket on the
Target board.
If it's the on board socket, you ignore the Program/Run switch, and
power switch operation. If it's the target board, you must remove the
4 test shunts from your target (or PIGMY) board and have the 10 pin
header cable plugged into your target header.
Download wl84.hex test file provided for a trial burn.
The command line for this is: PICPROG WL84.HEX
Put your 84 into the socket and try this command. During the burn
phase, the VPP and VDD LED's will turn on, do a little flashing, then
turn off when the device is programmed.
The program will tell you if the device has been programmed correctly
or not, after verifying the device.
When the device is programmed correctly, set Switch 1 to Run mode, and
the Target power switch on. You should be running your program.
The WL84.HEX file is my walking LED program. This is a simple little
program that blinks LEDs connected to Port B and Port A bits 2 and 3
of an 84.
Port A produces a binary count, and port B walks a LED from LSB to MSB
at 1 second intervals. This is detailed on my Promo Disk.
BOARD ASSEMBLY
Now that you know how to run it, let's assemble it. All of my assembly
instruction will relate only to building option (1) as outlined above.
This is a stand alone, on the bench programmer.
But first, more choices. Oh no!.
CHOICE (1)
E1(a) is a National 74C906 Hex Open Drain Active Pull-down I.C.
E1(b) is one of the following: 7407, 74LS07, or 74HC07.
You only install one chip, either E1(a) or E1(b), not both. These
types of chips may be hard to get at your local electronics retailer,
so I have given you the widest choice possible. As the pinout is
different between the 74C906 and the 74xx07 series, I have provided
positions for both chips. Perhaps you can fit sockets for both
positions just in case a replacement chip is awkward in the future.
After all, sockets are dirt cheap.
Both types of chips are Non-Inverting. The 74C906 is a later version
I.C. however you may only find it at the likes of Farnell's. Most
places are getting out of older 7407 type TTL chips, but few have the
74xx07 variety. They have 04, 05, 08, etc., but always seem to leave a
gap at 07 (and 06 for that matter). That's why I gave an alternative.
The circuit diagram shows the pinouts for these chips.
CHOICE (2)
Several Public Domain programs will run this programmer.
The 16 pin header J2 is used to select between the hardware
differences of these programs.
My preferred programs are now the {ken} and {nigel} programs.
The J2 header links as drawn on the 84 programmer overlay are shown in
the David Tait QBASIC code position, that is each alternative row is
linked. This is the same as the {ken} and {nigel} positions. Both of
these programs are on my Promo disk, my Internet Home Page, and the
MicroChip BBS in the 3rdparty SIG.
To select the R.R. (Russ Reiss) code, remove the 4 links from where
they are, and place them up one position to where they weren't,
right?, no up one.
You can elect to not use a 16 pin header and links, and just solder
wire links in as shown on the overlay, but then you don't get to see
the R.R. version of the software, which includes Read routines as
well.
PARTS LIST
I have used Dick Smith Catalogue numbers (Australia) as a reference
only.
Required Components:
Plug-pack 9 to 12 volts AC or DC at 100ma to 300ma. The current
required to run the PIC84PGM board is very small. This power source,
in conjunction with a 9V Battery is used to generate the +13V VPP
programming voltage.
As an alternative, (Don keeps using that word) you could use a 15 to
25 Volt supply and short out the battery input terminals. As long as
you can generate +13V at Test Point 1. Don't go too high as you may go
over the 7805 specs or heat up the device to destruction. Provision
for a heat sink is made on the board.
1 by PIC84PGM Printed Circuit Board. ;Available from Don
1 by E1 (74C906 or 74xx07. See above).
1 by 7805 +5 Volt regulator in TO-220 case.
1 by LM317T Adjustable Regulator in TO-220 case.
1 by Diode Bridge D1 WO2 or WO4 type. (DSE Cat Z-3304)
1 by Capacitor C1 1000uf Electrolytic @16 Volts. (PCB type mount.)
*** Read NOTE (1) at the end of parts list.
1 by Capacitor C2 .01uf (or .1uf) Ceramic
1 by Capacitor C3 .01uf (or .1uf) Ceramic
1 by Capacitor C4 10uf Electrolytic (PCB mount.) or Tant. @16 V.
1 by Capacitor C5 10uf Electrolytic (PCB mount.) or Tant. @16 V.
1 by Capacitor C6 .01uf (or .1uf) Ceramic
(A total of 6 Caps, 3 of these are polarized.)
1 by Pot. VR1 1K PCB Vertical Mount/Horiz Adj Potentiometer.
1 by Resistor R1 4K7 .25 watt
1 by Resistor R2 1K5 .25 watt
1 by Resistor R3 220 .25 watt
1 by Resistor R4 10K .25 watt
1 by Resistor R5 100K .25 watt
1 by Resistor R6 4K7 .25 watt
1 by Resistor R7 10K .25 watt
1 by Resistor R8 100K .25 watt
1 by Resistor R9 1K8 .25 watt
1 by Resistor R10 10K .25 watt
1 by Resistor R11 10K .25 watt
1 by Resistor R12 330 .25 watt
1 by Resistor R13 10K .25 watt
1 by Resistor R14 10K .25 watt
1 by Resistor R15 10K .25 watt
1 by Resistor R16 10K .25 watt
1 by Resistor R17 10K .25 watt
1 by Resistor R18 1K .25 watt
1 by Resistor R19 1K .25 watt
1 by Resistor R20 100 .25 watt
2 by Transistors Q1 & Q2 BC558 Any PNP Small Signal Amps will do.
1 by DB-25 Male Solder Tail connector.
2 by 5mm Orange LEDs. (+5V and +21V Power monitors)
1 by 5mm Green LED. (+5V VDD monitor)
1 by 5mm Red LED. (+13V VPP monitor)
2 by 14 pin DIP sockets. (for E1(a/b)
2 by 2 Post PCB mount screw terminal. 5mm or 5.08mm centres.
1 by 10 pin IDC type Male header. (2 by 5 pins) J1 Program Header.
1 by 16 pin IDC type Male header. (2 by 8 pins) J2 Config Header.
4 by test links or shunts. (For J2)
2 by 2 pin posts for Link 1 and Link 2. (Shorting links notneeded).
3 by 1 pin posts for Test Points. (Ground, +5V, TP1).
1 by 9V battery clip. (Or 2 if you choose to run a full battery system.
4 by 12mm square (.5") stick on rubber feet. Adds a nice finish.
1 by 4 Pole Double Throw (4PDT) Switch. DSE Cat P-7658 (Program/Run).
or PCB mount equiv. I have designed the board to accept either.
1 by 18 pin ZIF or Machine Pin Socket. (Optional).
NOTE **** If you choose not to use a ZIF socket in the on-board
position, at least make sure you install a reasonable quality machine
pin socket into this position. Instructions can be found on how to fit
a ZIF socket at a later stage in the file "SOCKETS.TXT". 18 pin ZIF
sockets are very hard to find. TEXTOOLS (green) have an 18 pin ZIF,
but the local importers require a minimum order of ten before they
will import them for me.
1 by 6 inches of 10 wire flat ribbon cable with two 10 pin IDC crimp
headers, one crimped each end. No, you can't buy it. You will need to
make this cable up and crimp it yourself. A small vice works nicely
for crimping these IDC connectors. If you can't find headers as small
as 10 pin, you may have to use a larger size. These can often be
easily cut down, or simply placed pin 1 to pin 1 on the existing
headers. I have designed the boards so that this trick (larger crimp
headers) will work without interference to any other component.
I'LL JUST REPEAT THAT. SIX INCHES OF FLAT RIBBON CABLE, NOT THREE FEET.
Three feet of DB-25M to DB-25F printer port cable works fine. Yes,
it's pin for pin, so an off the shelf fully wired cable will do. Or
you can crimp your own. I think a foot to 18 inches will do for this
job.
*** Note (1) If you use a Plug pack and a 9 Volt Battery or two
batteries for power, then C1 can be rated at 16 Volts. If you use a
higher voltage plug pack so that a battery isn't required, you will
have to use a 25V or possibly a 35V rating for capacitor C1. You can
always measure the output voltage of the diode bridge before choosing
this value, however you should jumper a temporary high value, high
voltage Cap at this point, so that you measure the D.C. component. If
unsure, fit a 35V rating capacitor.
CAN WE START NOW DON?
Ok, your have been very patient, but just one more thing before I let
you solder to the board. The last thing you solder to the board will
probably be the DB-25 Male solder tail connector. Before any assembly,
use a file to bevel a small 45 degree angle to the top and bottom of
the board so that this connector will push on to the board pads with
minimal damage to either. Don't install this connector yet.
Novice Explanation...
Several links must be installed on the component side of the board.
The component side of the board is the side that doesn't have the
tracks. It is the blank side of the board.
The other side is the solder side. All soldering is done on the solder
side of the board.
All components are fitted from the component side of the board.
If you have trouble understanding this, you may need assistance to
assemble this board.
I am very happy to assist on the phone if I can, but I can't build or
fault find to any great degree via a phone. I can assemble the board
for you, (at a price) if you wish.
End Of Novice Section...
There are 16 links to be installed. Two of these connect to the DB-25
Male connector. These are not fully drawn on the board overlay and are
installed after this connector is soldered to the board. No, not yet.
Install the other 14 links as shown on the overlay of the PIC84PGM
board.
Solder in your E1(a/b) 14 pin socket(s).
Solder in your 20 Resistors.
Solder in the Transistors Q1 and Q2 (BC558).
Install the J1 and J2 headers, the 3 Test Posts, and four Link 1 and 2
posts.
Solder in all 6 Capacitors.
Watch out for the polarity of C1, C4, and C5. These must be soldered
into the board the correct way around. The positive end of the Caps is
shown on the circuit overlay.
Solder in your 7805 regulator. This can be soldered in allowing for a
bolt and/or heat sink to be fitted at this position. Even if you don't
install a heatsink now, you may need one later on if this supply is
used to provide target power as well. I bolted a heatsink to mine,
soldered it in position, then removed it.
Solder in your LM317T regulator much the same way as the 7805. You
will never need or use a heatsink at this position.
Solder in the Diode Bridge. The Positive leg is shown on the overlay.
Install the four LEDs with the cathodes as shown on the overlay.
(Cathodes to the bottom of the board).
Install the VR1 potentiometer.
Install the POWER-IN, and 9V Battery-In PCB mount screw terminals.
There are 13 pads on the solder side of the board for the DB-25 Male
connector. If you get this wrong, you will have a mess. Make sure you
have a MALE connector. Make sure you line up pin 1 correctly. 13 pins
line up with 13 pads, and if it's a Male connector, you can't go
wrong.
Install the DB-25 Male connector and the two links as follows:
(1) Link the board between the vacant hole near C4 and pin 25
(Ground) of the DB-25 Male.
(2) Link the board between the vacant hole near the Power Led to
pin 14 of the DB-25 connector.
I'll just repeat that again. I had one user ring me from New Zealand
to thank me for my prompt service and good product, however he also poined
out that I hadn't mentioned the jumpers on the component side of the board
that connect to the DB-25 connector and he had problems, so here it is
again...
(1) Link the board between the vacant hole near C4 and pin 25
(Ground) of the DB-25 Male.
(2) Link the board between the vacant hole near the Power Led to
pin 14 of the DB-25 connector.
Make sure that you solder every connection of the DB-25 on the solder
side of the board. This will strengthen the board to connector "mate"
so that plugs can be pushed and pulled without damage to the board or
connectors.
NOTE *** The holes in the board for the 4PDT switch may be "TIGHT" if
you use the Dick Smith type. I have used hole centres suitable for the
PCB mount switches and enlarged them so that either type can be used.
You will need to bend the outer contacts with a sturdy pair of long
nose pliers. Don't be too rough. The leads only need to slip through
the board so that they are flush with the solder side surface.
Solder in your 4 Pole Double Throw Switch. It can be soldered in
either way. It doesn't matter. The Run position will be with the
toggle lever to the left, and the Program position is to the right.
Install E1 into the appropriate socket.
POWER UP AND TESTING:
Before you power up, check with your multi-meter (on ohms) that ground
and +5 volts are not shorted together on the printed circuit board.
_______________________________________________________________
A word to the wise!!!
When you build a device to plug onto the rear end of a computer
system, there is always the possibility of electronic damage to the
computer. Weird ground feed-back from an unknown bench power supply
may be just what is required to blow the interface chips in your
printer card.
If you are like me and run from Notebook computers, you can't go
blowing up internal circuitry, so my advice to you, is to test the
PIC84PGM programmer using two 9 Volt batteries and suitable battery
clips.
This minimizes the possibility of any power supply problems. If you
have your printer port logic included on your motherboard, you can
always use a cheap printer card set to LPT2: for initial testing.
I can't (and won't) be held responsible for your power supply. If you
prove that your programmer works using batteries first, you are well
on the way to a successful project.
_______________________________________________________________
Connect up your power-pack, transformer, or +9 Volt Battery to the
main input terminals. As the circuit has a diode bridge at the input,
it doesn't matter which way around you connect the positive and
negative terminals.
Power up the unit and check that the +5 Volts is there before
proceeding. This is verified by the Power LED being on. Check the
volts with your multi-meter. This should read from about 4.8 to 5.1
Volts. That's what you get on 7805 regulators now days. Usually around
4.82 Volts with no load.
All OK? Connect a 9V battery to the additional terminals on the right
hand edge of the board. Note the positive and negative terminals. It
does matter which way you connect this source. The 21V LED should come
on. If you use a 15 to 25 Volt power source, then the battery
terminals can be linked together.
You can verify this connection by measuring the voltages from ground
to the positive and negative terminals. I have them marked as +12V and
+21V. Yours will be different I'm sure, as long as you are in the 15V
to 25V range for the highest Voltage then you should be able to
generate +13V at the output of the adjustable regulator.
With a screwdriver, short out the two Link 1 posts. The VPP Red LED
should come on. Do the same with the link 2 posts. The VDD Green LED
should come on.
This is what the posts at the Link positions are for. Yes, final
testing before committing the unit to a printer port. These links
control the VPP and VDD voltages. When the LED is on, the voltage is
applied, when the LED is off, the voltage is removed. Transistors Q1
and Q2 control these voltages.
ADJUSTING VR1 FOR +13VOLTS AT TEST POINT 1:
With all power connected, and a short on link 1, (Red LED on) adjust
VR1 with a small screwdriver until the voltage at Test Point 1 (TP1)
reads +13 volts. When the short is removed, the voltage should fall
back to zero volts. You may wish to apply a few drops of nail polish
to "seal" the setting of this potentiometer.
You should now check link 2 operation for changed output at pin 14 of
the on-board ZIF socket, or pin 1 of the 10 pin header J1. This should
be approx. +5 volts when the Green LED is on, and zero volts when it's
off.
Please Note **** If using a 74C906, the zero volts will be very close
to zero, however if you use a 7407, strangely enough I have found that
this reading will be around 1.6 Volts. Both chips work fine.
If you ground pin 11 (Data In) of the 7407, you will find that this
pulls VDD to ground. These high voltage, open collector outputs tend
to float when the resistor pull-ups aren't locked to a voltage such as
a high VDD.
CONNECTING TO A PRINTER PORT AND BURNING
Power the unit down and install the 4 shorting links on J2 the 16 pin
header, as shown in the overlay. This is the D.T. (David Tait)
position.
Connect the programmer to an MS-DOS printer port using a DB-25 Male to
Female standard extension cable, and power the unit up.
Put a PIC16C84 into your target socket. Remember at the start of this file,
I told you how to operate this programmer? Well, back you go if you
have forgotten.
The command line for this is: PICPROG WL84.HEX
The walking LED program has been described in length in other files on
the PROMO disk. If you have a PIGMY board connected with the LED's
enabled, then a binary count will appear on the two Data LED's when
the program is run.
If a Relay board is connected to the PIGMY board, the walking LED will
be seen on the Relay driver LED's.
Back to The Table of Contents.
Here is the Source Code for the Walking LED program in both MicroChip and Parallax syntax.
;WL_MPASM.ASM WALKING LED PROGRAM FOR MPASM MICROCHIP ASSEMBLER
;INVOKED WITH "MPASM WL_MPASM" for PIC16C84!
;BY Don McKENZIE.
W EQU 0 ;NEEDED FOR MPASM
F EQU 1
STATUS EQU 03H
PORTA EQU 05H
PORTB EQU 06H
PORTC EQU 07H
RAM1 EQU 0CH
RAM2 EQU 0DH
RAM3 EQU 0EH
LOOP_8 EQU 0FH
PORTA_COUNT EQU 10H
PORTB_COUNT EQU 11H
LED_BYTE EQU 12H
;
LIST P=16C84
ORG 0
GOTO 5 ;JUMP TO START AT ADDRESS 5
ORG 5 ;SETS ORG TO ADDRESS 5
START
MOVLW 00 ;CLR W
TRIS PORTA ;SET A TO OUTPUTS
TRIS PORTB ;SET B TO OUTPUTS
MOVWF PORTA ;SET PORT A LOW
MOVWF PORTB ;SET PORT B LOW
ENTRY
MOVLW 08
MOVWF LOOP_8 ;DO IT 8 TIMES
MOVLW 00
MOVWF PORTB_COUNT ;LOAD PORT B COUNT
MOVLW 0FF
MOVWF PORTA_COUNT ;PORT A TO -1
BSF STATUS,W ;SET CARRY
LOOP
RLF PORTB_COUNT ;WALK PORT B LEFT
MOVF PORTB_COUNT,W ;
MOVWF PORTB ;STORE TO B
INCF PORTA_COUNT ;
MOVF PORTA_COUNT,W ;
MOVWF LED_BYTE
RLF LED_BYTE
RLF LED_BYTE
MOVF LED_BYTE,W
MOVWF PORTA
CALL DELAY1SEC
DECFSZ LOOP_8
GOTO LOOP
MOVLW 00
MOVWF PORTB
GOTO ENTRY
DELAY1SEC
MOVLW 00
MOVWF RAM2
MOVLW 04
MOVWF RAM3
LOOP2
MOVLW 0F3
MOVWF RAM1
LOOP3
NOP
DECFSZ RAM1
GOTO LOOP3
DECFSZ RAM2
GOTO LOOP2
DECFSZ RAM3
GOTO LOOP3
RETURN
END
;WL_PASMX.SRC WALKING LED PROGRAM FOR PARALLAX ASSEMBLER
;INVOKED BY "PASMX WL_PASMX ;/S SUPRESSES ADDITIONAL INFO.
;BY Don McKENZIE. for PIC16C84!
DEVICE PIC16C84,XT_OSC,WDT_OFF,PWRT_OFF,PROTECT_OFF
ID '1234'
EEORG 0H
EEDATA 'ABCD'
ORG 0CH ;START ABOVE SPC. REGISTERS
;RAM STARTS HERE
RAM1 DS 1 ;USED FOR DELAY
RAM2 DS 1 ;USED FOR DELAY
RAM3 DS 1 ;USED FOR DELAY
LOOP_8 DS 1
PORTA_COUNT DS 1
PORTB_COUNT DS 1
LED_BYTE DS 1
ORG 0
JMP 5 ;JUMP TO START AT ADDRESS 5
ORG 5 ;SETS ORG TO ADDRESS 5
;
START
MOV W,#0H ;CLR W
MOV !RA,W ;SET A TO OUTPUTS
MOV !RB,W ;SET B TO OUTPUTS
MOV RA,W ;SET PORT A LOW
MOV RB,W ;SET PORT B LOW
:ENTRY
MOV LOOP_8,#8 ;DO IT 8 TIMES
MOV PORTB_COUNT,#0 ;LOAD PORT B COUNT
MOV PORTA_COUNT,#0FFH ;PORT A TO -1
STC
:LOOP
RL PORTB_COUNT ;WALK PORT B LEFT
MOV RB,PORTB_COUNT ;STORE TO B
INC PORTA_COUNT
MOV LED_BYTE,PORTA_COUNT
RL LED_BYTE ;ADJ 0/1 TO 2/3
RL LED_BYTE ;.....
MOV RA,LED_BYTE ;STORE TO PORT A
CALL DELAY1SEC ;DELAY 1 SECOND
DJNZ LOOP_8,:LOOP ;DO IT 8 TIMES
MOV RB,#0 ;CLR PORT B
JMP :ENTRY
DELAY1SEC MOV RAM2,#0 ;1 SEC DELAY @4MHz
MOV RAM3,#4 ;4 BY 250ms
:LOOP2
MOV RAM1,#0F3H
:LOOP NOP
DJNZ RAM1,:LOOP
DJNZ RAM2,:LOOP2
DJNZ RAM3,:LOOP
RET
END
Read the file "picexass.html" for full details on setting up a PIGMY board for In System Programming (I.S.P.) using my PIC84PGM board.
Back to The Table of Contents.
It has been pointed out to me that the latest MPASM gave some warnings when assembling my Walking LED program. It still worked, but new syntax in the latest version means that some items will need to be changed in future.
I have left the older version above for comparison. Below is the dis-assembled WLED.HEX file that will re-assemble with MPASM. I won't give a version number here, coz I know it will change before I type it in.
The "P16C84.inc" file must be in the same directory as your souce and aseembler files.
; Generated by DisAsm84, (c) Nigel Goodwin 1995.
LIST P=16C84, F=INHX8M
include "P16C84.inc"
ORG 0000
GOTO Label_0001
ORG 0005
Label_0001 MOVLW TRISA
MOVWF FSR
MOVLW 000
MOVWF INDF
INCF FSR ,f
MOVWF INDF
MOVWF PORTA
MOVWF PORTB
Label_0004 MOVLW 008
MOVWF 0F
MOVLW 000
MOVWF 11
MOVLW 0FF
MOVWF 10
BSF STATUS , C
Label_0003 RLF 11 , f
MOVF 11 , W
MOVWF PORTB
INCF 10 , f
MOVF 10 , W
MOVWF 12
RLF 12 , f
RLF 12 , f
MOVF 12 , W
MOVWF PORTA
CALL Label_0002
DECFSZ 0F , f
GOTO Label_0003
MOVLW 000
MOVWF PORTB
GOTO Label_0004
Label_0002 MOVLW 000
MOVWF 0D
MOVLW 004
MOVWF 0E
Label_0006 MOVLW 0F3
MOVWF 0C
Label_0005 NOP
DECFSZ 0C , f
GOTO Label_0005
DECFSZ 0D , f
GOTO Label_0006
DECFSZ 0E , f
GOTO Label_0005
RETURN
END
Back to The Table of Contents.
Setting the 84 EEPROM data, ID, and Fuses.
LIST P=16C84 ORG 2100h ;Set EEPROM data DATA 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 DATA 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F DATA 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 DATA 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F DATA 'N','i','g','e','l' ORG 2000h ;Set ID locations DATA 0x00, 0x01, 0x02, 0x03 ORG 2007h ;Set config fuses DATA 0x03 END
Back to The Table of Contents.
How many 7407's do I need for the programmer?
I have some people buying two 7407's or 74C906's for my PIC84PGM board, and it worries me that they may not be reading the files correctly. Sure they may just like a spare I.C. for future use, but as I show two chips on the overlay of the board, I start to think that perhaps I haven't explained this point fully. Yes, it's all in the assembly instructions, but if you haven't got my assembly instructions, then you wouldn't know, would you?
YOU ONLY NEED ONE 14 PIN I.C. installed in my 84 Programmer board. Two socket positions are provided to allow for two possible chip substitution pinouts, as some of these I.C.'s may be difficult to source.
The top socket accepts only a 74C906. (Pin 1 is an output. Pin 2 is an input).
The bottom socket accepts a 7406, 74LS06, 74HC06, 7407, 74LS07, or 74HC07. (Pin 1 is an input. Pin 2 is an output).
In my parts price listing for this project, I offer you a 7407. I may have to substitute this for any one of the above I.C.'s, and If I do, the price will remain the same as my advertised price.
Home |
Products |
Prices |
Directory |
Order |
Contact |
New |
Books |
Files |
Links |
Other
Top_of_Page
DonTronics_
US Home Page. DonTronics
Australian Home Page.
mailto: don@dontronics.com Copyright
© 1997 DonTronics