Shop OBEX P1 Docs P2 Docs Learn Events
Debugging 3.3v Project — Parallax Forums

Debugging 3.3v Project

dkemppaidkemppai Posts: 315
edited 2005-08-04 13:06 in General Discussion
Hi Guys,

Has anyone tried to debug an SX with the SX-Key when the SX-Key is powered by 5 volts and the SX chip is powered by 3.0 volts? I've got to dig into things a little, but think that it may be possible. Basically, I have some IC's that are not 5 Volt tolerant (Can't get them in 5 volt versions). These IC's·will not operate correctly with the SX running at 5.0 volts. Just won't do it.

They·only operate at·~3 volts.

Just wondering if anyone·knows if it definatley isn't possible! If not, why not?

-Dan


Post Edited By Moderator (Jon Williams (Parallax)) : 8/2/2005 12:10:50 PM GMT

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-08-02 05:07
    The robot scrolling medal operates on 3V, and people discussed about half a year ago about programming them. I believe they did it by providing a seperate 5V for the Key, I don't think there was anything more complicated about it, but Im not completely positive.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • dkemppaidkemppai Posts: 315
    edited 2005-08-02 12:02
    Paul Baker said...
    The robot scrolling medal operates on 3V, and people discussed about half a year ago about programming them. I believe they did it by providing a seperate 5V for the Key, I don't think there was anything more complicated about it, but Im not completely positive.

    I was thinking that it would be possible. Since the programming to write the flash comes from the SX-Key, it should be possible...·· ....I hope.· I'm going to try it today. Will post results.

    -Dan
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-08-02 12:11
    The SX-Key requires 5 volts to operate. We once had a devce called the SX-Key ring that allowed the programmer to provide power to the SX-Key that was different from the target circuit (Which would allow you to program and debug 3.3v circuits). Perhaps with the resurgance of the SX we need to bring that back.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • dkemppaidkemppai Posts: 315
    edited 2005-08-02 12:48
    Jon Williams (Parallax) said...
    The SX-Key requires 5 volts to operate. We once had a devce called the SX-Key ring that allowed the programmer to provide power to the SX-Key that was different from the target circuit (Which would allow you to program and debug 3.3v circuits). Perhaps with the resurgance of the SX we need to bring that back.

    Now that you mentioned it, I remember hearing about it. Exactly what was on the "ring"?

    Here is my workaround...·· ...I can program and debug·SX chips at 3.0 volts. Everything seems to work just fine.

    Now, that i have you all here. When I program the·SX to be used with a external·resonator (OSCXT2), I have a lot of·trouble programming it·again.·The SX-Key reports that It can't talk to the SX chip. I can't reporgram for debug, or just plain program it. I'm thinking one of the osc pins ends up in a state that will not allow it to program correctly, or maybe·MCLR issue...·· ...any ideas? (I still have some testing to do on this issue)

    -Dan
    1244 x 1340 - 109K
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-08-02 13:01
    Can you post a quick diagram of the resonator and programming header? I am assuming it isn't as simple as forgetting to remove you resonator before plugging the SX-Key in.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-08-02 13:02
    The SX-Key Ring was an adapter PCB with a power supply for the key and the programming/Vss connections to the SX circuit.

    Make sure the MCLR is tied to Vdd through a 10K, not directly.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • dkemppaidkemppai Posts: 315
    edited 2005-08-02 13:38
    Paul Baker said...
    Can you post a quick diagram of the resonator and programming header? I am assuming it isn't as simple as forgetting to remove you resonator before plugging the SX-Key in.

    Here is exactly what I do:
    1. start by debugging code, using the SX-Key.
    2. use the SX-Key to program that same code into the SX.
    3. remove the power from the circuit.
    4. unplug the SX,· and plug the resonator in.
    5. attach power (The VDD rise time is always faster than 160uS).
    6. test the SX board for functionality (Not using the SX-Key, of course)
    7. remove power, and resonator.
    8. plug in the SX-Key.
    9. I attach power. (Again rise time faster than 160uS)
    10. Try to program·or debug. At this point, The SX-Key "Chip connection failed".
    11. Cycling power several time with the SX-Key attached will usually allow the debuggng/programming to take place.

    I have the Internal Feedback disabled, and MCLR tied directly the VDD.
    I'm guessing by the fact that the oscillator always starts, it's not an MCLR
    issue. I'm starting to wonder if it's an issue due to not having any feedback on the OSC pins...··· ...maybe the gates are floating to a 'stuck' state.

    Also, I've had similar issues debugging an SX52 that will not allow programming, until power is cycled.


    -Dan

    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-08-02 14:14
    One on my colleagues (a Parallax engineer) tells me that connecting MCLR directly to Vdd is NOT a good idea and can cuase the SX to lock-up -- tie it to Vdd through a 10K.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • dkemppaidkemppai Posts: 315
    edited 2005-08-02 14:45
    Jon Williams (Parallax) said...
    One on my colleagues (a Parallax engineer) tells me that connecting MCLR directly to Vdd is NOT a good idea and can cuase the SX to lock-up -- tie it to Vdd through a 10K.

    I added the resistor...· ...will test more later.

    -Dan
    ·
  • dkemppaidkemppai Posts: 315
    edited 2005-08-02 19:36
    Added the resistor in series with MCLR, and·trying to reprogram after programming it to run
    OSCXT2, I'm still having the same trouble. No matter how I reset it, I cannot reporgram it.

    Also, it's getting to the point that in order to reprogram it, I need
    to pull the chip from the circuit, and program it on a different board with
    nothing attached, and it programs just fine. Many different chips act the same
    way.

    So, what am I missing here?· It reprograms from debug flawlessly! It won't
    reprogram from 'program' at all.

    -Dan

    ·
    ·Edit, Here are two images of the voltages on the programming pins.·1574 is the programming not working. 1575 is the programming, as it should be. OSC1 is the purple trace, OSC2 is the blue trace.








    Post Edited (dkemppai) : 8/2/2005 7:57:26 PM GMT
    1000 x 667 - 61K
    1000 x 667 - 47K
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-08-02 20:05
    As you obviously know, the OSC2 signal is the problem. I am nearly certain that the OSC2 is used by the SX-Key as a return signal from the SX. Have you tested the continuity of the trace between the OSC2 pin on the SX-Key header and the OSC2 pin on the SX? What else besides the resonator is connected to the OSC2 line? Are you using a parallel resistor between OSC1 and OSC2?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • dkemppaidkemppai Posts: 315
    edited 2005-08-02 20:42
    Paul Baker said...
    As you obviously know, the OSC2 signal is the problem. I am nearly certain that the OSC2 is used by the SX-Key as a return signal from the SX. Have you tested the continuity of the trace between the OSC2 pin on the SX-Key header and the OSC2 pin on the SX? What else besides the resonator is connected to the OSC2 line? Are you using a parallel resistor between OSC1 and OSC2?


    I have checked continuity between all pins on the·SX-Key and the chip. I cut the shrink tube off the key near the connector and checked from connector soldered·to·the Key. +5V, Gnd, OSC1, and OSC2 appear to be connected. When programming, I don't have anythign except the SK-Key attached. No resonator, no resistors, just the key.

    I'm pretty sure that the OSC2 is a·bidirectional signal. OSC1 only provides the high VCC required to program the Flash memory.·The communications go back and forth on OSC2...·· ...but I need to check the specs to be sure. For some reason, that pin won't go high. But, this only happens when the SX-Key was programmed to run the oscillator. Weird!

    I'm starting to wonder if it's an intermittent connection in the SX key connector. The last time I tried to program, it failed in the middle of a programming cycle. And several times the chip connection failed, and then the SX-Key software lost the connection to the SX-Key! That seemed really odd.·5 volts is good,·and MCLR is very stable.


    I'll keep hammering on it.
    I will try a different key tomarrow morning.·It's getting to the point that I need a stiff drink tonight!

    freaked.gif
    -Dan
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-08-02 20:57
    Hmm Im quickly running out of possibilities, go get a drink, relax and take it up fresh tomorrow.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-08-02 21:07
    Dan,

    several users (including me) had trouble with "Chip connection failed" errors when the SX (or better the SX-Key) was not powered close to 5 Volts. I came across this problem fairly often when using an SX-Tech board with just a 1µF cap attached to the regulator's output pin. Since I'm using a 22µF cap instead (as the LM 2940 datasheet recommends), these problems are gone. Looks as if the SX-Key generates a spike on Vdd when the programming voltage is turned on that can cause trouble when not filtered out sufficiently.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    Günther
  • dkemppaidkemppai Posts: 315
    edited 2005-08-03 13:16
    Guenther Daubach said...
    Dan,

    several users (including me) had trouble with "Chip connection failed" errors when the SX (or better the SX-Key) was not powered close to 5 Volts. I came across this problem fairly often when using an SX-Tech board with just a 1µF cap attached to the regulator's output pin. Since I'm using a 22µF cap instead (as the LM 2940 datasheet recommends), these problems are gone. Looks as if the SX-Key generates a spike on Vdd when the programming voltage is turned on that can cause trouble when not filtered out sufficiently.

    Guenther,

    The 2940 is an LDO. Some LDO's·are very picky about filter caps (Value and ESR). I've seen order of magnitude changes (.1uF instead of 1uF) send them into oscillations!·Looking at my SXtech board, there is only a 1uF cap on that one also (I've never really looked closely at the board!).·It also·appears that there·is about an·inch of copper from the cap to the regulator (adding to ESR/ESL). Not only that, but there is a "T" in the trace with the·cap·on the opposite leg·as the·MCU and the SX-Key...·· ...maybe some notes·to add for the next revision of the Tech board.

    Anyway, As per your suggestion, I looked at the 5 volt signal. No problems there. The voltage drops about 75mV for 5uS worst case. The amplitude·is less than the clock noise on the VCC line·with the·SX key is supplying the clock.

    But, its working now. So, I'll keep programming until it quits. It's got to be a connection somewhere!

    -Dan




    ·
  • dkemppaidkemppai Posts: 315
    edited 2005-08-04 13:06
    Found it!!! It's an intermittent 4-pin connector on the SX Key itself. Who makes the connectors on the SX-Key, and the Shrink tubing on the SX-Key? I'd like to repalce the connector shrink tube...··· ...and get some extras!

    -Dan
Sign In or Register to comment.