Continue to Site

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.

  • 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

Status
Not open for further replies.

camerart

Well-Known Member
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
 
Yes, providing that whatever is connected to them does not load the programming signals during programming.

Les.
 
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.).
 
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
 
Just be aware that the chips that the CS pins are controlling will get randomly selected during programming.

Mike.
 
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
 
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.
 
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.
 
Hi,
Thanks for the comments, all noted.

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

Thanks, C.
 
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.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top