Dev 3 Board with flying leads as in circuit programmer

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
Mark
Posts: 209
Joined: Thu Oct 19, 2006 11:46 am
Location: Bakewell, UK
Has thanked: 20 times
Been thanked: 16 times
Contact:

Dev 3 Board with flying leads as in circuit programmer

Post by Mark »

I have seem that Rapid sell a board that can be used to jump using flying leads from a PICSTART Plus programmer so as to perform in-circuit pic programming.

Again as Flowcode interfaces seamlessly with the v3 Dev Board , whereas my PICSTART Plus does not, is there any reason you can see why the v3 Dev Board (or the e-block programmer board) cannot be used for in circuit (off board) programming?

If the above is realistic please consider selling a converter e-block to do this.
Go with the Flow.

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

Mark,

We've used the dev board (and the EB-006 multiprogrammer) as in-circuit programmers in this way before.

We have not made an adapter because it is quite easy to make one yourself:

* Take the "slave" PICmicro out of the board
* Disconnect the power supply from the dev board
* Disconnect the power supply from your target board
* Connect wires from the dev board to your target board. These pins need to be connected:
  • - Vdd
    - GND
    - MCLR
    - PGD (RB7 / GP0)
    - PGC (RB6 / GP1)
* Connect power & USB to the dev board
* PPP (or 'configure' in Flowcode) should be able to autodetect your chip
* Program as normal

From the dev board, you can connect either from the right-hand 40-way expansion header or from one of the DIL sockets (solid-core wire fits nicely into the DIL socket holes).

Make sure the circuitry connected to your slave's PGC and PGD is as "clean" as possible (it is best to isolate the external circuitry as much as possible).

Of course, there is always a danger of damaging something on the dev board if you connect your own circuitry directly to the DIL sockets - this will void your warranty, so only do this if you understand the risks.

More info on in-circuit serial programming of PICmicros can be found on the Microchip website here:

http://ww1.microchip.com/downloads/en/A ... 00910a.pdf

Look specifically at the "CONSIDERATIONS FOR IN-SYSTEM PROGRAMMING" and "The ICSP Hardware Protocol" sections.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hi Mark

Im afraid the E-Block connectors dont work like that. They do not carry the MCLR line for a start. Perhaps an attachment for the DIN pins would work though. You can convert the Mutrix Multimedia programmers into an in circuit programmer by connecting a few wires from the DIL socket your externl chip would have sat in. This is just botching the connection but it should work quite well.

Important - Make sure no PICmicro devices are plugged into the programmer board

The connections you need are:

VDD to External +5V
GND to External GND
MCLR to External MCLR
PDAT to External PDAT
PCLK to External PCLK

To find these pins on your microcontroller you will need to refer to the Chip diagram near the top of the datasheet.
If the External PDAT and PCLK pins are connected to other components then they will probably need to be disconnected before the programming will work.

Also if your wires are too long there will be too much interferance, resistance and the programming will fail. A good length for your wires is between 5 and 15cm unless you are using shielded low resistance multistrand cable.

Example of programming external PIC16F676
14 Pin DIL socket on MM programmer


VDD---------* 1 - *-----GND
--------------* - - *-----PDAT
--------------* - - *-----PCLK
MCLR/VPP--* - - *------------
--------------* - - *------------
--------------* - - *------------
--------------* - - *------------

Warning: Any damage caused to your Matrix Multimedia programmer via incorrect/faulty external circuitry is not covered by our terms and conditions. Do this at your own risk.

Mark
Posts: 209
Joined: Thu Oct 19, 2006 11:46 am
Location: Bakewell, UK
Has thanked: 20 times
Been thanked: 16 times
Contact:

Post by Mark »

Hi Guys,

Many thanks for this. For other readers, Figure 7 of the application note (which I was not aware of) adds a few components on to the suggested wiring.
Go with the Flow.

Mark
Posts: 209
Joined: Thu Oct 19, 2006 11:46 am
Location: Bakewell, UK
Has thanked: 20 times
Been thanked: 16 times
Contact:

Post by Mark »

I have made a jumper lead from the DIL socket to a daughter board for in circuit programming - it works well.

To provide relaible operation I needed :

Minimum 20k pull up resistor on MCLR
0.1uF electrolytic capaictor from MCLR to ground
max about 50cm ribbon cable leads

The HP-488 and multiprogrammer boards have a 10k pull up on MCLR and any pull up on a daughter board acts in parallel with this, hence the need for about 20k on MCLR.

It is also possible (and in my book preferable) to power the daughter board from its own power supply (5v). When hooked up this way, the earth connections of all boards of course need to be common.

Benj - on the e-blocks point I was meaning in the e-blocks stable of products, rather than using a 9pin DIL socket.
Go with the Flow.

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

Thanks for the info, Mark.

MarcB
Posts: 10
Joined: Thu Feb 22, 2007 2:59 am
Contact:

ICD2

Post by MarcB »

is it possible to use the ICD2 connector for this programming?

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

Not directly. If you were to do this, it may be possible, but you would need to connect the ICD2/USB jumpers in an unusual way (have a look at the circuit diagram in the datasheet to see what I mean).

Also, the Vcc line to the PICmicro slave will not be "switchable", which means that some devices may not reprogram well if they are in a certain mode (esp. if they use internal oscillator and/or MCLR).

So, it is possible. But I would recommend connecting via the DIL socket or the DIL header as discussed in this thread.

Mark
Posts: 209
Joined: Thu Oct 19, 2006 11:46 am
Location: Bakewell, UK
Has thanked: 20 times
Been thanked: 16 times
Contact:

Post by Mark »

Steve,

Your post seems to suggest that the ICD2 connector is not actually capable of working with an ICD2, since an ICD2 can reprogram and debug all via its connector?

Assuming that I am wrong (I hope I am) then I intend to update my ICD1 for an ICD2 in what I anticipate will be part of the EPE/Microchip June discount offering. My question is then:

ICD2 in hand and plugged into a HP-488 board can I seemlessly program from flowcode (as an alternative to the USB connector) or is the intention that programming is via USB and debugging via MPLAB?

Thanks,

Mark
Go with the Flow.

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

Mark wrote:Your post seems to suggest that the ICD2 connector is not actually capable of working with an ICD2, since an ICD2 can reprogram and debug all via its connector?
Mark, it's a question of the "direction" of programming. PICmicros in our board can be programmed via our USB connection or via the ICD2 socket. PICmicros in another board can be programmed (in-circuit) using flying leads from our board, but not via the ICD2 socket.

I took MarcB's question to be whether the ICD2 socket could be used as an output from our board to allow in-circuit programming.

As for your other question, MPLAB is the only Windows tool I know that can program (or debug) using an ICD2. However, there is "Piklab" for Linux systems.

The addition of the ICD2 socket to our boards was so that ASM (and other language) users could do debugging via MPLAB; Flowcode itself can't really use the ICD2. You would need to take the ASM file (or possibly the C file) generated by Flowcode and create a project within MPLAB.

Mark
Posts: 209
Joined: Thu Oct 19, 2006 11:46 am
Location: Bakewell, UK
Has thanked: 20 times
Been thanked: 16 times
Contact:

Post by Mark »

Steve,

Thanks for that. Looks like the ICD2 will be dropping off my list then.

Mark
Go with the Flow.

Post Reply