Searching \ for '[PIC] starting circuits' 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/devices.htm?key=pic
Search entire site for: 'starting circuits'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] starting circuits'
2005\05\09@142200 by Paul van der Linden

picon face
part 0 44 bytes
his is a multi-part message in MIME format.
part 1 1058 bytes content-type:text/plain; charset=ISO-8859-1; format=flowed (decoded 7bit)

I'm just starting with pics, but have some question's about the circuits:

- Programming -

If I understand it good there are three ways of programming:
- HVP, LVP, self programming

If I use HVP, if I set the LVP-configuration bit at 0, I can just use
the pins PGM, PGC and PGD for digital I/O?

If I use LVP, so the LVP-configuration bit is at 1, I can use the pins
PGM, PGC and PGD for digital I/O as long as PGM isn't high at boot?

With self programming with the usb devices (18F2455/2550/4455/4550), I
can use the usb port as input to be programmed?


As far as I understand I can use the scheme attached as program.png for
LVP programming of the 18F2455/2550/4455/4550 serie (
http://home.t-online.de/home/520054661375/stolz.de.be/lvpc/index.html )?


- Application circuit -

If I understand the datasheets I can use the scheme attached as
application.png as working circuit?

Can you please send me corrections if I have it wrong, so I can start
with what I really want: cod something for it.
Greets,
Paul


part 2 11573 bytes content-type:image/png; (decode)


part 3 12265 bytes content-type:image/png; (decode)


part 4 35 bytes content-type:text/plain; charset="us-ascii"
(decoded 7bit)

2005\05\09@163030 by Jan-Erik Soderholm

face picon face
Paul van der Linden wrote ;

> I'm just starting with pics...

There is a popular page with some info for PIC beginners
here : http://www.voti.nl/swp/index.html

Maybe some of your questions are answered there...

Jan-Erik.




2005\05\09@170412 by Byron A Jeff

face picon face
On Mon, May 09, 2005 at 08:21:30PM +0200, Paul van der Linden wrote:
> I'm just starting with pics, but have some question's about the circuits:
>
> - Programming -
>
> If I understand it good there are three ways of programming:
> - HVP, LVP, self programming

And subtypes like ICSP and ICD. self-programming is generally called
bootloading.

For your next 2 questions PGC/RB6 and PGD/RB7 are always available in any
mode.

> If I use HVP, if I set the LVP-configuration bit at 0, I can just use
> the pins PGM, PGC and PGD for digital I/O?

PGM is available. There has been some discussion about if PGM needs to be
grounded during programming.

> If I use LVP, so the LVP-configuration bit is at 1, I can use the pins
> PGM, PGC and PGD for digital I/O as long as PGM isn't high at boot?

No. PGM must always be held low during execution.

> With self programming with the usb devices (18F2455/2550/4455/4550), I
> can use the usb port as input to be programmed?

Of course. The question is what happens in terms of USB being available for
the application?

Not sure on the rest.

BAJ

2005\05\09@172910 by olin_piclist

face picon face
Paul van der Linden wrote:
> If I use HVP, if I set the LVP-configuration bit at 0, I can just use
> the pins PGM, PGC and PGD for digital I/O?
>
> If I use LVP, so the LVP-configuration bit is at 1, I can use the
> pins PGM, PGC and PGD for digital I/O as long as PGM isn't high at
> boot?

I don't remember which way 0 or 1 is for the LVP configuration bit.  If LVP
is disabled, then the PGM pin is a normal I/O pin at all times.  When LVP is
enabled, then the PGM pin is always used for the PGM function.  The PGC and
PGD pins are always used during external programming (whether LVP or HVP) to
transfer the data.  Once the PIC is running they are normal I/O pins.
However, you need to make sure that the external circuit can tolerate them
being wiggled by the programmer.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\05\10@034440 by Alan B. Pearce

face picon face
>For your next 2 questions PGC/RB6 and PGD/RB7 are
>always available in any mode.

Umm, not quite Byron. These two pins are dedicated to PGC and PGD while in
debug mode so they attach to the ICD. Only on some of the high pin count 18F
devices and the dsPic devices can these be moved around in debug mode to
minimise the inconvenience.

2005\05\10@040159 by Paul van der Linden

picon face
Olin Lathrop wrote:

{Quote hidden}

Ok, thank you. But how to make sure that the external circuit can
tolerate it? How do I seperate it while programming?

And repost for the people who don't get the attachments:
http://members.lycos.nl/pvdl1984/micro.html
For the first circuit:
If I understand the datasheets I can use the scheme as application
circuit with fullspeed USB connection and eventually adding some things
like LED, buttons, enz?
And for the second circuit:
As far as I understand I can use the scheme for LVP programming of the
18F2455/2550/4455/4550 serie (as described in
http://home.t-online.de/home/520054661375/stolz.de.be/lvpc/index.html )?

2005\05\10@040304 by Paul van der Linden

picon face
Jan-Erik Soderholm wrote:

>Paul van der Linden wrote ;
>
>  
>
>>I'm just starting with pics...
>>    
>>
>
>There is a popular page with some info for PIC beginners
>here : http://www.voti.nl/swp/index.html
>
>Maybe some of your questions are answered there...
>
>Jan-Erik.
>
>
>
>
>  
>
Yes I saw that site and read it, I understand the pgd/pgc/pgm pins now I
think. But I don't know for sure if the circuits are right, can anyone
check these for me?

2005\05\10@070015 by Byron A Jeff

face picon face
On Tue, May 10, 2005 at 10:01:43AM +0200, Paul van der Linden wrote:
> Olin Lathrop wrote:
>
> >Paul van der Linden wrote:
> >
> >

[SNIP]

> Ok, thank you. But how to make sure that the external circuit can
> tolerate it? How do I seperate it while programming?
>
> And repost for the people who don't get the attachments:
> http://members.lycos.nl/pvdl1984/micro.html

That bottom programming circuit is bad news. It depends on the clamping
diodes of the PIC to limit the current. In addition it depends on a
particular style of RS-232 port to function.

It's a disaster waiting to happen. Definitely not recommended.

If you really feel you have to go that route, at least sprinkle a 4.7V
zener between each of the PIC pins connected to the RS-232 port and
ground. This will limit the voltages so that the protection diodes are
not used.

Don't expect that circuit to work with USB serial cables either as there
is no guarantee of the ability of the driver to properly drive the
serial pins.

It's just not a good idea all around.

Wouter discusses the issues with this type of circuit in the El-Cheapo
section of hiw WLoader interface here:

http://www.voti.nl/wloader

Wouter solves the problem by implementing a MAX232 interface.

BTW IMHO WLoader and others like it point to the right way to do it.
There is nothing about any type of external programmer, including ICD,
that would make me interested in using it. I developed my own line of
simple programmers for the express purpose of code dumping bootloaders.
Removing the traditional programming interface alleviates the need to
follow Microchip's pin and timing constraints. You can pick both the
hardware and data link interface when you have a bootloader.

If I were doing it (and I hope to be back into PIC work very soon) I'd
dump a bootloader onto the chip, attach a MAX232 based serial interface to
it (probably Wouter's half duplex one shown on the WLoader page), and
have at it.

BAJ

2005\05\10@081248 by olin_piclist

face picon face
Paul van der Linden wrote:
> Ok, thank you. But how to make sure that the external circuit can
> tolerate it? How do I seperate it while programming?

That is of course dependent on your circuit.  On PICs with many pins, it can
be as simple as dedicating PGC and PGD to the programming function and tying
MCLR to Vdd via 20Kohms or so.

On the other hand, this can be a serious challenge on small PICs like the
10F series.  When a PIC only has 6 pins and 5 of them are required for
programming, programming becomes a serious issue when designing the circuit.

We recently had a problem with in-circuit programming a 10F202.  The PGD
line was connected to a CMOS input of another chip, so we thought that would
be OK.  It turns out that this chip had a nasty undocumented feature where
that input is pulled to ground when the chip enable is de-asserted.
Unfortunately the chip enable was tied to PGC, so these needed to be wiggled
independently.  Fortunately in this case we can tolerate sufficient series
resistance between the 10F PGD and the other chip during normal operation
for the programmer to be able to drive the PGD line as needed, but we still
need to do another layout.  Oh well, that's why you build prototype units.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

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