Searching \ for 'Old programmer to new flash??' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devprogs.htm?key=programmer
Search entire site for: 'Old programmer to new flash??'.

Truncated match.
PICList Thread
'Old programmer to new flash??'
2000\03\16@123048 by JP.BROWN

flavicon
face
Hiy'all!, has anybody on the list successfully managed to program one
of the newer flash parts, for example 16F873 using one of the simple type
programmers designed for 16F84 etc.?.

I notice looking at the 16F873 pinout that RB7 and RB6 are marked in a
similar way to 16F84 ie. RB7/PGD and RB6/PGC  and MCLR is still
MCLR/Vpp, does this mean the 16F873 will program in the old way as used by
16F84  with no major changes?.

I know it is only a matter of time before there will be a heap of simple
programmer designs for the new flash pics (just as there is now for the
16F84), the trend on this list seems to be to use the serial port and a
bootstrap loader code block but I guess both programming methods have
there advantages and disadvantages?.

------------ John

         -----  John P. Brown      spam_OUTJ.P.BrownTakeThisOuTspambradford.ac.uk ----
          \            --- Witty remark goes here ---         /
           --------------------------------------------------

2000\03\16@130840 by M. Adam Davis

flavicon
face
That is something I am working on, many of the simple programmers made for the
16f84 only need a software update to handle the f87x parts.

Don't expect it too soon, though, time is not in abundance here...

-Adam

"JP.BROWN" wrote:
{Quote hidden}

2000\03\16@155730 by Byron A Jeff

face picon face
>
> Hiy'all!, has anybody on the list successfully managed to program one
> of the newer flash parts, for example 16F873 using one of the simple type
> programmers designed for 16F84 etc.?.
>
> I notice looking at the 16F873 pinout that RB7 and RB6 are marked in a
> similar way to 16F84 ie. RB7/PGD and RB6/PGC  and MCLR is still
> MCLR/Vpp, does this mean the 16F873 will program in the old way as used by
> 16F84  with no major changes?.

There's only one real caveat. The actual programming command on the 16F84 (0x08)
has been changed on the 16F87X parts to mean "erase cell then program". This means
that instead of the normal 10ms delay, that for the 16F87X part you need a 20ms
delay.

The other solution is to switch to the equivalent command for the 16F87X part which
is 0x18. Then it only requires 10 ms delay again.

>
> I know it is only a matter of time before there will be a heap of simple
> programmer designs for the new flash pics (just as there is now for the
> 16F84), the trend on this list seems to be to use the serial port and a
> bootstrap loader code block but I guess both programming methods have
> there advantages and disadvantages?.

I really don't see any big advantage of the traditional programming method.
It requires a high voltage supply and typically requires the removal of
the part from it's intended target.

BAJ

2000\03\16@160534 by jamesnewton

face picon face
You have to get the bootstrap loader in the chip somehow right? Requires a
minimal traditional programmer.

---
James Newton jamesnewtonspamKILLspamgeocities.com 1-619-652-0593
http://techref.massmind.org NEW! FINALLY A REAL NAME!
Members can add private/public comments/pages ($0 TANSTAAFL web hosting)


{Original Message removed}

2000\03\16@164519 by Andrew Kelley

picon face
I will work on one also, AFTER I find the document on programming the
f87x.

Time is in abundance, not knowledge.( I know C++ but not parrallel
interfacing or serial.  Only serial communication not bit-banging)

CYA
Andrew

On Thu, 16 Mar 2000 13:06:59 -0500 "M. Adam Davis" <.....adavisKILLspamspam.....UBASICS.COM>
writes:
{Quote hidden}

________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk!  For your FREE software, visit:
dl.http://www.juno.com/get/tagj.

2000\03\16@165132 by Don McKenzie

flavicon
face
> > "JP.BROWN" wrote:
> > >
> > > Hiy'all!, has anybody on the list successfully managed to program
> > one
> > > of the newer flash parts, for example 16F873 using one of the
> > simple type
> > > programmers designed for 16F84 etc.?.

Have a try of the one at:
http://www.dontronics.com/p16pro.html
and see if that works on your programmer.

Don McKenzie    donspamspam_OUTdontronics.com      http://www.dontronics.com

World's Largest Range of Atmel/AVR and  PICmicro Hardware and  Software.
Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html

2000\03\16@180052 by Sayer

flavicon
face
"M. Adam Davis" wrote:
>
> That is something I am working on, many of the simple programmers made for the
> 16f84 only need a software update to handle the f87x parts.
Hi there,
Been thinking about that...

have a look at http://www.picwiser.com

Stefan Sayer

2000\03\17@004153 by Byron A Jeff

face picon face
>
> You have to get the bootstrap loader in the chip somehow right? Requires a
> minimal traditional programmer.

Well actually it doesn't. Since the chips come with LVP set, it's possible
to program them simply using a cable, without bothering with programming
voltages and whatnot. Connect the cable to the part, program it with the
bootloader, then put it permanently in the target and program via the
serial port. Never requires a high voltage supply and only a single
traditional program.

But the traditional Tait type programmer isn't in the equation anymore.

BAJ
>
> ---
> James Newton @spam@jamesnewtonKILLspamspamgeocities.com 1-619-652-0593
> http://techref.massmind.org NEW! FINALLY A REAL NAME!
> Members can add private/public comments/pages ($0 TANSTAAFL web hosting)
>
>
> {Original Message removed}

2000\03\17@041935 by JP.BROWN

