. I guess after trying to program with ICD 2 I must have depleted the batt. It never occured to me to check the batt ( HydriMax NiMh 4.8 4200 mAh !!! ) :(( . Apologies for the trouble.
Morli,
In one of your posts you saidThat seems too low to me. I think your voltage for programming needs to be higher.
"MP Labs IDE detects the device and reads 3.88v on the UDB3 also"
Your on board voltage for the UDB3 at the dspic, as measured by the MPLAB IDE should be around 4.35V when the UDB3 is powered from an external source (like a 5V Ni Cad battery). For the newer UDB2, it should also be 4.35V. For the very old UDB2's which had a different LDO regulator, the voltage should be measured by the IDE as close to 5V. (The later UDB2s used a slightly lower voltage of 4.35V to make the UDB2 more compatible with the PWM signals from a wide range of radio receivers).
My advice would be a mixture of the previous posts and that is:-
1) First check the continuity of your cable from the pickit 3 to the ISCP connection on the UDB3 or 2. Check all 6 sub cables.
Make sure everything is connected the correct way around. It is easy to reverse that connection.
2) Unplug all servos the from the UDB3 or UDB2 and also the receiver.
3) Now power the UDB3 or UDB2 from the Pickit 3 with 5V delivered from the programmer (not a battery).
( When you power from the battery, normally, the power to the dspic will be 4.35V because it is regulated by the LDO regulator).
When you provide power from the programmer, the dspic voltage will be raised higher to 5V and sometimes this can unstick a dspic. ( I have experienced that).)
4) Attempt to program your UDB3 or UDB2.
I do not power a UDB2 or UDB3 with servos are attached from the PickKit2 / Pickit3 or Olimex ICD2. The power will
arrive on the dscpic power supply as 5V, and then run back through the LDO regulator to the servos. This then puts a lot of reverse power through the LDO, and it was not designed for that.
In general, the correct way to program is to power up the UDB2 or UDB3 from it's own battery, and then program the board from the Pickit3, Pickit2 or ICD2. However sometimes, if a board gets stuck and will not program, it's worth trying to power the UDB2/3 from the programmer, as this ensures the dspic is running at 5V (rather than 4.35V). The higher voltage sometimes seems to unstick the programming of the firmware. Once that is cleared, you can return to using the battery for powering during programming as usual.
Best wishes, PeteOn Sat, May 28, 2011 at 4:18 PM, Tom Pittenger <magi...@gmail.com> wrote:
Are you programming with servos attached? If so try unplugging them.
On May 28, 2011 7:24 AM, "Murali- VU3MUV" <vu3...@gmail.com> wrote:
> On Sat, May 28, 2011 at 7:15 PM, Netfoot <net...@gmail.com> wrote:
>
>> Are you setting MPLAB to power the circuit from the PICkit3?
>
>
> Hi Netfoot,
> Nope, I use external batt to power the target device ( UDB). The option to
> power via MPLab does not seem to work, if this option is enabled then UDB (
> target device ) is not detected. I use laptop( win 7) but I have tried
> regular PC too just in case which has XP.
> Morli
>
>>
>> On Sat, May 28, 2011 at 5:19 AM, Murali- VU3MUV <vu3...@gmail.com> wrote:
>>
>>> Thanks Ric,
>>> I connected as adviced. However I am getting below said error, is there
>>> any thing I am missing?!! Correct device is selected ( is selected by
>>> default)
>>>
>>>
>>> PICkit 3 detected
>>> Connecting to PICkit 3...
>>> Running self test...
>>> Self test completed
>>> Firmware Suite Version...... 01.26.52
>>> Firmware type......................dsPIC30F
>>> PICkit 3 Connected.
>>> Target Detected
>>> Target Device ID (00000000) does not match expected Device
>>> ID (01010000).
>>>
>>>
>>> I have selected the correct device "dsPIC30F4011 " , I tried
>>> programming UDB 2 and 3 , both cases I get the same error when tried to
>>> program :((
>>>
>>> PICkit 3 detected
>>> Connecting to PICkit 3...
>>> Firmware Suite Version...... 01.26.52
>>> Firmware type......................dsPIC30F
>>> PICkit 3 Connected.
>>> Target Detected
>>> Target Device ID (00000000) does not match expected Device
>>> ID (01010000).
>>>
>>> Reading...
>>> Read Complete
>>>
>>> Programming...
>>> The following memory regions failed to program correctly:
>>> Configuration Memory
>>> Address: 00f8000c Expected Value: 00008000 Received Value: 00000000
>>> Programming failed
>>>
>>> UDB 2 was programed and flown last year successfully . Since then I have
>>> not been able to test/program/fly due to relocation to India. Recently I
>>> tried to program the board again with Olimex ICD 2 and failed. I got pickit3
>>> recently and tried programming today. It detects the device but still fails
>>> to program :(( . Any help is apreciated.
>>> I use external power to UDB and pickit3 power target option is not
>>> selected. MP Labs IDE detects the device and reads 3.88v on the UDB3 also!.
>>>
>>>
>>> I must be doing some thing wrong some where else ( my bet is Mp lab 8.66
>>> is culprit :( ) but any advice from any one is welcome and appreciated.
>>>
>>> thank you
>>>
>>> best regards
>>> Morli
>>>
>>>