Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Can I add this to my PIC device to support ICSP?

Status
Not open for further replies.

ericmar

Full Member level 5
Joined
Apr 14, 2004
Messages
278
Helped
3
Reputation
6
Reaction score
4
Trophy points
1,298
Location
Singapore
Activity points
2,928
icsp mode

Hi all,

Is it possible for me to combine the circuit in https://www.olimex.com/dev/images/pic-pg1-sch.gif with my PIC device so that I can program my PIC directly? I got serial communication in my original circuit, so is it mean I'll need to share the RS232 transmit line when I combine both this circuit with my original circuit?

It was stated in https://www.olimex.com/dev/pdf/pic-pg1a.pdf that MCLR should not be directly connected to Vcc as programmer try to rise MCLR to 13VDC to enter in programming mode. So wat should I do if my original circuit connects the MCLR directly to Vcc?

****************
I'hv an idea but I'm not sure if this will work or not. I was thinking that maybe I can add a switch or relay and whenever I want to do ICSP, all I need is to activate the switch and turn on the ICSP circuit. Am I on the right track?
/****************
Question and answer merged into one post.
Cluricaun


Thanks a lot!

Regards,
Eric
 

picgoto

the mclr signal will not be a problem,you have to conect it to 5v through a series of 1n4148 diode + 1k resistor,so when the 13v are present,the diode blocks the 13v flow to vcc,and you can do icsp...but if you need the rs232 simultaneously,that's another story....
 

maneco said:
the mclr signal will not be a problem,you have to conect it to 5v through a series of 1n4148 diode + 1k resistor,so when the 13v are present,the diode blocks the 13v flow to vcc,and you can do icsp...but if you need the rs232 simultaneously,that's another story....
Hi,

Wat do u mean by another story if I need the RS232 simultaneously? Wat if I plan to stop all the operations which are supposed to be processed by my PIC device when I'm going to do ICSP? Is it workable?
 

It's possible
by use zener diode.
Zener diode will protect PIC goto Programming mode.
(limited voltage)
If you open circuit you can goto ICSP mode

you should add a 100 ohm resister between RS232 and MCLR
you may need to power off MAX232 befor goto ICSP mode
 

metao said:
It's possible
by use zener diode.
Zener diode will protect PIC goto Programming mode.
(limited voltage)
If you open circuit you can goto ICSP mode

you should add a 100 ohm resister between RS232 and MCLR
you may need to power off MAX232 befor goto ICSP mode
Why do I need to power off MAX232?
 

Why do I need to power off MAX232?

Sometime pull up/down in MAX232 make error (from voltage devided)
in some sensitive circuit.
But I think this schematics of ICSP is no effect
 

maneco said:
the mclr signal will not be a problem,you have to conect it to 5v through a series of 1n4148 diode + 1k resistor,so when the 13v are present,the diode blocks the 13v flow to vcc,and you can do icsp...but if you need the rs232 simultaneously,that's another story....
How exactly is the 13V going to flow? From where to where?
Can u teach me how to connect those 1N4148 and what value of resistors do I need for the connection?

Thanks!
 

metao said:
It's possible
by use zener diode.
Zener diode will protect PIC goto Programming mode.
(limited voltage)
If you open circuit you can goto ICSP mode

you should add a 100 ohm resister between RS232 and MCLR
you may need to power off MAX232 befor goto ICSP mode
I dont understand ur diagram. And why should I add a 100 ohm resister between RS232 and MCLR? Which pin of RS232 do u mean?

Notice that there is one pin which connects to the TXD of RS232 so wat happen if the circuit is not operated under ICSP mode and there is some data being transferred to PIC? Will the data be transfer correctly to the PIC or will cause some data loss due to the sharing pin of TXD?

Thanks a lot!
 

I dont understand ur diagram. And why should I add a 100 ohm resister between RS232 and MCLR? Which pin of RS232 do u mean?
R 100 ohm for limit current (VPP 13v) flow to gound.
if you don't add this R it may damage your serail port from over current.
8)
Notice that there is one pin which connects to the TXD of RS232 so wat happen if the circuit is not operated under ICSP mode and there is some data being transferred to PIC? Will the data be transfer correctly to the PIC or will cause some data loss due to the sharing pin of TXD?
I am not sure. But i think it ok because Serial ICSP circuit is not draw
a lot current to drop voltage. :roll:
 

Is it ok to connect a circuit with ICSP circuit all the time except that the PGM/RB3 and TXD line are not connected when the circuit is turned on?

I'hv been thinking using a relay to open-circuit the PGM/RB3 and TXD line during normal operation (ie. device is turned on) and short-circuit them when it's in ICSP mode. If this can work, then ICSP can only be done when the device is OFF. We cant do ICSP when the original circuit is operating, am I right?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top