PDA

View Full Version : Elegant "in circuit programming"



Ted's
- 28th August 2008, 00:01
Is there a schematic for elegant "in circuit programming" being adaptable to several pics?

Elegant meaning:

- you have a modern plug and socket, like usb. As soon as you plug the usb-plug into the socket of the device, all other device's connections that could interfere are blocked electrically. So you plug it in, transfer your program, remove the plug and as soon as the device has voltage applied to it, the "in circuit programming" circuit is blocked and the pic can do it's work.

bcd
- 28th August 2008, 01:25
How about a 4 pole minijack like the ones Sony use to get audio and video out of a camcorder.
Use the break contacts to disconnect the circuit with the jack handling MCLR, PGM, PGC and Gnd.

Might work - need to power you circuit from somewhere though. Hmm - maybe I didn't think that through very well.....

I just use a 5 way SIP header and a couple or resistors and a diode to stop 12v going back into V+ from MCLR line.

bill.

Ted's
- 28th August 2008, 03:34
One should use at least mosfets, opto-couplers or transistors to electrically protect the circuit from the programming circuit.

bcd
- 28th August 2008, 14:01
I tend to design things so I have LEDs for status on the pins that are used for ICSP CLK and DATA lines. This way I can also see that the ICSP is being programmed.

The MCLR lines are normally tied to +5 using a schottky diode with the MCLR from the ICSP to the Processor side of the diode. This prevents 12v from getting back to the 5v side.
Microchip has some ICSP app notes where they use a resistor for MCLR isolation, but it doesn't feel right to me to do it that way..

I also have a diode to isolate the +5v supply to the pic so it can be powered by the programmer, but the programmed doesn't power up the whole board. On a few designs where I know there is not much on the 5v rail I will normally just tied the ICSP 5V to the PIC 5v. I don't tend to have the board powered when programming other than through the ICSP port.

I use a PicKit2 for all my ICSP work and it can provide power to the circuit with control independant of the programming functions. A very handy feature.

Ted's
- 29th August 2008, 22:15
Do you also agree that you misunderstood me?

bcd
- 30th August 2008, 04:44
I'll agree that something is getting lost somewhere - what exactly have I missed ??

bill.

Melanie
- 30th August 2008, 08:59
One should use at least mosfets, opto-couplers or transistors to electrically protect the circuit from the programming circuit.
Why? However, if you are suggesting using the above components (that's a pretty authoratative statement), maybe you know something we don't, so share with us...

In the meantime, do a forum search... it's all been discussed before... and in some threads you'll even find some schematics... eg Post #14 on this thread...

http://www.picbasic.co.uk/forum/showthread.php?t=516

People give you suggestions here, things they use, things that work for them. You can do what works for them, you can take the idea and create something of your own, or you are free to do something completely different. But hey, let's not post a detailed specification and shoot people down when they don't meet it exactly!

Acetronics2
- 30th August 2008, 09:18
Is there a schematic for elegant "in circuit programming" being adaptable to several pics?

Elegant meaning:

- you have a modern plug and socket, like usb. As soon as you plug the usb-plug into the socket of the device, all other device's connections that could interfere are blocked electrically. So you plug it in, transfer your program, remove the plug and as soon as the device has voltage applied to it, the "in circuit programming" circuit is blocked and the pic can do it's work.

Hi, Ted's

I think I already have some kind of that on my Mikroelektronika EasyPic 5 ....

Just paste it !!!

All the doc. is downloadable from their site ...


BTW, your idea Also has a strange taste of ... Bootloader !!! don't you think ???


Alain - Hot water future discoverer.



PS: Question for a Very High School exam : ( serious joke ! )

Q : How do you proceed for making tea ???

A: I take a water pan, let it boil , place the tea leaves into the tea-egg, drop the egg in the water, let it a moment in and serve ...


Q: Ok ... fine. Now, suppose you already have boiling Water ... how do you proceed ???

A: Quite simple: I let the water cool , ... then go back to the previous problem.

Q: ....

Ted's
- 30th August 2008, 17:24
Why? However, if you are suggesting using the above components (that's a pretty authoratative statement), maybe you know something we don't, so share with us...
@bcd and @Melanie: My idea is to connect the bases of a series of transistors (or gates of a series of mosfets for that matter) via resistors to vdd of each circuit that should be separated. So a set of 5 items is necessary for each circuitry. So as soon as voltage is applied the right connection is open. I asked myself whether it is better to use a whole chip (which name?) or a series of transistors or mosfets or even opto-couplers. Whereas I do not know whether programming of a pic is partly analogue so opto-couplers might not work.


it's all been discussed before...
This is exactly what I presume. Every mp3-player must contain a similar circuitry - basically every plug and play device.


http://www.picbasic.co.uk/forum/showthread.php?t=516
That does not deal with the issues occurring when the pins needed for programming are used in the circuitry serving the pic aswell.


People give you suggestions here, things they use, things that work for them. You can do what works for them, you can take the idea and create something of your own, or you are free to do something completely different. But hey, let's not post a detailed specification and shoot people down when they don't meet it exactly!
Melanie, I am sure you want me to treat you with respect. If so, don't give me advice if not asked for it in general.


I let the water cool , ... then go back to the previous problem.
Nice. I like it because in some situations it is the right approach and in others...

mackrackit
- 30th August 2008, 19:17
Melanie is the ADMINISTRATOR of this forum and the most knowledgeable person you will find here. Any advise she gives about the usage of this forum or PICs, you can bet is right on the money. It would be a good ida to take it.

Here is a suggestion from me.
Take some electronics classes if you do not like the advice given on this forum.

But most of all take SEVERAL classes in manners.

You will benefit greatly.

Acetronics2
- 30th August 2008, 21:38
Hi, Ted's

I just wonder what your bunch of Mosfets will really do ...

due to their own reverse diodes included ???

Good question ehhhhh ???

Alain

Acetronics2
- 30th August 2008, 21:53
Hi,

Could someone explain to me ...

I was posting about the interesting behaviour of Mosfets in such use ...

Then, when sending, a message shortly appeared talking about administrators ... that I had not enough time to read.

seems the ted's previous message has been taken off ... but mine was not offending at all !

Alain

Darrel Taylor
- 30th August 2008, 21:56
Sorry Alain!

You were replying to a post that got moderated, so it moderated yours too automatically.

We were doing it at the same time.

I will undo the automatic part.
<br>

T.Jackson
- 31st August 2008, 05:07
Melanie, I am sure you want me to treat you with respect. If so, don't give me advice if not asked for it in general.

I think we all need a definition of respect from you Ted.

I'd be careful about saying things like that to people, especially a girl, some people around here with money may end up putting a head on you.

Trent Jackson

rmteo
- 31st August 2008, 20:25
Darrel, thanks for doing what you did.

Darrel Taylor
- 31st August 2008, 23:42
It's the only part of this job I really don't like.
But sometimes people go way beyond the acceptable.

Nothing more I could do.

At any rate, I think this thread's done.