Shop OBEX P1 Docs P2 Docs Learn Events
SX52 Won't Program — Parallax Forums

SX52 Won't Program

Miner_with_a_PICMiner_with_a_PIC Posts: 123
edited 2005-06-25 06:41 in General Discussion
I finally installed my first sx52 on a custom board. Unfortunately it is failing to program. I have checked checked and rechecked all connections and wiring. Especially care has been taken to connect the osc1, osc2 and rails appropriately to the SX-KEY; the MCLR is being pulled high with a 10K + I have tried holding reset upon power up and/or depressing following power-up. There has been no error that I can find so far. The SXkey initially seemed to be programming the chip, with the write progress bar reaching completion. But the very simple flash an led program did not work, I was able to reprogram another couple of times and now nothing! I get both errors; Chip connection failed and SX-KEY not found on comport. The SX-KEY is okay as I have retested it on an SX28. Does anyone have any ideas? I oriented the chip according to the indented mark rather than the text orientation. Has there been any know orientation issues with these parts? Please let me know if you have any ideas.

JT

Post Edited (Miner_with_a_PIC) : 6/24/2005 3:51:41 AM GMT

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-06-24 03:58
    Are you running your SX52 board at 5 volts?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2005-06-24 04:00
    Yes, I took a reading @ 4.98V with expected polarity. I have also double checked connections and all solder joints with an eye loop. I am out of ideas. Either the SX is defective or am am missing something. I was concerned about the orientation but I doubt this is it.

    could it be my older SX-KEY that isn't compatible with newer sx52s?

    Post Edited (Miner_with_a_PIC) : 6/24/2005 8:25:25 AM GMT
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2005-06-24 04:25
    Just a thought, but how careful were you with static/shock considerations when putting the chip in the protoboard? While handling it? I find that when I'm working on a new setup that I'm not sure is functioning I tend to handle things more than normal (checking, rechecking, etc)- so possibly it *was* working then the troubleshooting steps introduced problems?

    Ryan
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-06-24 04:28
    I don't think it's the SX-Key. Perhaps you have a bad solder joint in the connections associated with the programming connections. I know, I know, I know ... we all build our own boards perfectly (me too!) -- but the culprit is probably somewhere in the construction.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2005-06-24 05:06
    Jon, wise words...for everyone but me! I will definately be on the lookout for mistakes, I tend to make alot of those the first time around. I rarely write code that works the first time around and I doubt my board soldering/design skills would be any different.

    I doubt it is static related, I was and have been pretty cautious, I even had a 10 Mohm resistor handy to touch to the soldering iron/ground on the board. I am typically tend to be a bit overkill with those kinds of things. Additionally I have an SX28 that I have put through some really really nast shocks and even a few latch-ups. It works like a charm (of course it has been marked as: for experimental use only).

    I have been following the traces and reheating solder joints. I have even electrically verified continuity between the SX_KEY header and the upper portion of the pins (right were they disappear into the IC casing). I am really curious what happened. I don't want to desolder this chip as they are easier going in than out. I have other boards and I may load another chip on one of those to answer the question of design versus chip/fab error.

    Thanks

    P.S. I am still open to ideas
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-06-24 05:09
    What are you using for the oscillator while not using the SX-key?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2005-06-24 05:56
    I am the proud owner of two flashing LEDs!!! It appears that the first write was a little tricky on this chip. I have a very short wire interface between the SX-KEY and the target board. This has NEVER been a problem! I use this interface to reduce wear and tear on the SX-KEY, as it does get ALOT of use. Its easier just to change the wires out, which I haven't had to yet. I removed this wire and used the SX-KEY straight . It failed the first three times but showed promise, then it programmed. I wrote a couple of programs to the chip and now I am back to using the wire with no problems on this chip. This was just a freak event which may be either inherent to the part or induced by my interface adaptation during the initial write...My confidence in this particular IC (not all SX52s) is reduced. I will be monitoring it closely. Thanks for your input!

    JT

    Post Edited (Miner_with_a_PIC) : 6/24/2005 6:11:04 AM GMT
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2005-06-24 05:59
    I am using a parallax resonator @ 50 Mhz. I do have some oscillator work to do for stability, good point. But I found the main problem, sort of. See above
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-06-24 12:26
    Glad to see you figured it out.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • PJMontyPJMonty Posts: 983
    edited 2005-06-24 16:11
    Miner_with_a_PIC,

    I'm curious about the wires you use to connect the key to the board. I know things have all worked out for you, but I'm confused as to why you do this. You say the key gets "A LOT" of use, but I'm not even sure what that means. Are you constantly plugging and un-plugging the key from your board or just leaving it on a board for days or weeks at time while working on a project?

    If you are concerned about the strain of the key with a serial cable attached, just make a short ribbon cable connector to put between the SX-Key and the much heavier serial cable. Use a pair of IDC style D-Sub 9 connectors. You can get them anywhere, but here's Digikey's part numbers as a starter:

    CMP09T-ND
    CFP09T-ND

    This is the catalog page online:

    dkc3.digikey.com/PDF/T052/0025.pdf

    Make the ribbon cable about a foot long or so. It weighs so little that it won't put any strain on the key as long as you rest the heavier serial cable on the desk and not hanging over the side, which would defeat the whole purpose.
      Thanks, PeterM
  • James NewtonJames Newton Posts: 329
    edited 2005-06-24 18:25
    Hang on now... You didn't specifically say this so it's worth asking: Are you removing the resonator when you program the chip? There seems to have been some bad information / habits about this in the past. You MUST remove the resonator from the circuit when you use the SX Key.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    James Newton, Host of SXList.com
    james at sxlist,com 1-619-652-0593 fax:1-208-279-8767
    SX FAQ / Code / Tutorials / Documentation:
    http://www.sxlist.com Pick faster!



  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2005-06-24 19:24
    PJMonty, That is pretty much what I do. The wire length between the sx-key and the target board is about 6 inches and I actually have the key enclosed in a box. The box has a Serial connector attached to the enclosure and takes all the abuse of the regular serial cable. A bit excessive? I say YES! The SX-KEY is great, but I noted when I first recieved it that the connection between the target board and the key recieves excessive physical stress. This is typically due to the key wanting to go one way and the target board the other, connectors like the one provided are not designed specifically for this and will show wear as a result. If your work space is tidy and have strapped everything down plus you don't connect and disconnect often you should have no problems. But I am notoriously messy and tend to be on occasion clumsy, known for example to trip on wires and bump my head. I typically do leave the two connected about 50% of the time but the other 50% I am connecting and disconnecting. I have for example over the past week connected and disconnected around 20-30 or so times. This is alot I know.

    I think that the use of the hardware that you suggested PJ along with a dedicated, anchored board/sx-key pair would ensure years of reliable use.

    James, sometimes I program with the resonator in place due to laziness. Yesterday I was programming without the resonator connected. I know not following protocol can cause issues and even damage (mostly to the resonator), but living life dangerously can often be exhilarating!


    JT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-06-24 19:55
    Wait wait wait, that is your problem. The SX-Key acts as your oscillator when plugged into the board, as such your SX-Key placement and use must conform with the requirements of oscillator placement. The suggested maximum length for an OSC line when actively driven @ 50MHz (as the SX-Key does) is less than 3", your length is twice that! As such, the parasitic capacitance and inductance of your extra long leads messes with the slew rate attainable (and therefore the maximum clock rate achievable). If this occurs you will experience problems like you were having, even though your setup now works, setting the assembly down and picking it back up (ie leads are moved around) can cause the problems to reappear.

    Peter's discussion is regarding the strain relief on the serial side of your SX-Key (the end your computer is connected to), extension of the lines the way you are doing is strongly discouraged for the reasons listed above.

    I always incorporate a 4 pin 90 degree header on a board for the SX-Key to connect to, I always provide a large overlap for the SX-Key to be resting above the target board, this helps reduce strain. I have not experienced the high stresses you seem to be having, if I were I would simply place a couple 4 pin·vertical headers on both sides of·where the SX-Key is placed, this would create a cradle for the SX-Key to rest within so that stresses placed on the SX-Key would be transfered to the retaining headers and thus the target board.·Here's a quick sketch to·illustrate it.

     
       90 degree
      4 pin header
     
       _|_|_|_|_
      |         |
     .|         |. 
     .|         |. <- vertical 4 pin header
     .| SX-Key  |.
     .|         |.
      |         |
    
    
    
    
    
    



    Post Edited (Paul Baker) : 6/24/2005 8:15:16 PM GMT
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2005-06-24 21:00
    You make a good point, but this is valid true for two situations: 1) when your designing your board layout 2) for using the SX-KEY as the clock source @ 50 Mhz.

    I had problems loading the program in to the SX52's memory, this is a low speed operation and the cable lengths used probably would be less of an issue. I do however feel that the extra cable length did stress a marginality with the chip. I say this because I am now able to program with the extension. So there may be something I am missing. I have used this set-up several hundred times @ 50Mhz on numerous sx28s without failure to load or sustain the 50 Mhz clock. But you do get those occasional chips/board layouts that stress this 3" rule, so yes this is a good rule-of-thumb (and one I wasn't actually aware of the 3" rule for 50Mhz, thanks for the information!).

    This whole discussion thread does point out how importantant locating your resonator and programming header adjacent to the chip is. Not doing so can cause headaches. I fortunately did not break this rule, but do have a little bit of a loop (inductance related to area) between the oscillator pins which is undesirable. I can always wire this out but I seem to be up and running. I have found that using a feedback resistor in parallel with the resonator is very handy at stabilizing the higher frequency crystals. Use them!!! The sx chips are digital parts but we live in an analog world, board layout is important especially at higher frequencies. What I did is not a show-stopper so thank goodness.


    JT

    Post Edited (Miner_with_a_PIC) : 6/24/2005 9:05:46 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-06-24 22:27
    No many people have expressed problems with programing an SX with extended leads, I know for a fact Jim McCorison (Jim you still alive? haven't seen you in a few) had this exact same issue (SX wouldn't program), he solved it by shortening the board side leads and extending the serial side.
  • KenMKenM Posts: 657
    edited 2005-06-25 01:44
    Believe it or not, I have never had a problem programming an sx in the manner shown.
    639 x 480 - 45K
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2005-06-25 03:14
    KenM, Thank you for sending along that image; It really does help to put things into perspective. If that set up does work then I am certain even with SX-KEY extension wires on my Key that I must have had a wacked out chip that needed special attention during the first few programmings. The chip is running fine now and I am just making tweeks to the oscillator circuit

    KenM, are you able to use that set-up without a resonator, using a 50Mhz driving frequency from the Key?

    JT

    Post Edited (Miner_with_a_PIC) : 6/25/2005 3:23:41 AM GMT
  • KenMKenM Posts: 657
    edited 2005-06-25 03:31
    I have only programed with that cluge of wires, never attempted to run a program.

    This weekend I will try to run a program with the SXkey and the set up shown in my previous post, then submit my results to this forum...

    About programming, about 10% of the time I get a programming failure error message even with the SXkey plugged directly into the SX Tech board.

    When this occurs, simply disconnecting the Key and reconnecting always resolves the problem....or simply trying again resolves the problem. To me it is usually just a minor nusiance.

    Gunther who programs several SX's in a row mentioned in a previous post something about increasing the size of a capacitor on his programming board with good results.

    Ken

    Post Edited (KenM) : 6/25/2005 3:37:19 AM GMT
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2005-06-25 05:08
    The aforemention SX52 was a pain to program, I must have tried 30 or so times before I tried the direct connect approach. I agree 10% is just a nusiance. The strange thing was that I programmed the sx28 with the same set-up during my programming issue, so I don't think it was a loose wire in my case. I look forward to hearing about your results.

    JT

    P.S. Gunther what did you do? And which capacitor?
  • ForrestForrest Posts: 1,341
    edited 2005-06-25 05:46
    I think Gunther soldered a 22uF electrolytic capacitor in parallel with the 1uF Tantalum capacitor (on the output side of the 5V regulator) for more repeatable SX28 programming. I recently picked-up some 22uF Tantalums at a good price (10 for $1) at www.bgmicro.com and it's destined from my SXTech board.
  • ForrestForrest Posts: 1,341
    edited 2005-06-25 05:56
    FYI here's the thread concerning changing the capacitor on the output side of the regulator - see Guenther's comments on page 2 http://forums.parallax.com/showthread.php?p=537158
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2005-06-25 06:41
    Thanks Forrest, I did have a 100 uF electrolytic capacitor on the output side of my regulator. I didn't and don't have a tantalum type capacitor in parallel with it, although I do have the surface mount pad already connected in parallel with the large capacitor on my board + tantalums handy! I may add one for good measure, thanks for the info.

    JT
Sign In or Register to comment.