flavicon
face
> > You have to get the bootstrap loader in the chip somehow right? Requires a
> > minimal traditional programmer.
>
> Well actually it doesn't. Since the chips come with LVP set, it's possible
> to program them simply using a cable, without bothering with programming
> voltages and whatnot. Connect the cable to the part, program it with the
> bootloader, then put it permanently in the target and program via the
> serial port. Never requires a high voltage supply and only a single
> traditional program.
>
> But the traditional Tait type programmer isn't in the equation anymore.
> BAJ

>>>> Light comes on in John's head! <<<<
Byron am I right in thinking that you can program the new flash parts
by simply feeding in an asynchronous data stream to the rs232 input pin
similar to the synchronous data stream that you would feed into the 16F84
RB6/RB7 port bits?. (no bootstrap loader?, same data stream format?)

Can it be this simple?
Is there a catch?

2000\03\17@071137 by Byron A Jeff

face picon face
{Quote hidden}

No, it's not. There's no bootloader for the part onboard when you receive it
like some 8051 variants. It's blank and requires at least one traditional
programming cycle to load some code into it.


> Is there a catch?

Yes. You can pass a similar stream to RB6/RB7 on the 16F87X parts just like
16F84, using a bit programmed CTS for data and the transmit pin for the
clock. I've seen a couple of these designs, but they are not considered
Tait designs.

The cable I was speaking to above was a cable to the parallel port. The
LVP buys you the ability to program without having a high voltage supply
in the equation. This means that you should be able to build a cable that
plugs into the parallel port that programs the part in a traditional manner
without having to deal with a Vpp to MCLR. So instead of Tait design that
specifically generates a Vpp, all you need is a cable for the programmer.

But then you only have to do this once because you can program the part with
a bootloader like Tony Nixon's ROMZap. From then on the bootloader can
program the part in-circuit through the serial port.

Does this clarify?

BAJ

2000\03\17@101409 by M. Adam Davis

flavicon
face
I thought the chips came with LVP NOT set?  I was told that I'd have to program
the chips at least once at VPP before I could start using +5 only, this was so
that chips would not be accidently programmed...

I just checked the data sheet, though, and you are right.  It defaults to 1 from
the factory...  Go figure!

-Adam

Byron A Jeff wrote:
{Quote hidden}

> > {Original Message removed}

2000\03\17@102027 by picxpert

picon face
It does make some sort of sense - what's the point of having LVP if you need
to use high-voltage programming to enable it?

-Randy Glenn
RemoveMEPICxpertTakeThisOuTspamtechie.com - http://i.am/PICxpert

Ineptitude is a sure indicator of intellect.

===========
To unsubscribe, send a message containing the text "unsubscribe PICLIST" to
spamBeGoneLISTSERVspamBeGonespamMITVMA.MIT.EDU

{Original Message removed}

2000\03\17@102206 by jamesnewton

face picon face
I'd love to see the wireing and sample software for that. I don't see how a
bootloader can load something before its has itself been loaded into the
part. Or am I missing something? Is the bootloader you are referring to a PC
program?

---
James Newton TakeThisOuTjamesnewtonEraseMEspamspam_OUTgeocities.com 1-619-652-0593
http://techref.massmind.org NEW! FINALLY A REAL NAME!
Members can add private/public comments/pages ($0 TANSTAAFL web hosting)


{Original Message removed}

2000\03\17@110901 by John A. Craft

flavicon
face
<x-flowed>>The cable I was speaking to above was a cable to the parallel port. The
>LVP buys you the ability to program without having a high voltage supply
>in the equation. This means that you should be able to build a cable that
>plugs into the parallel port that programs the part in a traditional manner
>without having to deal with a Vpp to MCLR. So instead of Tait design that
>specifically generates a Vpp, all you need is a cable for the programmer.
A cable to the parallel port??

Is there document somewhere that describes LVP programming?

John C.

</x-flowed>

2000\03\17@121454 by M. Adam Davis

flavicon
face
www.microchip.com/10/Lit/Specs/index.htm
Has all the microchip documents on programming their micros.

-Adam

"John A. Craft" wrote:
{Quote hidden}

2000\03\17@134757 by Byron A Jeff

face picon face
>
> www.microchip.com/10/Lit/Specs/index.htm
> Has all the microchip documents on programming their micros.

And more specifically LVP is documented in the 16F87X programming specification.
RB3 is an active low input that indicates programming mode. Other than that
it's exactly like HVP mode. Note that RB3 is unavailable during normal
usage AFAICT. It cannot be used as a normal input or output and must be
tied high in the circuit.

{Quote hidden}

2000\03\17@140442 by Byron A Jeff

face picon face
>
> I'd love to see the wireing and sample software for that.

James,

It isn't that big a deal. A tait programmer essentially wires the parallel
port directly to the part except for the HV control. With LVP you can simply
wire the HV control signal directly to RB3. Let me throw out an example:

Wire the following cable on the parallel port:
- pin 5 to RB3 (Vpp control)
- pin 3 to RB6 (Clock)
- pin 2 to RB7 via a 1K resistor (Data Out)
- pin 10 to RB7 (Data In)

The only debatable connection is Vcc control. You can put a switch between
the +5 supply and the Vcc pin on the pic. BTW the resistor is to prevent
pin conflict between the parallel port pin and the data out from RB7.

Now get a copy of Brian Lane's picprg 2.2 which runs under Linux. Configure
the pins listed above and change the 0x08 "Begin Programming" commands
in lowlvl.c to 0x18. Be aware that picprg 2.2 currently compiles under
Linux 2.0.X kernels and requires some modifications to work under 2.2.X
kernels. E-mail me for more details on the process.

picprg should program the part like a champ. If the program loaded is a
bootloader then the cable, picprg 2.2, and everything else associated with
traditional programming becomes unnecessary.

