• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Using in circuit programming PINs for I/O

camerart

Active Member
Thread starter #1
Hi,
Is it ok to use the two ICSP PINs IN and OUT (RB6 and 7) for normal use if they are used also for programming?

Camerart
 

Nigel Goodwin

Super Moderator
Most Helpful Member
#4
Yes it's fine, depending on exactly what you're doing with the pins - I often allocate a debugging serial port to them (an FTDI board connected to them doesn't affect the programming.).
 

camerart

Active Member
Thread starter #5
Yes it's fine, depending on exactly what you're doing with the pins - I often allocate a debugging serial port to them (an FTDI board connected to them doesn't affect the programming.).
Hi N,
I want to use them for chip/selects so they will be set to output.
C
 

Pommie

Well-Known Member
Most Helpful Member
#9
Just be aware that the chips that the CS pins are controlling will get randomly selected during programming.

Mike.
 

JimB

Super Moderator
Most Helpful Member
#10
As a quick an dirty solution, I often put a DIP switch so that I can simply isolate the PIC pins and the ICSP connector from the rest of the circuit.

Look at this picture:
https://www.electro-tech-online.com...tor-revisited.150114/#lg=post-1287100&slide=0
in this thread:
https://www.electro-tech-online.com/threads/dds-signal-generator-revisited.150114/#post-1287100

The DIP switch and the ICSP connector can be seen by the end of the PIC.

When I need to program the chip, I just flick the switches to the open position.
To run the program, unplug the PICKit and close the switches.
Maybe not the most efficient method, but it suits me, and I have plenty of DIP switch packs on hand.

JimB
 

dknguyen

Well-Known Member
Most Helpful Member
#11
You can, but I don't unless absolutely forced to because not being able to program a chip is a game breaking scenario. Also lets you reflash and try your code without needing to disconnect everytime and lets you use the debugger uf you have one.
 

Pommie

Well-Known Member
Most Helpful Member
#12
Whilst developing you can often use a bigger chip from the same family and use conditional code so it'll compile for either chip.

Mike.
 

camerart

Active Member
Thread starter #13
Hi,
Thanks for the comments, all noted.

I'll try direct connections, then remind me if I report problems please.

Thanks, C.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
#14
Hi,
Thanks for the comments, all noted.

I'll try direct connections, then remind me if I report problems please.

Thanks, C.
As most of us have said, it's perfectly OK to use the programming pins for I/O, as long as you're careful what you connect them to - as I've already mentioned, I often use them as serial I/O for debugging purposes - an FTDI module connected to them doesn't upset the programming, nor does the programming upset the FTDI.
 

Latest threads

EE World Online Articles

Loading

 
Top