+ Reply to Thread
Results 1 to 7 of 7

Thread: Audio Spectrum Analyzer with PIC

  1. #1
    adrianbodor Newbie
    Join Date
    Jul 2004
    Location
    Romania
    Posts
    42

    Default Audio Spectrum Analyzer with PIC

    Just started to acquire all the components needed for this 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,
    darks0ul (c) Beyond Apocalypse


  2. #2
    kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent
    Join Date
    Jul 2006
    Location
    Victoria BC, Canada
    Posts
    3,681

    Default

    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.
    Inside every little problem, is a big problem trying to get out.

  3. #3
    Diver300 Excellent Diver300 Excellent Diver300 Excellent Diver300 Excellent
    Join Date
    Oct 2007
    Location
    England
    Posts
    1,102

    Default

    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.

  4. #4
    adrianbodor Newbie
    Join Date
    Jul 2004
    Location
    Romania
    Posts
    42

    Default

    The clone i intend to buy look like this. 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 by adrianbodor; 10th August 2008 at 10:07 AM.
    darks0ul (c) Beyond Apocalypse

  5. #5
    Diver300 Excellent Diver300 Excellent Diver300 Excellent Diver300 Excellent
    Join Date
    Oct 2007
    Location
    England
    Posts
    1,102

    Default

    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.

  6. #6
    adrianbodor Newbie
    Join Date
    Jul 2004
    Location
    Romania
    Posts
    42

    Default

    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
    darks0ul (c) Beyond Apocalypse

  7. #7
    Diver300 Excellent Diver300 Excellent Diver300 Excellent Diver300 Excellent
    Join Date
    Oct 2007
    Location
    England
    Posts
    1,102

    Default

    Quote Originally Posted by adrianbodor View Post
    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.

+ Reply to Thread

Similar Threads

  1. Help locating NJU7505 spectrum analyzer IC
    By agent420 in forum Datasheet/Parts Requests
    Replies: 4
    Latest: 11th December 2006, 06:10 PM
  2. AM modulation and spectrum analyzer
    By rippy in forum Electronic Projects Design/Ideas/Reviews
    Replies: 3
    Latest: 7th December 2006, 12:56 AM
  3. Three Channel Spectrum Analyzer
    By baftab in forum General Electronics Chat
    Replies: 1
    Latest: 15th September 2005, 12:36 AM
  4. Audio Spectrum Analyzer on a 16F877
    By Dmax in forum Micro Controllers
    Replies: 9
    Latest: 21st February 2005, 08:41 PM
  5. Audio Spectrum Analyzer using FFT
    By joeden in forum Electronic Projects Design/Ideas/Reviews
    Replies: 6
    Latest: 21st May 2004, 05:58 AM

Tags for this Thread