The is the experiment I have my students setting up right now. Should have
results next week. They are using a traditional HV programmer but the
process should be the same for LVP.

> I don't see how a
> bootloader can load something before its has itself been loaded into the
> part. Or am I missing something? Is the bootloader you are referring to a PC
> program?

No. The bootloader is a PIC program. Check out Tony Nixon's ROMZap at
http://www.picnpoke.com/demo/ROMZap.zip in the boot.asm file. Once loaded
into part, that code will subsequently load programs via the serial port.
But a cable as outlines above can be used for the initial loading of the
bootloader into a completely blank part.

But LVP eliminates building a programmer that generates 10-13V Vpp. That
most of the hardware for a Tait Style programmer.

BAJ
>
> ---
> James Newton RemoveMEjamesnewtonspamTakeThisOuTgeocities.com 1-619-652-0593
> http://techref.massmind.org NEW! FINALLY A REAL NAME!
> Members can add private/public comments/pages ($0 TANSTAAFL web hosting)
>
>
> {Original Message removed}

2000\03\17@160035 by Arthur Brown

flavicon
face
have you seen this site may save sometime working out a programmer

http://www.xs4all.nl/~wf/wouter/pic/wisp

all the best arthur

2000\03\17@210805 by Byron A Jeff

face picon face
>
> have you seen this site may save sometime working out a programmer
>
> http://www.xs4all.nl/~wf/wouter/pic/wisp

I don't think so. This Wisp is a traditional programmer that in fact
utilizes a programmed PIC16F84 to do its job. It has a full programmable
power supply, a Vpp generator. It's kind of like embedding RomZap in a
separate chip along with a high voltage supply.

In short in exactly the opposite direction from a beginner really wants to go.

It's possible to build a 16F87X programmer out of a cable, two resistors,
a switch and an LED. Could completely automate it by replacing the switch
with a MOSFET.

In circuit can be done with just a MAX232 and its requisite 4 caps. Take a
look at the ROMzap circuit in the PDF in http://www.picnpoke/demo/ROMZap.zip
Tony also has the wallwart power supply but I've had good luck with pulling
circuit power from the keyboard port.

All that's really left to do is figure out how to build a switchable circuit
so that it can initially be programmed through RB6/RB7 then switched to
ROMZap mode after the initial download. Tony's code has autodetection of
the program link. All that would be required is a timeout on the PC side
after initializing the part and switching to the alternate RB6/RB7 paths.

But everytime I think about this setup, I remind myself that setting up a
separate cable for the initial download is simple enough that incorporating
it into ROMZap doesn't make much sense.

BAJ
>
> all the best arthur
>

2000\03\18@094632 by w. v. ooijen / f. hanneman

picon face
> > http://www.xs4all.nl/~wf/wouter/pic/wisp
>
> I don't think so. This Wisp is a traditional programmer that in fact
> utilizes a programmed PIC16F84 to do its job. It has a full programmable
> power supply, a Vpp generator. It's kind of like embedding RomZap in a
> separate chip along with a high voltage supply.

