For all those people who can't read or being too lazy to get through ~60 pages of this topic
Some basic thesis :
1. If you don't have some advanced skills in electronics - don't do this project !!! (make some easier programmer)
2. If you have only multimeter & soldering iron - don't do this project !!!
3. If you don't want to debug your code via ISP - don't do this project...
Why ?
Because, for 99.99%, you'll fail...
What you should have in your equipment :
1. Good soldering iron (decent hotair for TQFP smd work)
2. Good multimeter
3. Any kind of logic analyzer, oscilloscope, etc... (it don't have to scope 20MHz signals....)
4. Reliable simple programmer for 18F PICs (Lothar's Stolz JDM (check his site), SCHAER, etc...)
What next ? :
1. Choose your project - potyo2 or some PiCS
or
1a. Get the schematics and create your own PCB (the harder way)
2. Get the parts
- Yes, there are 0.47 Ohm resistors ... (smd and thru-hole are available)
- No, you can not use 18F2550 instead of 4550 (Parallel Port is needed)
- Yes, you can solder manual potentiometer instead of MCP41010 digpot
- the inductance of VPP generator's coil may be about 100-200uH
3. Make the PCB
- using your favourite method (toner transfer or UV varnish)
-
if you created your own PCB :
- check the connections
- check them again
- now get the original schematic and check your routes again
- and again... (most errors comes from erratic layout)
4. Make vias or jumpers
- Yes, it is possible to create doublesided PCB at home with vias
- Yes, it is possible to create doublesided PCB at home with under-IC vias (you need some 0.5-0.6mm copper wire and this kind of tool : **broken link removed**)
- No, you don't have to solder the vias
- Yes, you should have 0.5mm drill in your equipment
5. Solder ICs (TQFPs and SOICs)
5a. Check shorts twice
6. Depending on your project you should program your 4550 & 877(A) now, or you can do it later
7. Solder remaining parts
7a. Check shorts and major connections (power rails for shorts, D+, D-, PSP0-7 lines, RD, CS, WR, 877_MCLR)
8. Connect to USB port
If Windoze detects it & driver installation is ok & MPLAB recognizes it clearly, download the OS & be happy - you're very lucky guy (chick
)
But, for 99.99%, something went wrong...
Troubleshooting:
1. Unknown Device :
- there may be problem with power rails - check for shorts
- there may be problem with D+,D- rails
- there may be problem with 4550 programming - reprogram it
- there may be problem with 4550 config fuses :
4550 configuration most important settings:
a) HS+PLL oscillator
b) 96MHz prescaler - divide by 5 (20MHz input)
c) CPU system clock postscaler - PLL/2 (48MHz CPU clock)
d) FullSpeed USB clock source - PLL/2
e) USB Voltage Regulator - Enabled
f) Watchdog disabled
- there is not enough of bypass capacitors (VUSB to GND)
- there is too big capacitance between VUSB & GND (10uF should be max) - check capacitors you've soldered
- of course there can be some more stupid errors...
2. If device is recognized by WinXX then the driver should be installed without problems - if not - you might have problem with your PC/windoze
3. If device is visible in Device Manager as MicrochipTools then MPLAB should detect it - if not - reinstall MPLAB, reinstall ICD2 USB drivers
4. Select ICD2 as PROGRAMMER & Setup ICD2 in MPLAB - communication:USB, DO NOT CONNECT AUTOMATICALLY, DO NOT UPLOAD OS AUTOMATICALLY !!!! (at least for the first time)
5. There should be enabled Download ICD2 Operating System command in Programmer menu - try it
- Unable to communicate with ICD or Product ID (0) - COMMUNICATION FAIL between 4550 & 877x !!! : - check PSP lines, RD, WR, CS, check 877_MCLR, check 877(A) programming, check 877(A) fuses, 877(A) power rails bypass capacitors
877(A) configuration FUSES :
a) HS oscillator
b) WDT off
c) PUT off
d) BOD off
e) LVP disabled
f) all code protection OFF !!!
- framing errors - read general problems troubleshooting (comes next in this post)
- first time you get connected ok, then after Reset&Connect you have Unable to connect : CHECK 1MCLR line - 877 isn't resetted properly by 4550
6. OS Downloaded OK, but ICD2 Self Test Failed : go into Programmer/Settings/Status
- MCLR Vdd : Low - enable Power Target from ICD & run Self Test again - if it pass then it is normal behavior
- MCLR Vdd : Low/ Target Vdd : Low - check 1RA1 line, VDD metering resistors , switching transistors (those PNP ones)
- Module Vpp / MCLR Vpp High/Low - check VPP generator for output voltage, VPP metering resistors (1RA0 line, 1RA3 line)
- MCLR Gnd : HIGH - connection problem with 1RA0 line - 1RA0 pin is floating...
GENERAL FAILURES TROUBLESHOOTING :
- check VPP generator's filtering capacitors - IT IS CRITICAL for ICD2 - if it's too low, then the spikes from generator would kill any USB & inter-IC transmittions by spreading via power lines
- scope power lines for spikes & check bypass capacitors
- recheck again for short-circuits
- reprogramm 4550 and/or 877(A) with proper HEX
- install earlier version of MPLAB (Yes, it sometimes cures the thing)
- IC's shouldn't get hot or even warm - check for shorts and check for proper voltages on terminals - if 4550 is getting warm, but ICD is working then you have not enough bypass capacitors on it's power rails... the same may be applied to 877(A)
Of course, there can be more problems, but if you can not overcome them, then you should drink some coffee and let this great programmer to be made for you by someone else...