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.

Audio Spectrum Analyzer with PIC

Status
Not open for further replies.
Just started to acquire all the components needed for **broken link removed** project

It's a PIC based Audio Spectrum Analyzer with LED's and dsPIC30F6012A microcontroller
I will soon intend to buy an MPLAB ICD 2 programmer for this dsPIC

I have a question thought; How to wire the PIC to ICD2, it must be on circuit or can i program directly from PIC pinouts to ICD2. The PIC must draw current from programmer. Correct if i'm wrong

I ask peoples with good knowledge in ICD2 programming but any advise would be helpful

Thanks,
 
The ICD2 is designed to program and debug the PIC in circuit, though you can also get a ZIF adapter for out of circuit programming. The project should be designed not to interfere with the ICD2's ability to control the programming pins on the PIC. It is recommended that you power the project with its own supply rather than from the ICD2. There are ICD2 clones available on the net if you want to build your own.
 
You can program a PIC with an ICD2, either in-circuit or not.

If programming out of circuit, the ICD2 has to get power from its 9V adaptor and it will power the PIC at 5V. You don't need any other components.

If you are programming the PIC in-circuit with an ICD2, you can power from the ICD2 or from the circuit.

If powering from the ICD2, the circuit must not take more than about 20 mA and must be able to tolerate 5 V

When programming in-circuit, the ICD2 must be able to send signals on the MCLR, PGC and PGD lines, so there must be nothing else driving those lines, or resistors so that the ICD2 can force the lines with the few mA drive that it has. The MCLR line can go to 13 V when programming so the circuit must be able to stand that and not hold the MCLR to lower voltages.

The PICKIT2 is much cheaper than the ICD2, does not need the 9V external supply and can supply the PIC at a range of voltages, not just 5 V. It's only downside seems to be that it has no serial port, just USB.
 
The clone i intend to buy look like **broken link removed**. It has a USB input and a 6 pin ethernet output.

If I just hook the dsPIC off-circuit to ICD2 there will be enough power for dsPIC i think
but i read that dsPIC needs to have an 10kohm resistor and a Xtal attached

I don't see a power connector on the ICD2 maybe that white connector is the aux power, i don't know i will see when i will buy it.
 
Last edited:
The crystal isn't needed for programming.

The only possible issue is if you use internal RC oscillator and use the MCLR line as an input at the same time, but I don't think that the MCLR line can be used as an input on the dsPIC30F6012A

The 10 kΩ resistor is useful to pull the MCLR line high so that the PIC runs with the programmer disconnected, but the programmer can force the line as required.

I cannot see the point of buying an ICD clone when the PICKIT2 is so cheap.
 
If decide to program the dsPIC in-circuit, i have noticed that in my project already exist a 10Kohm resistor on MCLR pin and also an Xtal in the circuit.

I plan to to this to avoid any trouble, build entire target board circuit with it's own supply. Then which pins must be connected to ICD2?

I mean all MCLR, PGC, PGD must be connected directly to ICD2 while target is powered up? What about VDD and VSS must also be connected to ICD2?

What setting must be made in MPLAB IDE for this option of programming?

Thanks for any answers
 
If decide to program the dsPIC in-circuit, i have noticed that in my project already exist a 10Kohm resistor on MCLR pin and also an Xtal in the circuit.

I plan to to this to avoid any trouble, build entire target board circuit with it's own supply. Then which pins must be connected to ICD2?

I mean all MCLR, PGC, PGD must be connected directly to ICD2 while target is powered up? What about VDD and VSS must also be connected to ICD2?

What setting must be made in MPLAB IDE for this option of programming?

You connect all the pins to the ICD2. MCLR, PGC, PGD, Vss and Vdd all need to be connected. During programming the processor is in reset so all the other pins will go high impedance.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top