|
Byron Jeff's PIC Page
Trivial LVP programmer Updated! (3/25/2004)
|
This is a schematic for a trivial Tait style programmer that does
low voltage programming (LVP). With a single IC and a single resistor, this
is one of the most simple programmers that you'll find.
Click on the image for a full sized printable version.
I also have a schematic for a ICSP version of
TLVP that can be used to program a 16F62X/16F81X/16F88 part when MCLR is programmed as
an input and the oscillator is INTRC. Only interruption of the Vdd will cause a
reset in this case. Also you must have the latest version of
My current picprg branch (version 2.3d)
in order to have independent control of the PGM and Vdd pins.
UPDATE: 09/09/2002 I finally feel comfortable enough to release my Trivial High Voltage Programmer which adds only a single transistor and a couple of resistors to the TLVP design. As noted on the page I haven't personally made these mods to my own TLVP but I have had a couple of successful reports. So have at it!
Long cable termination update!(March 23, 2004)
For nearly 2 years the following warning has been posted on this page:
(May 12, 2002) WARNING!!! This programmer currently only
works with a short parallel cable. I advise not using a cable more than 2 feet in
length. Longer cables will result in erratic operation.
I finally took at stab at the problem and have
Posted a solution. Note that the Trivial Programmers are guaranteed
not to operate properly with longer cables without termination.
Return to Contents
Date | Update |
|
| March 25, 2004 |
I'm actually making some progress:
- I created the PIC Designer Prototype page. There's also a gallery of images page to complement it.
- I also updated the termination page in the entry below with an updated TLVP schematic with the AC termination scheme.
|
|
| March 23, 2004 |
|
|
| September 5, 2003 |
|
|
| September 9, 2002 |
|
|
| May 20, 2002 |
|
|
| May 1, 2002 |
- Minor page reorganization. I wanted to highlight
David Tait's FPP PIC programming software for Windows
- I moved the links at the top of the page to a
- I added a link in the Resources section to the
page that touts the advantages of the 16F628.
- I added a Contents section, links throughout
the page back to the top, and a splash of color to the section headings.
|
|
| March 22, 2002 |
- Yet another schematic update. I clarified the assignment of the PGM pin
noting the difference between RB3 for the 16F87X family chips and RB4 for
the 16F62X family chips.
|
|
| March 12 2002 |
- Another schematic update. I mislabeled the pins on the Feb 28th
update on the 74HCT573. I also added/cleaned up labels on both the
74HCT573 and the PIC.
- I also received a report of TLVP working properly with Nigel Goodwin's
WPicProg877. Please consult the forum for more information.
|
|
| February 28 2002 |
- David Tait has pointed
out to me that the wiring for the previous version
of the TLVP was wired in such a way as to create problems. The
previous version routed RB7/Data directly to the ACK (pin 10) of the parallel port.
Most parallel ports have a pullup resistor on that pin. The pullup coupled with
the 1K TLVP resistor would create a situation where the RB7 pin would not see
a low voltage. This caused some TLVP implementers to have problems. The updated
schematic above buffers RB7 through the HCT573 which isolates it from the
ACK pullup. This should improve the programmers reliability.
- If you don't happen to have
an HCT type part handy the programmer can still be built with normal TTL or TTL LS
parts. However to keep the PIC happy it's necessary to add a pullup to 5V
to each of the buffer lines to the PIC. For the RB7/data line this pullup
should be on the buffer side of the 1K resistor.
|
|
Return to Contents
- IMPORTANT!!! (3/12/2002): I
didn't specify pinouts for the PIC because this circuit can be used for
several different package sizes. I want to point out that ALL Vdd and Vss
pins must be connected to +5 and Gnd respectively.
- It's important that an HCT part is used. Most modern parallel ports
will output 3.3V for logic high. While this is fine for TTL, which has a
2.0V high threshold, most CMOS parts, including PICs, choke on that voltage
giving erratic operation. The HCT part acts as a level translator, converting
the TTL levels to CMOS levels, with high being nearly 5V.
Note that there's nothing special about
the HCT573 other than this property. Any HCT chip that can buffer can
be used in place of the HCT573. Latches such as the HCT373, and buffers
such as the HCT241 and HCT541 will work just as well here. And if you
have completely configurable programming software, like Brian Lane's
picprg 2.3b, you could even use a HCT04 inverter and configure the
programmer to invert all of the signals from the parallel port.
- The resistor is designed to allow the PIC RB7 data pin override the
data output from the parallel port.
- UPDATE (8/20/2001):Note that the reason that MCLR is labeled as 'MCLR/Vpp' above is
because of LVP sequencing. The programming specification requires that
RB3/Vcc rise to 5V before MCLR/Vpp rises to 5V. In Tait style programmer
software that has programmatic Vcc control, the software is programmed
to raise Vcc (turning the chip on) before raising Vpp (putting the chip
into programming mode). Since this simple design doesn't have a power
switch (see note below), the software Vcc is used to control RB3/Vcc so
that RB3/Vcc is raised to 5V before MCLR.
UPDATE (8/20/2001): I've misread the data sheet initially. According
to the programming specification, RB3/LVP is supposed to rise first. I believe
that the programmer functions with either order because there's no oscillator
involved. In fact for safety it may be a good idea to ground the OSCIN pin
(pin 13 on the 16F877) to ensure that no noise clocks the part during programming (check out
updated image above).
- You will need a 5V power supply. Some possible sources:
- Use a 9V battery to drive a 7805 regulator.
- Drive the same regulator with most any DC wall wart. Voltages
between 7V and 8V are ideal because they have sufficient headroom and
they won't dissapate too much power through the regulator. But in a pinch
any DC wall wart from 7 to 30 volts will do the job.
- Borrow power from the PC. While the parallel port doesn't have any
significant voltages sources, the PC joystick, keyboard, and PS/2 ports
each carry 5V power. Also it's possible to carry a 5V power source from
inside the PC case using a disk connector.
- UPDATE (8/20/2001): The design above doesn't have a power switch. A manual one can
easily be added. Using a logic level MOSFET as a power switch is also
another option. Be sure to tie RB3 and Vcc together on the PIC and
take pin 16 from the HCT573 (the Vcc signal output from the parallel port)
and drive the MOSFET with it.
- The simple design above doesn't have any indicator LEDs. However since
the HCT573 has 4 more buffers, it's easy to add both a power and
programming LED to the circuit.
- Note as per the programming specification for 16F87X parts, that
this low voltage programmer is incapable of resetting the Low Voltage
Programming Config bit in the PIC's configuration register. Any attempt
to change this bit will be rejected. Also be aware that a 16F87X pic
with the LVP config bit set MUST have pin RB3 grounded at all times
except for programming.
Return to Contents
I'm a Linux user, so my software is targeted for Linux. However any Tait style
programming software should be able to drive the circuit.
UPDATE (May 1, 2002):
For Windows I recommend
David Tait's FPP. FPP works on all Windows variants, has a configuration
for TLVP, and has been verified to work with TLVP.
Since the
software I'm using, a
PicPrg 2.3c, and a yet to be tested
PicPrg2.3d that has Linux 2.4 kernel support.
Both modified versions (last update: 05/28/2002) of Brian Lane's picprg 2.2, is
completely configurable, the pin layout from the parallel port is
somewhat arbitrary. The circuit above can be rewired so that the
appropriate pins for nonconfigurable programming software can still
use the programmer.
This programmer is designed to be simple on purpose. Even using in-circuit
mode is somewhat inconvenient due to having to multiplex RB6, RB7 and
possibly MCLR. I've found that in addition to Low Voltage programming mode
that one of the best new features in the 16F87X series is its ability
to internally program its program memory. This means for the first time
PIC type chips have the ability to have bootloaders installed which can
download new software directly into the chip without an external programmer.
So the sole purpose of this programmer is to download a bootloader into
the PIC so that it can programmed from the bootloader environment.
So I'd like to briefly describe my PIC programming environment:
- I use the
wloader Bootloader developed by Wouter van Ooijen. wloader uses
a user specified pin as a software serial port. So a 16F87X part with
the wloader firmware loaded into it can be programmed from any serial
port. Note that Wouter uses a special programming dongle consisting of
4 resistors and a zener diode. This dongle is important because it
inverts the serial signal. I've also found that sometimes that the 10K
resistors often do not provide enough current for reliable operation.
I've used 1.2K resistors with great success on serial serial ports.
Just a couple of more small points about wloader. One is that the reset
circuit is useful since it automagically resets the device under test (DUT).
The second is that only the pullup resistors in the circuit are required
on the DUT. All the rest of the circuitry can be placed on a small
breadboard or perfboard dongle with a 3 wire connector between the dongle
and the DUT. Then once the development is finished, simply disconnect
the cable from the DUT and you're done.
- On the linux side of things I use
linwload written by Wojtek Zabolotny. Woj is a Linux enthusiast who
saw the value of wloader and wrote a development side loader that takes
hex files from the Linux box and downloads them into a wloader enabled
chip. During my initial usage, I added a few features to linwload and
forwarded the patches to Woj. Feel free to contact me if you're interested
in my modified version. linwload has a useful TERM mode where it will
monitor the wloader software serial port. It gives a great debugging
port to send messages and data without affecting any of the rest of the
circuitry in the DUT including displays and UART connected devices.
- I use gpasm in gputils assembler and
gpsim simulator for development
on my linux box. These projects are part of the Open Source
GNUPic project.
- I'm also in the process of evaluating
JAL, a high level language written by Wouter. It has compilers for the
16F87X series, and executables for both Linux and Windows. I'll post a review once
I've had a chance to write and test something significant with it.
I'd be interested in adding any links to programming software and
configuration files that works with the above circuit. Feel free to
send me an E-mail.
Return to Contents
I have a bunch of projects that I'd like to get done. Just too busy
right now to get any done.:
- (March 2004) I'm working on a PIC design/experimenter station
that I call the PIC Designer. It's job is to make getting projects started quick and easy. No plans for schematics or PCBS anytime soon. At this point I don't think that the specifics are as important as the concept: have a prebuilt design station with typical interfaces so that you can get a project going instead of stopping to build a target before getting to work. As I see it you can get the project done, then build the hardware knowing that everything will already work.
- Sunrise/Sunset Light controller. This is one I got finished. It's
a home automation project that turns all the outside lights on/off based
on sunrise/sunset time. The UPDATE (9/25/2001):
source for the
project has a bunch of interesting pieces including binary/BCD
conversion, using timer2 to drive a software serial port, multiplexed
LED displays, fixed point arithmatic, and linear interpolation. The
updated version has a simple user interface using a pot/switch obtained
from a cheapo light dimmer.
There are few feelings of pride like driving up to the house late at night
and knowing the lights will be on.
- Thermostat: This is one I got done out of necessity. The house
thermostat died in the summer. For the summer I replaced it with a
simple switch to the AC relay. But with the onset of fall the inevitable
chilly mornings/warm evenings was wreaking havoc. So I threw together
a simple thermostat that uses a Dallas Semi DS1602 thermometer for temp
detection, and relays to drive the heater, AC, and fan relays. Currently
it is completely automatic keeping the 68 and 77 degrees (F). The
source code
(Posted 11/22/01) contains interesting tidbits
including DS1620 management routines, and Celsius and Fahrenheit
conversion routines.
- NPCI Compiler/Interpreter. Several years ago I started designing
a minimal High Level Language compiler for microcontroller development.
Initially it was targeted to generate native code. However as I started
developement of the 16F84 target I realized that for developement
efficiency that I needed a bytecode interpreted system so that developed
code could be transferred into the system quickly. So I retargeted for
a stack based virtual machine that I developed. I shelved it and most
of the rest of my PIC stuff about 3 years ago. But now that I'm actively
working on projects, the need for a language has resurfaced. So I dusted
off the compiler/interpreter and started working on it again. Take a
look at the Language Overview. I plan to
release an alpha version of the system once I've updated and tested
the missing code for local variables and 16 bit integers. The current
interpreter is targeted for the 16F877 and will require about 2K of
program memory.
- wloader cloner. In my current development environment, a PIC without
wloader in it isn't very useful. So I'd like to write a piece of
software that will take a wloaded chip and clone it into another chip.
With this piece of software even the trivial programmer described above
will become unnecessary as long as there is a chip with wloader floating
around anywhere in the junkbox. I envision a direct wire harness between
the cloner and clonee with maybe one pushbutton and one LED. Load
the chips, push the button, remove another wloaded chip. It would require
some high voltage circuitry to get RB3 back, but I'm already learning
how to live without it.
- MIDI sequencer. A longtime dream of mine as a keyboard player was
to have a MIDI sequencer that I handbuilt to specifications. I've
always envisioned up to 8 MIDI in/out ports, and enough memory to hold
a bunch of songs. With the advent of compact flash disks, the storage
capacity and physical dimensions are really no problem. I still have
a couple of Cirrus Logic Octarts from the last time I explored this
project. But my current thought is using 12C5XX parts as intelligent
UARTS with a 16F877 as the master controller.
- Security monitor. With the advent of cell phones that receive E-mail
it seems that a self monitor security system could be within reach.
The electronics of security systems isn't too difficult, and with the
A/D capability of the 16F87X parts, it would be simple to completely
zone door/window loops so that an individual door/window can be
id'ed when opened/closed. Add a keyfob transmitter/receiver and an
E-mail gateway to send messages out to cell phones, call it a day.
- Robotic Lawnmower. A project I am actively working on. The
platform is currently a circular base with two window wiper drive
motors. The cutting element is a 12V auto blower fan driving a
Weed Eater nylon replacement head with carpet razors on the ends of
the nylon blades. Powered by a 33Ah 12V battery. The PIC would be the
brains, using some yet to be specified set of sensors to drive
the bot.
Return to Contents
- New! (May 1, 2002):
the 16F628. Why the 16F84 is now obsolete is
a brief overview of the advantages of the newer PIC families over the
16F84.
- Unfortunately the Trivial Programmer Forum has been spambombed out of existance. Unfortunately our wonderful webhost provider here has no mechanism for editing or deleting forum posts. So unless you are interested in reading about Brittany Spears nude or Jiffy Lube ads, there's no reason to go there anymore except for archives. If you need access, or have a question you can contact me directly. I plan to create an editable forum soon. I have removed my forum update autodetect script so any new posts over there if you happen across it will probably go unanswered. Again sorry for the inconvenience.
- NPCI Compiler/Interpreter Overview
- 93XX serial EEPROM programmer
Copyright 2001/2002/2007, Byron A. Jeff. Last updated January 26, 2007
|
|