Friday 26 July 2013

3 Ghz counter and power detector build Part II Troubles programming the Dsp

When I populate a new pcb I first solder the chips with the smallest footprints.
Next in order are the bigger ics and power supply chips.

Then I make a break and program the controller.
To program a Pic chip you just need the chip, some decoupling capacitors a pullup resistor  on the reset line and the three programming data lines MCLEAR (reset line),PGC,PGD.
Usually pic chips are super easy to program, compared to the Atmel Avr line they even don't need an oscillator.

So with high hopes I started  the Microchip ide Mplab, connected the programmer to the board (using pogo pins to avoid solderin a connector) and clicked the connect menu entry.


Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
ICDWarn0020: Invalid target device id (expected=0xF0F, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
... Failed Self Test.  See ICD2 Settings (Programmer->Settings) (status tab) for details.
MPLAB ICD 2 ready for next operation

Hmmmm
At least one head scratching hours later, no difference.
The Dsp chip simply told me in this working environment we ar on strike, go f*** yourself.
Now what to do if a processor is in working refusal ?
The best way is to negotiating with their local labour union boss, the datasheet.
In a good datasheet there is often a minimal working environment section and voila there is a strange pin number 7 called Vcap/Vdcore.

Hmmmm

After further reading I understood the internal core runs on 2.5V and to avoid an extra power line the chi provides an internal regulator which needs a decoupling capacitor.

Next try:

Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
Target Device dsPIC33FJ32GP204 found, revision = Rev 0x3006
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 ready for next operation
Programming Target...
...Validating configuration fields
ICDWarn0046:  Because clock switching is enabled, MPLAB ICD 2 requires the user to cycle target power after a program operation.
...Erasing Part
...Programming Program Memory (0x0 - 0x54FF)
Verifying...
...Program Memory
...Verify Succeeded
...Programming Configuration Bits
.. Config Memory
Verifying configuration memory...
...Programming succeeded

BOOOOOM
Success, the chip is now programmed.
Now that was some heavy lifting , usually troubles appear from the most unexpected direction.

Time for some pictures:
Dsp processor

PLL chip very small footprint

 Log Power measurement , Cpld and Pll chips

Links:
3 Ghz counter and power detector build Part I
Elektor project page

No comments:

Post a Comment