Shop OBEX P1 Docs P2 Docs Learn Events
problem programming SX — Parallax Forums

problem programming SX

steve_bsteve_b Posts: 1,563
edited 2008-04-08 20:28 in General Discussion
Hey guys,

I've got a few BS2 projects I wanted to port over to the SX.

I had picked up an SX tech lite kit a while back and had played with it.

I honestly don't remember the state of things when I last used it.....nevertheless....I put things back together and tried to program up an SX to read some serial data and found that I had trouble erasing/reading/programming the SX via an SX key.

I'm assuming my SX key has flaked out on me rather than an issue with the SX chip (as I swapped in a packaged, non-used, one).

Any thoughts?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<FONT>Steve



What's the best thing to do in a lightning storm? "take a one iron out the bag and hold it straight up above your head, even God cant hit a one iron!"
Lee Travino after the second time being hit by lightning!

Comments

  • T'SaavikT'Saavik Posts: 60
    edited 2008-03-25 17:29
    make sure you don't have the resonator oscillator plugged in.

    hehe, thanks RobotWorkshop , always mix those 2 terms smile.gif

    Post Edited (T'Saavik) : 3/25/2008 7:47:20 PM GMT
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2008-03-25 19:27
    To help we'll need to know a few more things:

    - Have you had this working before at some point in the past?

    - What is the error that you receive?

    - Is it complaining that it can't find the SX-Key?

    - You can usually program with the resonator plugged in (can't debug with it in).

    - If you have an oscillator then that must be removed for both programming and debugging

    - The SX-Key gets power from your SX development board. Does that have an adequate supply?

    - Is this the Serial SX-Key or the newer USB one. If it is an older one then are you using a Serial to USB adapter?

    - Is the key plugged in backwards (had to ask)

    I've been using one of the SX-Keys for quite a while and every time I had a problem it was always something other than the SX-Key so far. Double check everything first before assuming the Key or the SX chip is bad.

    Robert
  • steve_bsteve_b Posts: 1,563
    edited 2008-03-25 19:42
    Hi guys,

    I DO believe I had this working at some point....maybe a year ago!?
    I recall going through some of the beginner projects....but perhaps not!

    Sometimes the unit would start erasing....then flip to programming (or writing -- don't have things in front of me at the moment) and then would come back with a "SX-key not found" or something similar wrt no comms.

    I've had the resonator in and out....to no avail.

    What oscillator are you referring to?

    The green light shines on teh board....so assume I'm ok for power!

    It is the Serial SX-key

    I match up the silkscreen on both boards....

    I'm hoping this is something stupid....I tried to jump in with both feet to try and see if I could squeeze a quick project out....so I don't have the familiarity with the SX as I do with the BS2.

    Thanks for any assistance!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <FONT>Steve



    What's the best thing to do in a lightning storm? "take a one iron out the bag and hold it straight up above your head, even God cant hit a one iron!"
    Lee Travino after the second time being hit by lightning!
  • pjvpjv Posts: 1,903
    edited 2008-03-25 23:38
    Hi Steve;

    The SX-Key is VERY fussy about having solid supply at not less than 5 volts. It seems to be willing to tolerate 5.5 volts, but mine quits if it drops to 4.9 for even a very brief moment. Generally when I get the kind of errors you are describing, then cranking the supply voltage up just a hair fixes the problem.

    Cheers,

    Peter (pjv)
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-03-26 00:01
    I agree.· Yep.· I was vexed by the same.· "Scotty, we need more power."· It'd run just fine, but when I wanted to program it, no dice; that's where the current demand·goes through the roof, about 1/2A I read somewhere around here.· It was the 5V, my PS with adjustable current limit, as everything was OK with a different supply.· [noparse][[/noparse]Investigating, I·found that there is probably a gap in the pot at full crank, definitely goes non-linear.]·
  • steve_bsteve_b Posts: 1,563
    edited 2008-03-26 01:47
    Hmmm....I had thought my wall wart was 9 volts or so....but I'll check the current rating (might just be 100mA or so).

    Cheers
    Steve

    (Just to clarify...that's a 9V wall wart in to the tech board with it's on-board regulator)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <FONT>Steve



    What's the best thing to do in a lightning storm? "take a one iron out the bag and hold it straight up above your head, even God cant hit a one iron!"
    Lee Travino after the second time being hit by lightning!
  • pjvpjv Posts: 1,903
    edited 2008-03-26 04:51
    Hi Steve;

    Well, it all depends on the wall wart. Some can be pretty droopy. So check it with a 'scope; the 5 V regulator needs about 6.5 volts in to regulate properly..... the Key will be upset if it does not see 5V for even a speck of time.

    But your problem could also be something else, though it is easy to rule out the possibility of power problems.

    Cheers,

    Peter (pjv)
  • John UptonJohn Upton Posts: 7
    edited 2008-03-27 02:00
    Steve,

    This may not be your problem but I experienced exactly the same symptoms a while back after changing computers. The SX-Key almost seemed to jump erratically from Erasing to Programming to Device Failed interspersed with SK-Key Not Found errors much as you describe.

    In my case, I tracked it down to bad serial communications. One previous computer with a real serial port worked every time, a second computer also worked fine with the USB Serial adapter I was using. When I changed to a third computer with the same USB Serial adapter, the above symptoms appeared. Since the adapter had previously worked on another computer, it took me while to convince myself that was the problem.

    I purchased a new USB Serial adapter making SURE it was based on the FDDI chip set Parallax uses and all the above mentioned problems went away. Of course, Parallax has a quite inexpensive USB Serial adapter that they sell and it is completely compatible with the SX-Key.

    If you are using the SX-Key on a USB Serial adapter, it may be possible you are seeing the same type of serial port incompatibility I experienced.


    Best Regards,
    John
  • John BondJohn Bond Posts: 369
    edited 2008-03-27 06:38
    Hi Steve

    John Upton's point is worth looking into.

    I had similar problems, but intermittantly, then the programmer stopped working. I bought two new SX/Keys and after a while one started having the same problems, but only on one of my computers. Eventually we tracked it down to the serial card on the motherboard. Problem is that the cheaper cards seem to work more reliably than the more expensive ones. It seemed that some add-on serial ports buffer the RS232 communications. Where possible, use the PC's on-board Com1.

    Regards

    John Bond

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • steve_bsteve_b Posts: 1,563
    edited 2008-04-04 19:54
    Finally got the chance to try this again.

    So I've got the recommended 7.5V 1A supply (as per parallax's website).
    I've gotten a few numeric failures and a bunch of "SX-Key not found"s.

    Just tried again and it got a fair ways in to programming when it came back with a Communication failed: 125. Unsure what that means!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <FONT>Steve



    What's the best thing to do in a lightning storm? "take a one iron out the bag and hold it straight up above your head, even God cant hit a one iron!"
    Lee Travino after the second time being hit by lightning!
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2008-04-04 20:06
    Since you are using the SX tech lite board I assume you are trying to program an SX28 chip. Are you trying to program it with one of your own programs? It might be worth grabbing one of the example projects from the help file just to see if you can compile and download that.

    You mentioned using the serial SX-Key. That is the same one i've been using for quite a while. Just for grins do you have another DB-9 serial cable to swap out in case the cable is bad? Are you using the cable that came with the kit or is this a DB-9 cable you already had. If this is a cable you already had is the pinout correct? All DB-9 cables aren't created equal and some have different pinouts.

    Can you try another PC or another serial port on your existing PC if you have more than one? If this is a desktop PC does it have any odd expansion cards that may be sharing Interrupts with your serial port? Isn't as big of a problem these days but used to be a real pain in the past.

    I'm sure you'll be able to isolate the issue and get it working.

    Robert
  • VelocitVelocit Posts: 119
    edited 2008-04-08 20:28
    Also, are you using a serial-to-USB converter? I've had no problems with mine in XP, but I always experience "SX-Key Not Found" or transmit stall errors in Vista.
Sign In or Register to comment.