I agree. I'm working on a WISP-compatible 16F877 bootloader, so the same
DOS command line tool can be used wth either the WISP programmer hardware
(for 16x84's) or the 16F877 resident loader. But of course the question
still remains how to get the loader into the 16F877.

Wouter

2000\03\18@151003 by Byron A Jeff

face picon face
>
> > > http://www.xs4all.nl/~wf/wouter/pic/wisp
> >
> > I don't think so. This Wisp is a traditional programmer that in fact
> > utilizes a programmed PIC16F84 to do its job. It has a full programmable
> > power supply, a Vpp generator. It's kind of like embedding RomZap in a
> > separate chip along with a high voltage supply.
>
> I agree. I'm working on a WISP-compatible 16F877 bootloader, so the same
> DOS command line tool can be used wth either the WISP programmer hardware
> (for 16x84's) or the 16F877 resident loader. But of course the question
> still remains how to get the loader into the 16F877.

I love it when the developer comes online and interacts with us.

As I was trying to describe earlier it is possible to build a traditional
type programmer using only the serial port. The basic game gameplan is
to use one of the RS-232 output control pins as the data input into the
PIC (to RB7) (through a 1k resistor) and the transmit pin as the clock (RB6).
Also you tie the data pin to one of the RS-232 inputs.

To program set the clock to 115200 BPS and send a zero byte to clock in/out
the data.

Since the bootloader will have the part and the MAX232 already the only real
addition is the wiring to RB6/RB7 and the 1K resistor. It should be possible
to stick a header between that wiring and the processor pins so that when
the header is in place it does as tradition program and if not it'll do a
bootload.

I haven't tried this method but I've seen a couple of designs that programmed
16F84's with the process.

BAJ
>
> Wouter
>

2000\03\18@172442 by geocities/yahoo

picon face
Have you looked at Tony Nixon's ASCII programmer? Its basically that, but
with the added advantage that it does not require any software. We can
generate the data file for the boot loader and then make it available off
the web site (Tony's or piclist.com or whereever) and then there are no
operating system issues.

I've been thinking that a more general version of this (with 8 lines to
implement parallel programming) might be possible with the parallel port
given a little R/C/invert delay/loopback from nStrobe to Busy and from Busy
to nAck. It would be a "stream of data" tool (like "stream of consciousness"
but in hardware <GRIN>) where the data defines the signals. e.g. d0 (acting
as the clock) goes up and down 6 times while d1 (acting as data) stays high
or low to transfer a bit of info. It might be able to support a wider range
of devices. Just thinking.

James Newton
jamesnewtonEraseMEspam.....geocities.com
1-619-652-0593 phone

{Original Message removed}

2000\03\18@181042 by Arthur Brown

flavicon
face
I'm I wrong to think that the trick of programing a 16f87x is not in the
hardware but the code and the way that is sent to the chip being programed.
what if you use for example nppp or the old dtait, picstart-16x but don't
connect to the /MCLR or the DRB3 pin as this can be switched manualy.
But then what is the diffrence of programing a 4k part to that of 8K?.
I'm finding this part heavy going at this time. surly the program needs to
know where to put the code?
back to reading data sheets for me but also looking with intrest at this
posting.
thanking you all for a good read.
Arthur EraseMEartbspamcableinet.co.uk

{Original Message removed}

2000\03\19@003613 by Byron A Jeff

face picon face
>
> Have you looked at Tony Nixon's ASCII programmer?

Absolutely.

> Its basically that, but
> with the added advantage that it does not require any software. We can
> generate the data file for the boot loader and then make it available off
> the web site (Tony's or piclist.com or whereever) and then there are no
> operating system issues.

Which is most excellent. However the specific issue under discussion here
is how to get the bootloader on the part without having to build a
traditional programmer. Personally I still think the best path is simply
to put together a separate cable for the initial download. But it seems that
with only a moderate duplication of effort that the bootloader and a
traditional programmer (LVP of course) could share the same hardware.

>
> I've been thinking that a more general version of this (with 8 lines to
> implement parallel programming) might be possible with the parallel port
> given a little R/C/invert delay/loopback from nStrobe to Busy and from Busy
> to nAck. It would be a "stream of data" tool (like "stream of consciousness"
> but in hardware <GRIN>) where the data defines the signals. e.g. d0 (acting
> as the clock) goes up and down 6 times while d1 (acting as data) stays high
> or low to transfer a bit of info. It might be able to support a wider range
> of devices. Just thinking.

Maybe. But in the end I still feel that bootloading micros quickly overtake
all manner of ad-hoc tools.

BAJ
>
> James Newton
> RemoveMEjamesnewtonEraseMEspamEraseMEgeocities.com
> 1-619-652-0593 phone
>
> {Original Message removed}

2000\03\19@140327 by Dan Michaels

flavicon
face
Wouter wrote:
>> > http://www.xs4all.nl/~wf/wouter/pic/wisp
>>
>> I don't think so. This Wisp is a traditional programmer that in fact
>> utilizes a programmed PIC16F84 to do its job. It has a full programmable
>> power supply, a Vpp generator. It's kind of like embedding RomZap in a
>> separate chip along with a high voltage supply.
>
>I agree. I'm working on a WISP-compatible 16F877 bootloader, so the same
>DOS command line tool can be used wth either the WISP programmer hardware
>(for 16x84's) or the 16F877 resident loader. But of course the question
>still remains how to get the loader into the 16F877.
>
>Wouter
>

Wouter,

I took a look at the WISP, and for a guy who states: "I'm a software
professional and only a hardware amateur ...", you have created one
of the most brilliant pieces of hardware I have seen in the freeware
shareware community.

Your 0.5 guilder ($0.25) charge pump circuit is great. If you closed
the loop by sensing the output with an A/D (eg, PIC71), it would be
even better. [minor point - the RS-232 interface could be improved
a little].

I hope you come up with something equally great for the '87x.

best regards,
- Dan Michaels
Oricom TEchnologies
http://www.sni.net/~oricom
==========================

2000\03\20@013359 by w. v. ooijen / f. hanneman

picon face
> Your 0.5 guilder ($0.25) charge pump circuit is great. If you closed
> the loop by sensing the output with an A/D (eg, PIC71), it would be
> even better. [minor point - the RS-232 interface could be improved
> a little].

Thanks for the praise, but such a charge pump is rather standard. Using a
non-flash PIC is a bit against my principle: use something that enables a
quick code-and-try cycle. The RS232 interface is VERY crude - I was running
against the 100 pins limit of the free Ivex tools I used...

> I hope you come up with something equally great for the '87x.

I'm working on loader firmware that can cooperate with the dos WISP command
line tool. BTW I use a WISP programmer to program the 16F877 in-circuit,
works fine! I just modified the command-line tool a little because the code
protection bits in the fuses word of a 16f877 are different.

regards,
Wouter

2000\03\20@105625 by Dan Michaels

flavicon
face
At 10:36 PM 3/19/00 +0100, you wrote:
>> Your 0.5 guilder ($0.25) charge pump circuit is great. If you closed
>> the loop by sensing the output with an A/D (eg, PIC71), it would be
>> even better. [minor point - the RS-232 interface could be improved
>> a little].
>
>Thanks for the praise, but such a charge pump is rather standard. Using a
>non-flash PIC is a bit against my principle: use something that enables a
>quick code-and-try cycle. The RS232 interface is VERY crude - I was running
>against the 100 pins limit of the free Ivex tools I used...
>

Maybe the c.p. is "rather standard", but all in all, the *overall*
design of the WISP is still quite brilliant. If you just put a pullup
PNP on the RS-232 Tx line, with a 4.7K pulldown resistor to a half-wave
rectifier powered off the host PC Rx line, the RS-232 would be fine.

I haven't hashed out the exact code for a charge pump like you have
there, but it seems like one could use a 28-pin PIC, which has 2
hardware PWM outputs, set them as complements of each other going to
the intermediate diode tap points, and have a really nice stable
and adjustable Vpp generator.

Does this reasoning seem correct, or might the phasing relationship
between the PWMs have to be more complicated than simple inversion,
as the duty cycle is varied over all values?

best regards,
- Dan Michaels
Oricom Technologies
http://www.sni.net/~oricom
==========================

2000\03\20@113630 by jamesnewton

face picon face
<BLOCKQUOTE Author="Byron A Jeff">
It's possible to build a 16F87X programmer out of a cable, two resistors,
a switch and an LED. Could completely automate it by replacing the switch
with a MOSFET.
</BLOCKQUOTE>

I really would love to see this circuit and the software to make it work.

---
James Newton RemoveMEjamesnewtonspam_OUTspamKILLspamgeocities.com 1-619-652-0593
http://techref.massmind.org NEW! FINALLY A REAL NAME!
Members can add private/public comments/pages ($0 TANSTAAFL web hosting)


{Original Message removed}

2000\03\20@113641 by jamesnewton

face picon face
I'd really like to see your WISP
http://www.xs4all.nl/~wf/wouter/pic/wisp/
updated to support the '877 and other chips. It seems to be about the
lowest cost programmer with margining support. (chime in to let me know if
I'm wrong!) The only thing that makes it kinda rough is that it only
supports the '84 at this point. Have you thought about adding something like
Tony's the Engine
http://www.picnpoke.com/engine.html
language to the firmware so that it can be extended to support may
different devices? BTY, has anyone thought about adding the definitions
necessary to allow the Engine to program (and possibly test) all the PIC
devices? Now, the Engine doesn't support margining, but as Dan noted, the
WISP could be extended with a feedback to a PIC with A2D and could generate
multiple different voltages. One pump for program enable, another for target
power. Adjust the second and you have any margining you like under PIC
control.

---
James Newton RemoveMEjamesnewtonTakeThisOuTspamspamgeocities.com 1-619-652-0593
http://techref.massmind.org NEW! FINALLY A REAL NAME!
Members can add private/public comments/pages ($0 TANSTAAFL web hosting)


{Original Message removed}

2000\03\20@144056 by w. v. ooijen / f. hanneman

picon face
> If you just put a pullup
> PNP on the RS-232 Tx line, with a 4.7K pulldown resistor to a half-wave
> rectifier powered off the host PC Rx line, the RS-232 would be fine.
Yeah, but that would add a few components.....

> I haven't hashed out the exact code for a charge pump like you have
> there, but it seems like one could use a 28-pin PIC, which has 2
> hardware PWM outputs, set them as complements of each other going to
> the intermediate diode tap points, and have a really nice stable
> and adjustable Vpp generator.
Vpp does not need to be adjustable (at least not for a 16x84), it must be
(from memory) between 12 and 14V, and you can get away with somewhat lower
once programming has been enabled by ~ > 12V. The Vpp generator just
outputs a square wave, with the two pins at opposite polarities. The
frequency must be high enough, and some extra pumping was needed after
sending or receiving a char (which is 'busy wait', hence no pumping).

regards,
Wouter

2000\03\20@152458 by Dan Michaels

flavicon
face
Wouter wrote:
>> If you just put a pullup
>> PNP on the RS-232 Tx line, with a 4.7K pulldown resistor to a half-wave
>> rectifier powered off the host PC Rx line, the RS-232 would be fine.
>
>Yeah, but that would add a few components.....
>

Unfortunately, the average time it takes *me* to double the number
of components in my h.w. designs (ie, T2x) is only about 5 minutes.
Similar regarding number of lines of code in my s.w. [guess it's in
the genes].

BTW, the RS-232 PNP pullup transistor circuit extends easily to
support the WouterBus.
===============

{Quote hidden}

Yeah, for PIC programming, one Vpp level is ok. But for *general*
purposes, by extending this scheme using the 2 PWM outputs of a PIC28,
plus sensing the voltage using the PIC's A/D channel in a stabilization
loop, would make a really great "rock-solid" adjustable voltage
generator, good for about 0-13v. With the pump control timing produced
by h.w. PWM, rather than in s.w., there would be no droop when the cpu
performed other tasks, like RS-232. [Catching all this, Jim, re ebb?
I see an appnote coming].
==================

Wouter, think you could have your new '87x loader done by this weekend,
so Jim (Newton) could use it next week? [just kidding - keep up the
good work].

Thanks for all the comments and best regards,
- Dan Michaels
Oricom Technologies
http://www.sni.net/~oricom
==========================

2000\03\20@191327 by Byron A Jeff

face picon face
>
> <BLOCKQUOTE Author="Byron A Jeff">
> It's possible to build a 16F87X programmer out of a cable, two resistors,
> a switch and an LED. Could completely automate it by replacing the switch
> with a MOSFET.
> </BLOCKQUOTE>
>
> I really would love to see this circuit and the software to make it work.

OK let's go through it. I thought that I had posted the basic idea here
but maybe I sent it in a private E-mail.

Software wise I'm using what I know: picprg 2.2 under Linux. Be aware that
for 2.2 kernels it requires a patch and some dancing. Let's talk about
these first.

The patch is required because PicPrg uses the lp_struct from linux/lp.h
Unfortunately this completely changed with the addition of parport. What
I did is remove the following from lowlvl.c line 57:
-----------------------------------------------------
/* Sometimes this is in /usr/include/linux/lp.h sometimes not */
struct lp_struct lp_table[] = {
       { 0x3bc, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
       { 0x378, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
       { 0x278, 0, 0, LP_INIT_CHAR, LP_INIT_TIME, LP_INIT_WAIT, NULL, NULL, },
};
-----------------------------------------------------

And replaced with an equivalent structure:


-----------------------------------------------------
unsigned mylp_table[] = { 0x3bc, 0x378, 0x278 };

#define LP_B(x) (mylp_table[x])
-----------------------------------------------------

because picprg only uses the base address from that structure through
the LP_B macro.

Now the dance is setting up the correct port. With the advent of parport
parallel port number assignment has become dynamic. In kernel 2.0
lp0 was always 0x3bc, lp1 -> 0x378, etc. Now the first detected port
becomes lp0 no matter what base address is assigned. This confuses picprg
because it expects static assignments. The quick hack around it is to
simply link the port that matches the base address of lp0 to the port
that picprg expects. For example say you have a single parallel port
at 0x378. The 2.2 kernel assigns that port to lp0. However picprg expects
that address to be assigned to lp1. So the following:

# rm /dev/lp1
# ln -s /dev/lp0 /dev/lp1

Makes picprg happy because it can now open /dev/lp1 even though it
doesn't really exists.

I have a student working on patching this so that picprg 2.3 (I guess)
will do the static assignments if /proc/parport doesn't exist and
will dynamically fill the array with the correct addresses if it
does. I think also changing the port assignment to the base address
will simplify the problem. So instead of saying port 2, say the port
with address 0x278. Then picprg can automagically find the correct device
that matches the port so even if you remove/add a parallel port to your
system, picprg 2.3 will still have the correct assignment.

The final patch to picprg 2.2 is changing the 0x08 begin programming
command in lowlvl.c to 0x18, which is the 16F87X equivalent. We plan
on adding a switch so that the existing PIC16F84 programmer can
be used to program both 16F84 and 16F87X parts.

Now at this point you can use a normal Tait style programmer to
program 16F87X parts under current Linux 2.2 kernels.

But the 16F87X has low voltage programming mode. That means that
none of the high voltage generation circuitry is required to program
the part. Since a Tait style programmer is little more than a
straight parallel cable with HV generation circuit, once you remove
the HV circuit, all that's left is the cable.

PicPrg2.2 is quite flexible in its pin assignments. Here's my 16F84
config file:
--------------------------------
# Linux PIC programmer configuration v2.0
port=1
vpp=+5
vdd=-4
clock=+3
datao=-2
datai=+10
idaddr=2000
eeaddr=2100
cfaddr=2007
colors=1
----------------------------------
So on my cable I'd simply have to wire the pins listed:
- Pin 5 from the cable goes to RB3 (LVP)
- Pin 3 from the cable goes to RB6 (clock)
- Pin 2 from the cable goes to RB7 (DataOut). But since the parallel port
 doesn't have tristated drivers, there must be a 1K resistor between
 the cable and the pin. So when RB7 drives the pin it doesn't short.
- Pin 10 from the cable also goes to RB7 (DataIn) which will detect
 when the RB7 is driven.
-----------------------------------
The switch, resistor, and LED are for Vdd so that 5V can be switched
to the programmer and show when the programmer is on or off. Again pin
4 could be wired to a logic level MOSFET that will provide the part
power automatically. BTW I'm stealing power from the keyboard. It's
also possible to steal power from a PS/2 or game port also.

That's it (Note the polarities may be incorrect, Run picprg's
config and test the signals on the cable first).

Programming should be:
- Turn programmer off
- Insert part
- Turn programmer on
- Run picprg 2.2 to download
- Turn programmer off
- Remove part.

Of course you can remove the programmer off/on if Vdd is wired from the
Voila! And if you configure the part for HVP by clearing the LVP bit
then you'll even get RB3 back once you put the part into its circuit.
Of course you could simply blow in something like Tony's ROMZap, get RB3
back, and further program the part in circuit via the serial port.
But as a one off the cable should be doable in about a 1/2 hour.

I haven't set any of my students on this task because we already
have a homebuilt 16F84 programmer to work with. So we're just
implementing the software changes. But in theory this cable should
work just fine.

BAJ

2000\03\20@193034 by Byron A Jeff

face picon face
OOPS! Cut myself off in the last message....

> Programming should be:
> - Turn programmer off
> - Insert part
> - Turn programmer on
> - Run picprg 2.2 to download
> - Turn programmer off
> - Remove part.
>
> Of course you can remove the programmer off/on if Vdd is wired from the
cable to the logic level MOSFET because picprg 2.2 will then handle turning
power on and off.

> Voila!

2000\03\20@193911 by Tony Nixon

flavicon
picon face
Byron A Jeff wrote:

> Of course you could simply blow in something like Tony's ROMZap, get RB3
> back, and further program the part in circuit via the serial port.
> But as a one off the cable should be doable in about a 1/2 hour.

ROMZap is getting software added to be able to program the boot code
into the target chip without a programmer. Plus it's been modified to
allow the user to place the boot code anywhere in ROM and also
automatically generate a code template that will be compatable with the
users custom boot setup.

Should be ready tommorrow all being well. I've got to test it on a few
different computers yet.

I have nearly finished designing a small PCB to take advantage of
ROMzaps capabillities. I will either make the design available on my web
site, or offer it as a complete kit, or both, if anyones interested.

--
Best regards

Tony

http://www.picnpoke.com
EraseMEsalesspamspamspamBeGonepicnpoke.com

2000\03\21@012737 by w. v. ooijen / f. hanneman

picon face
> Unfortunately, the average time it takes *me* to double the number
> of components in my h.w. designs (ie, T2x) is only about 5 minutes.
'Unfortunately' refers to your boss who carries the recurrent cost of your
design?

> Yeah, for PIC programming, one Vpp level is ok. But for *general*
> purposes, by extending this scheme using the 2 PWM outputs of a PIC28,
> plus sensing the voltage using the PIC's A/D channel in a stabilization
OK, but now you are talking about a device that is much more ambituous than
WISP was ever meant to be. Two suggestions from me:
- be sure to support in-circuit programming
- include something like the passthrough, it is so damn convenient during
development

> Wouter, think you could have your new '87x loader done by this weekend,
> so Jim (Newton) could use it next week? [just kidding - keep up the
> good work].
I guess not, there is more to fill my spare time! Maybe in a week or two.

regards,
Wouter

2000\03\21@115333 by Dan Michaels

flavicon
face
At 10:38 PM 3/20/00 +0100, you wrote:
>> Unfortunately, the average time it takes *me* to double the number
>> of components in my h.w. designs (ie, T2x) is only about 5 minutes.
>
>'Unfortunately' refers to your boss who carries the recurrent cost of your
>design?
>

Yeah, well ....
===========

{Quote hidden}

Those features are a part of what makes your WISP design so great, as
far as I am concerned. My last pass-through design [ie, last week's]
used a separate '4052 chip, but I like yours better. [unfortunately, I
have to use a bigger cpu pinout to do it - another "recurrent cost" for
my boss!].

BTW, I fiddled around some more with the PWM -> charge-pumped-Vpp idea,
and it looks like with a single PIC, you could get both +V and -V
outputs, separately adjustable, of essentially any voltage. Possibly
reinvents the switcher, but adds only about 0.25-0.50 USD to the cost
of an embedded system, and the Vpp levels are s.w./Rs-232 controllable.
===============

>> Wouter, think you could have your new '87x loader done by this weekend,
>> so Jim (Newton) could use it next week? [just kidding - keep up the
>> good work].
>
>I guess not, there is more to fill my spare time! Maybe in a week or two.
>
>regards,
>Wouter
>

Be sure to notify the piclist, once it is ready. There is certainly
a lot of interest in this area nowadays, especially from Jim Newton
and the Techref/CUMP group.

best regards,
- Dan Michaels
Oricom Technologies
htpp://http://www.sni.net/~oricom
==========================

2000\03\21@130650 by William Chops Westfield

face picon face
   BTW, I fiddled around some more with the PWM -> charge-pumped-Vpp idea,
   and it looks like with a single PIC, you could get both +V and -V
   outputs, separately adjustable, of essentially any voltage. Possibly
   reinvents the switcher, but adds only about 0.25-0.50 USD to the cost
   of an embedded system, and the Vpp levels are s.w./Rs-232 controllable.

It would be tough to generate a high enough current to program actual
EPROM based cells this way, right?  My understanding is that the flash
parts pretty much use the 12V VPP as a digitial input, while the EPROM
parts use it as an actual power supply for doing the programming...

BillW

2000\03\21@133517 by Dan Michaels

flavicon
face
At 10:05 AM 3/21/00 PST, you wrote:
>    BTW, I fiddled around some more with the PWM -> charge-pumped-Vpp idea,
>    and it looks like with a single PIC, you could get both +V and -V
>    outputs, separately adjustable, of essentially any voltage. Possibly
>    reinvents the switcher, but adds only about 0.25-0.50 USD to the cost
>    of an embedded system, and the Vpp levels are s.w./Rs-232 controllable.
>
>It would be tough to generate a high enough current to program actual
>EPROM based cells this way, right?  My understanding is that the flash
>parts pretty much use the 12V VPP as a digitial input, while the EPROM
>parts use it as an actual power supply for doing the programming...
>
>BillW
>

Remains to be seen. I haven't breadboarded the ckt yet, but Wouter
has been using this scheme in his '84 programmer, so it must work
for those chips. But providing enough juice to run some CMOS analog
circuitry in a small cheap embedded system would be my main goal.
Tell you after I try it.

- Dan Michaels
Oricom Technologies
http://www.sni.net/~oricom
==========================

2000\03\21@163401 by w. v. ooijen / f. hanneman

picon face
> >It would be tough to generate a high enough current to program actual
> >EPROM based cells this way, right?  My understanding is that the flash
> >parts pretty much use the 12V VPP as a digitial input, while the EPROM
> >parts use it as an actual power supply for doing the programming...

> Remains to be seen. I haven't breadboarded the ckt yet, but Wouter
> has been using this scheme in his '84 programmer, so it must work

The '84 (and AFAIK the other flashes) does indeed use the VPP only as an
enable, an internal charge pump or the like creates the actual programming
voltage from the Vcc. The EPROM parts however use the VPP directly. Check
the current requirement during programming - I don't think a charge pump
can supply that current!

Wouter

2000\03\21@173311 by Dan Michaels

flavicon
face
At 10:05 AM 3/21/00 PST, you wrote:
>    BTW, I fiddled around some more with the PWM -> charge-pumped-Vpp idea,
>    and it looks like with a single PIC, you could get both +V and -V
>    outputs, separately adjustable, of essentially any voltage. Possibly
>    reinvents the switcher, but adds only about 0.25-0.50 USD to the cost
>    of an embedded system, and the Vpp levels are s.w./Rs-232 controllable.
>
>It would be tough to generate a high enough current to program actual
>EPROM based cells this way, right?  My understanding is that the flash
>parts pretty much use the 12V VPP as a digitial input, while the EPROM
>parts use it as an actual power supply for doing the programming...
>
>BillW
>

Well, I jigged up Wouter's charge pump ckt. [dang if I didn't
have to write a little code loop and program a PIC74, too].

The effective output resistance of the pump is about 500 ohms
@ Vout = 13v. I guess this sounds about right, as 13v/500ohms
= 26 mA, which is the max current in/out of a PIC I/O pin. I
ran the PWM at 78 Khz, and it doesn't seem to matter if the
pumper (lifter, flying?) caps are .1 or 10 uF.

I checked the programming spec, and it indicates Ipp = 50 mA,
so this ckt would certainly be hard pressed to handle that.
However, it could still provide power to drive external analog
CMOS circuitry, and I am sure I can get it to produce -V
simultaneously with +V.

For adjustable Vpp, I changed the hard +5v to the pump input to
PWM output thru a 100 ohm resistor. It worked, but halved the
output voltage. Need to play some more.

BTW, anyone know whether it is ok to tie PIC output pins in
parallel the way you can with 74HC04/etc chips, to increase
current drive? [assuming the 0s & 1s are in phase, of course].

- Dan Michaels
Oricom Technologies
http://www.sni.net/~oricom
==========================

2000\03\21@175522 by smerchock, Steve

flavicon
face
part 0 4588 bytes
<P><FONT SIZE=2>Dan,</FONT>
</P>

<P><FONT SIZE=2>I've tied the ports together before. Worked fine for </FONT>
<BR><FONT SIZE=2>me. I was able to drive a 55mA relay that way.</FONT>
</P>

<P><FONT SIZE=2>Steve</FONT>
</P>

<P><FONT SIZE=2>{Original Message removed}

2000\03\23@201608 by Marc

flavicon
face
> The effective output resistance of the pump is about 500 ohms
> @ Vout = 13v. I guess this sounds about right, as 13v/500ohms
> = 26 mA, which is the max current in/out of a PIC I/O pin. I
> ran the PWM at 78 Khz, and it doesn't seem to matter if the
> pumper (lifter, flying?) caps are .1 or 10 uF.
>
> I checked the programming spec, and it indicates Ipp = 50 mA,
> so this ckt would certainly be hard pressed to handle that.
> However, it could still provide power to drive external analog
> CMOS circuitry, and I am sure I can get it to produce -V
> simultaneously with +V.

Well if you generate 13v with 500 ohms output, and want the voltage
to always stay above say 12V, you can't draw more than 2mA from it.
If you draw the whole 26mA, the output voltage is 0V, which is
certainly not enough to program an EPROM cell.

2000\03\23@210913 by William Chops Westfield

face picon face
Can you generate a variable voltage with a capacitive multiplier and
PWM?  My intuition says that PWM into a capacitor gives you sort of
variable output current at a fixed voltage (at least for non-constant
loads (like the Vpp input of an EPROM based PIC?))  Inductors give you
variable voltage with PWM ?

BillW

2000\03\23@222138 by Dan Michaels

flavicon
face
At 02:14 AM 3/24/00 +0000, you wrote:
>> The effective output resistance of the pump is about 500 ohms
>> @ Vout = 13v. I guess this sounds about right, as 13v/500ohms
>> = 26 mA, which is the max current in/out of a PIC I/O pin. I
>> ran the PWM at 78 Khz, and it doesn't seem to matter if the
>> pumper (lifter, flying?) caps are .1 or 10 uF.
>>
>> I checked the programming spec, and it indicates Ipp = 50 mA,
>> so this ckt would certainly be hard pressed to handle that.
>> However, it could still provide power to drive external analog
>> CMOS circuitry, and I am sure I can get it to produce -V
>> simultaneously with +V.
>
>
>Well if you generate 13v with 500 ohms output, and want the voltage
>to always stay above say 12V, you can't draw more than 2mA from it.
>If you draw the whole 26mA, the output voltage is 0V, which is
>certainly not enough to program an EPROM cell.
>

Marc,

Exactly my point, and the same which BillW and Wouter implied
earlier in the day. This ckt can't handle EPROM cell programming,
as is.

But it could supply power for CMOS circuitry, be modified to
gen both + and - voltages, and add only $0.25-0.50 in cost
to an embedded system, so it's actually quite useful.

- Dan Michaels
Oricom Technologies
http://www.sni.net/~oricom
==========================

2000\03\23@225607 by Dan Michaels

flavicon
face
At 06:07 PM 3/23/00 PST, you wrote:
>Can you generate a variable voltage with a capacitive multiplier and
>PWM?  My intuition says that PWM into a capacitor gives you sort of
>variable output current at a fixed voltage (at least for non-constant
>loads (like the Vpp input of an EPROM based PIC?))  Inductors give you
>variable voltage with PWM ?
>
>BillW
>

BillW,

Your intuition about PWM into a capacitor exactly matches my
conclusions after fiddling with the charge pump on the bench
the other day. Provided the cap isn't too large a value, it will
fully charge to the voltage placed across it, ie, 5v - 0.7v (for
diode) in the time allotted (1/78 Khz). However, the "effective"
current you can get out of the pump will be proportional to
(PWM duty cycle * max current from the pin). So PWMing this way
actually modulates the pump output current, rather than the pump
output voltage. Not very useful. [I didn't test this directly,
but infer this from my fiddling].

In the case where I produced a variable Vpp, I charged the 1st cap
in the pump chain directly off the PWM thru a 100 ohm resistor.
This way, the PWM duty cycle sets the average voltage the 1st cap
charges to, and ultimately the Vout of the pump. I presume
[but didn't measure it] that the effective pump current will be
about the same as before.

It would probably take 3 pins to do a decent job at variable Vpp.
One PWM to control V, and 2 running at 50% duty and opposite phase
to provide boost. But still you should be able to can get both +V
and -V out of this with the same #of pins [haven't tried it yet].

Separately adjustable +V and -V would require 4 pins, ie, 2 PWM
plus 2 opposite phase boosters.

If you wanted to use closed loop FB via A/D to keep the Vouts
constant with changing load, you'd need to go this last route
with 2 PWMs, so 6 pins total.

Lastly, your intuition about inductor response vs cap response,
viz-a-viz PWM, sounds accurate.

regards,
- Dan Michaels
==============

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...