1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

ICD2 Compatable + PCB layout

Discussion in 'Microcontrollers' started by William At MyBlueRoom, Jun 29, 2006.

  1. William At MyBlueRoom

    William At MyBlueRoom New Member

    Joined:
    Feb 28, 2006
    Messages:
    721
    Likes:
    1
    Location:
    Toronto, Canada
    It's a beautiful looking board, what's the cost I wonder. I have a Hong Kong connection if you need to contact him. I assume that's a 18F4550 on the left.

    What USB driver did you use with the 18F4550? I tried the Microchip driver but no go.

    PS he's got a 16MHz xtal on the left IC, most use either 20 or 24 MHz for USB. And what's the multiturn pot for?

    PPS I've left the error LED off my design, never seen it lit. What sort of errors is it for?
     
    Last edited: Jul 5, 2006
  2. William At MyBlueRoom

    William At MyBlueRoom New Member

    Joined:
    Feb 28, 2006
    Messages:
    721
    Likes:
    1
    Location:
    Toronto, Canada
    Lots of the 40 pin 16F877 holes aren't used, don't drill just cut the socket leads :)
     
  3. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Yes, that'll be an 18F4550 on the left.
    I've got an 'image' of the ICD2 '4550 bootloader + OS from the chaps on EDABoard.
    The 20-MHz xtal is used for both the '4550 and the '877A. That 16-MHz xtal and trim pot is probably being used for the little 8-pin VPP chip at bottom left (I'm guessing).
    I don't know. I left it off my Serial ICD2 too since the ICD2 tab in MPLAB always tells you when there's an error.

    I'm trying to see how small I can make my USB-ICD2 board. This (below) is just a test layout and that's why it looks like crap. All ground connections are on the hidden top ground plane layer. I'm using the USB LED as a power LED (it seemed redundant to have both). I still need to hook up a few transistors, a VPP generator of some sort, and an ISP connector.

    The picture is of one chaps USB clone (on EDABoard) and I have the complete project file, single sided PCB artwork, and hex files if you need them.
     

    Attached Files:

    Last edited: Jul 5, 2006
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. William At MyBlueRoom

    William At MyBlueRoom New Member

    Joined:
    Feb 28, 2006
    Messages:
    721
    Likes:
    1
    Location:
    Toronto, Canada

    Yes Mike please post or email all the files for the new USB version.
     
  6. mramos1

    mramos1 Active Member

    Joined:
    Sep 15, 2005
    Messages:
    2,403
    Likes:
    9
    Location:
    Boynton Beach, Florida USA
    Post would be nice. :)

    Did not get to drilling the board, wound up doing a Windows GUI project that ran longer than planned.
     
  7. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Hi Guys,

    Here's the files for user PiCS's through-hole USB ICD2 project including schematic/pcb file (pdf) and the two hex files.

    Mike
     

    Attached Files:

    Last edited: Aug 6, 2006
  8. jcdup

    jcdup New Member

    Joined:
    May 4, 2006
    Messages:
    7
    Likes:
    0
    Location:
    South Africa
    William,

    Thanks for the Inchworm details. I built it on strip board-- too lazy to make a pcb.

    Initially Mplab lost connection with it often and lots of operations failed. To test the hardware I loaded the PIC (16F877) with a LED blinking program which did not run. However, sometimes when I touched the board or a component it would run. Initially I thought the oscillator was not running but it turns out that MCLR was not held high. After adding a 10K resistor between MCLR (pin 1) and +5V Mplab now connects and I succeeded in downloading the OS to my Inchworm.

    I'm not sure whether it is the Inchworm design, or simply a peculiarity of my board, but I thought this might help someone else.

    Thanks again :) :D

    Johann
     
  9. William At MyBlueRoom

    William At MyBlueRoom New Member

    Joined:
    Feb 28, 2006
    Messages:
    721
    Likes:
    1
    Location:
    Toronto, Canada
    Glad to hear you got it running, :) it's a great tool and decent programmer. I've noticed that too that some serial ports may not pull DTR (rs232 pin 4) high. The inchworm is based on the many common ICD2 designs on the web, and I've not seen any with the pullup. Many use a single 5.1V zener for D8 and omit D7. I avoided all zeners in the inchworm, for some people they're hard to find.

    I'm working on an assembly manual for the retailer that wants to carry it. I'll make a note about adding a 10K pullup as it should hurt the design.

    I originally wanted to add a JDR bootloader to the design. So you could program the 16F877 bootloader in the inchworm then switch off the JDR mode. Although in such a modest design I wanted to keep the costs very low.

    Maybe for the next inchworm 2...

    Did you handwire or make a pcb?
     

    Attached Files:

    Last edited: Jul 10, 2006
  10. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    I used the zener on my serial clone and have not experienced that problem (having only used it on 6 or 7 different computers).
     
  11. jcdup

    jcdup New Member

    Joined:
    May 4, 2006
    Messages:
    7
    Likes:
    0
    Location:
    South Africa
    I did not create a pcb, but built it on strip board (vero board?).

    Thanks again.


    Johann
     
  12. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,203
    Likes:
    640
    Location:
    Derbyshire, UK
    Do you have a picture of it?.
     
  13. jcdup

    jcdup New Member

    Joined:
    May 4, 2006
    Messages:
    7
    Likes:
    0
    Location:
    South Africa
    Successfully programmed and debugged a PIC16F819 last night. I got a few framing errors on verification but I think it is my serial cable as it succeeded if I retried.

    I stilll have to add a connector for the power supply and cut the lid for the target connector.

    Cheers

    Johann
     

    Attached Files:

  14. William At MyBlueRoom

    William At MyBlueRoom New Member

    Joined:
    Feb 28, 2006
    Messages:
    721
    Likes:
    1
    Location:
    Toronto, Canada
    That's awesome jcdup. Nice work. Try removing unsoldering 1 lead of the the 10K mclr resistor you added, it should still work with mplab (not sure if it's loading the DTR line)
     
  15. mramos1

    mramos1 Active Member

    Joined:
    Sep 15, 2005
    Messages:
    2,403
    Likes:
    9
    Location:
    Boynton Beach, Florida USA
    FYI: Drilled the inchworm PCB last night. Will start stuffing it tonight. I need to get an 877 on the way..

    Has a couple little drill slips getting back into it. But all can be fixed.
     
  16. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    This from MPLAB ICD2 Release Notes in my MPLAB 7.40 installation;

    They dissallow powering the ICD2 from the Target board. Not sure if that's important or not.

    I think a Target VDD switch (2N3906, 2N4403, 2N2907A, etc.) may be important to have in your design (if it isn't too late). I used a P-channel MOSFET on my clone.

    Mike
     

    Attached Files:

    Last edited: Jul 12, 2006
  17. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Mramos1,

    Bravo. Glad to hear you're makin' progress. Email me. I can probably post you an '877A tomorrow with the bootloader installed, as well as the other few silly one-off parts you might be missing to complete that puppy.

    Mike
     
  18. jcdup

    jcdup New Member

    Joined:
    May 4, 2006
    Messages:
    7
    Likes:
    0
    Location:
    South Africa
    Thanks William. I will revisit that pull-up register on MCLR, but for now I'm just happy that it works :D

    Cheers

    Johann
     
  19. jcdup

    jcdup New Member

    Joined:
    May 4, 2006
    Messages:
    7
    Likes:
    0
    Location:
    South Africa
    Thanks Mike for the VDD switch shematics. It should be easy to add this to my strip board. It looks like RA4 is active low. I could also add an LED to this to then indicate whether power is being provided to the target or not.

    Once this one's done I'm planning to build the USB ICD2 clone as described on edaboard.com.

    Cheers

    Johann
     
    Last edited: Jul 12, 2006
  20. mramos1

    mramos1 Active Member

    Joined:
    Sep 15, 2005
    Messages:
    2,403
    Likes:
    9
    Location:
    Boynton Beach, Florida USA
    Thanks Mike,

    I will pull the schematic today and start a parts list. See if there are parts I might have missed.. Will shoot an EMAIL..
     
  21. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    You're very welcome Johann.

    You're correct, RA4 is active low.

    Please note that you should probably move the top of resistor R3 (4K7) over to the Target VDD pin on the ICSP connector if you install the Target VDD switching circuitry. This way the Target VDD ADC will truly be reading Target VDD wether it's being supplied from the Target board or the ICD2.

    Good luck on your upcoming USB-ICD2.

    Take care. Have fun. Regards, Mike
     

Share This Page