|

-HOME

try to translate this page in english
using google
Electronic
-PIC18F1XK50 programmer
-Lavorare con le EPROM
-Bromografo
-WalPIC
-FMSUSB
-Regolatore di velocità con PIC
-VMixer con PIC
-Caricabatterie
NiCd
Programming
-How to correctly free ADOX CatalogClass in C#
-Visual Basic migration tool bug
Tools
-PortRedirector
Modelism
-Zagi12
-Gaggioplano
-Subaru
Impreza
-MicroJet
Robocup
-Golemteam
Home

Scrivimi
(Attenzione: inserire la parola NOSPAM nell'oggetto. In caso contrario l'email sarà eliminata automaticamente!)
Write me
(Warning: insert the word NOSPAM in the subject otherwise the email will be automatically erased!)
Last updated
10-Oct-2009
Site statistics by:
http://bbclone.tuxfamily.org/
http://www.countmypage.com/
Sito realizzato da:
Site realized by:
Walter Zanette
Se vi piace il mio sito e volete fare una donazione:
If you like my website and you want to make a donation:
|
PIC18F14K50 and PIC18F13K50 programming using ICD2
(please take a moment to visit my sponsors at the bottom of the page)
Since you reached this page you probably know that Microchip PIC18F1XK50 and PIC18LF1XK50 family can't be programmed using the direct connection with the ICD2 because the data and clock pins of those devices does not support 5V level. This is because those pins are shared with the USB differential lines that are driven at a 3,3V.
Another issue is that the ICD does not allow to power the target circuit with 5V since it is aware of the issue here over explained.
So to use ICD2 to program those devices we definitively need to overcome two issues:
1) Use the correct voltage level to avoid damage to the USB/Programming lines
2) Force ICD2 to power the target circuit
Solution to issue #1:
The simple schematic reported here explains how i solved this issue. ICSP is the connector of the ICD2 programmer, and USB-PROG has the same pinout of the standard USB connector plus pins 5 and 6 for connecting the external shield.

On each data line the two 1N4148 diodes in series with one diode in parallel with reverse polarity causes a voltage drop around 2V in the ICSP->PIC direction and around 1V drop in the opposite direction. In this way both PIC's and ICD2's maximum level and ViH are respected. The MCLR line must be connected with an additional connector to the MCLR line of your target circuit.
Solution to issue #2:
To force ICD2 to power the target circuit you must find the file icd2.xml located in your MPLAB installation folder: <PROGRAM FILES>\Microchip\MPLAB IDE\ICD2.
Open it with a text editor and find the section (or the one related to the device you are interested in):
<icd2:part id="PIC18F14K50">
<icd2:fw id="16"/>
<icd2:cont id="18Fv2"/>
<icd2:family id="0x94"/>
<icd2:debugexec id="DE_ICD_v2.hex"/>
<icd2:debugset id="DS_18F"/>
<icd2:memaccessblock id="MA_18FEGG"/>
<!-- <icd2:testcal use=""/> -->
<icd2:icdpower allowed="false"/>
</icd2:part> |
and change it as following:
<icd2:part id="PIC18F14K50">
<icd2:fw id="16"/>
<icd2:cont id="18Fv2"/>
<icd2:family id="0x94"/>
<icd2:debugexec id="DE_ICD_v2.hex"/>
<icd2:debugset id="DS_18F"/>
<icd2:memaccessblock id="MA_18FEGG"/>
<!-- <icd2:testcal use=""/> -->
<icd2:icdpower allowed="true"/>
</icd2:part> |
Save the file, start MPLAB, and the game is done! Really simple... isn't it?
Have a nice fun!
|