Shop OBEX P1 Docs P2 Docs Learn Events
Trouble debugging at 3V — Parallax Forums

Trouble debugging at 3V

DosManDanDosManDan Posts: 179
edited 2007-04-13 15:39 in General Discussion
OK, it's me again....

I can't seem to debug an SX-28 using 3.03V. I checked the valid operating range and that was definitely in it. I'm using the USB converter connected to the SX-Key which in turn is plugged into the Key Ring. It was my understanding, with the Key Ring I could program and debug at low voltage.

I was over at Parallax today and spoke with David and another tech. Both seemed to think I should be able to debug at lower than 5V. One tech suggested that I might have burned out the debug circuit. So, I took the chip out, plugged it into the PDB and it worked fine in debug mode. I plugged it back into the circuit at 3.03V and the debug shows it is running and all of the buttons are grey. That program isn't actually running either.

Here are the specifics:
· I am NOT using an external resonator at all
· The Key Ring is powered by 7.5V at 1.2A - Using a Parallax power supply
· The circuit is running at 3.03V -·measured at VDD and VSS (at the chip) using a digital meter. I am drawing power from the PDB 5V and using an LM1086 regulator to reduce the power to 3V
· I can program the chip without a problem. I just can't run it in debug mode
· I have taken the chip out, put it in the PDB and it worked fine, so the debug circuit isn't burned out
· I can leave the chip in circuit, change the power to 5V and it works too, so the circuit isn't causing the problem.

Help me tech support, you are my only hope....OK, cheesy StarWars line, but I really need ya. The voice chip I am using only works at 3V, so I don't have the option of using 5V without a bit of extra work.

Thanks again,
Dan

Comments

  • BeanBean Posts: 8,129
    edited 2007-04-10 11:44
    Dan,
    What clock frequency are you using ?
    I think 300KHz is the lower limit of the SX-Key. If you go below that you will get that effect.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Educate your children to self-control, to the habit of holding passion and prejudice and evil tendencies subject to an upright and reasoning will, and you have done much to abolish misery from their future and crimes from society"

    Benjamin Franklin
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • DosManDanDosManDan Posts: 179
    edited 2007-04-10 15:48
    I'm running at 4Mhz using the internal clock. I haven't changed any settings, and it is specified in the command lines at the start of the program. I tried speeding it up to 50Mhz and it didn't help.

    I appreciate your help, is there some other way that setting is getting changed?

    Thanks,
    Dan
  • Sparks-R-FunSparks-R-Fun Posts: 388
    edited 2007-04-10 16:08
    Dan,

    Is it possible for you to try another SX chip? It would only take a little bit of time to try it.

    - Sparks
  • DosManDanDosManDan Posts: 179
    edited 2007-04-10 19:36
    I have swapped the chip with another one, the results are the same. I have about 14 SX-28 chips, I can swap them out tonight and see if minor variations are affecting it.

    This is holding up development, so I'm willing to try anything at this point.

    Thanks again,
    Dan
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-04-10 20:51
    Are you sure it's an issue with the SX chip and not with the SX Key? Maybe that's the device that won't work properly at 3V. (The SX Key manual does say it needs 5V, BTW.) I've always designed SX boards that needed to run at 3.3V with a jumperable 5V option for programming and debugging.

    -Phil
  • DosManDanDosManDan Posts: 179
    edited 2007-04-10 21:21
    I'm using the SX Key Ring, which is supposed to allow you to debug and program the SX at low voltage. The Key Ring has 7.5V at 1.2A, which is the regulator recommended on the Parallax site.

    I can't use the dual voltage in the finished product, since the voice chip can only handle 3V. The signal lines from the SX would carry 5V and that would cause problems.

    Thanks,
    Dan
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-04-10 22:03
    Dan,

    'Sorry: I missed the KeyRing part.

    'Just a hunch here: Even though you're not using an external resonator, change your comand lines at the program's start to one of the external crystal options (for debugging only). I'm not sure how the SX works internally, but the crystal pins (and, hence, the debugging pathways) might be disconnected when running from an internal clock.

    -Phil
  • DosManDanDosManDan Posts: 179
    edited 2007-04-10 22:19
    I changed the DEVICE line from OSC4MHZ to OSCHS3, and set FREQ 50_000_000 in the code.

    The debug still didn't work, and the chip was acting erratic. It was blinking lines that weren't addressed in the code (had them still hooked to LED's as status indicators).

    Set it back and the debug still is not working, but the erractic behavior stopped.

    Just a reminder, I unplugged the SX Key from the 3V system, downloaded the code into an SX using 5V, and the debug ran fine.

    I don't believe it is an issue with the code or the settings, unless 3V causes some weird side effect.

    Thanks again,
    Dan
  • DosManDanDosManDan Posts: 179
    edited 2007-04-11 09:35
    I've officially crossed into the realm of bizzare with this problem....

    I decided to try and test the Key Ring at 5V to see if it works....

    With the Key Ring attached to the SX-28 on the PDB board, in the built in socket, I·AM able to debug.

    Next, I attempted to test this on a separate breadboard wired up exactly the same as the PDB

    Using·nothing but the connections shown for the SX socket in the PDB schematics, I wired a bare breadboard. I pulled the chip from the PDB and plugged it into the breadboard. I then wired the VDD and VSS from the PDB and connected it to the breadboard and plugged in the KeyRing. At this point the PDB and breadboard should be identical....but the debug doesn't work!!!

    I have a Tantalium Cap 0.1uF from VDD (PIN 2) to VSS (PIN 4), as shown in the schematics for the PDB. I have a 10K resistor on the MCLR (PIN 28). The only real difference I can see is the resistor on the PDB is measuring at 9.64K and I'm using 1%· 1/4W resistors measuring in at 9.97K. Otherwise, the circuits are exact.

    I am at a complete loss to explain why one works and the other doesn't. I know you must be thinking I wired something wrong, but I've checked it a dozen times. Here is a pic to prove it too....(warning, the pic is 1.3MB)

    www.customsoftware.net/images/board1.jpg

    The red and black leads in the top right corner are connected to the PDB VSS and VDD. Otherwise NOTHING else is connected. This is the SAME exact SX-28 that was in the PDB SX socket. So even the chip is the same. The volts on the PDB are exactly the same as on the breadboard (4.95V).

    However....if I remove the KeyRing on the breadboard....I can debug.... But, since I eventually need the use this on a 3V circuit, this test MUST work with the KeyRing in place.

    Why does it work in debug mode with the KeyRing only when it is on the PDB?

    Thanks again....

    Dan







    Post Edited (DosManDan) : 4/11/2007 10:11:31 AM GMT
  • xtricityxtricity Posts: 25
    edited 2007-04-11 15:55
    Is the power supply for the PDB and the breadboard different? Are you sure you have a stable 3VDC going into the board? Do you have spare capacitors you could place over the main +/- and then another 0.1uF across P2 and P4. I don't know too much about these things, but you've tried everything else. I don't know what capacitor to use for the main, maybe 100uF electrolytic. Did you try putting a digital multimeter on the power into the SX Key? The uploading of the programs seems to be less sensitive to voltage fluctuations than the debugging. What if you tap into the power on the PDB and bring it over to your breadboard?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-11 16:52
    Dan,

    I just finished following the exact steps you took and I can confirm that the same issue occurs on my PDB. There is one exception though which may explain the problem. The first few times I tried to DEBUG on the breadboard using the SX-Key by itself the buttons were still grayed out. I had to put smaller thicker wires onto the breadboard to get it to work with the Key alone. And although it did not work once I added the KeyRing the fact that it does on the PDB PCB leads me to believe that this is an issue with capacitance and/or inductance. Capacitance issues are common when breadboarding and can affect a lot of things. When you DEBUG the SX-Key must generate the clock signal for the SX Chip. I am surmising the added capacitance is causing the problem, however I will discuss this with an Engineer this morning and get his input and perhaps have him follow up or I will myself. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • DosManDanDosManDan Posts: 179
    edited 2007-04-11 17:09
    Chris,
    I can't thank you enough for looking into this. I honestly was questioning everything I had done trying to figure out where I had gone wrong. I was prepared to be totally embarassed by your reply, thinking I had made a bone-head error.

    At least I can look at myself in the mirror again... then again, I'm still ugly... wink.gif
    Dan
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-11 17:50
    There’s one more thing I thought after I posted and I confirmed this possibility with another engineer…Ground Loop! It is a possibility when using two wall adapters in a system. What I would recommend is try powering the SX on the breadboard from a 3V battery supply. Something that is isolated. As hard as it is to believe you can get ground loop effect through wall adapters through the AC lines. Be sure not to power the Key from that supply.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Sparks-R-FunSparks-R-Fun Posts: 388
    edited 2007-04-11 17:55
    I only wish to add that I have read recommendations to keep the oscillator leads as short as possible. Perhaps if you shifted your header pins over so that they started in connection row 58 close to the chip and trimmed the oscillator wires as short as possible to reach this point it might help. Then again, it might not make any difference at all! It is just something additional to try.

    - Sparks
  • DosManDanDosManDan Posts: 179
    edited 2007-04-11 19:42
    Thanks for the idea Sparks. I'll give it a try when I get back. I'd try it now, but I'm out for the day.

    I always appreciate your ideas and help,
    Dan
  • DosManDanDosManDan Posts: 179
    edited 2007-04-11 19:46
    Chris, I'll give that a try. I have a few battery packs I can use to test with. If that turns out to be the case, should I disconnect the power and ground leads from the Key Ring?

    Since the VDD doesn't pass throught the Key Ring and the VSS does, I thought it needed to be grounded with the rest of the system. I can see how that might cause a problem with different voltages on the same board.

    Thanks again for helping me with this problem,
    Dan
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-11 19:48
    Sparks,

    I myself trimmed the leads and put the header right at the end. No joy…The breadboard in and of itself is a source of capacitance by its very nature. Again, I cannot be sure without scoping the signals to see what’s happening, but providing an isolated power supply for the SX will rule out the other potential issue. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-11 19:51
    Dan,

    It’s kind of hard to picture…You do need a common ground to the SX no matter how it is powered. But I have seen weird instances where ground loop effects have occurred between devices plugged into an outlet. It can put the grounds at slightly different potentials and do all sorts of weird stuff. It is hard to see happening here, but I am not saying it is necessarily affecting the SX but perhaps the supply to the SX-Key, which is supposed to be generating the clock signal for the SX and it not at that point for whatever reason.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • DosManDanDosManDan Posts: 179
    edited 2007-04-11 20:42
    OK, I'll give it a shot later this afternoon. I'll do anything to try and resolve this.

    This is definitely a strange problem. Since the Key Ring was made for this kind of situation, I wonder why this hasn't been an issue before.

    **Hey, I just had a thought...I have several 45 minute· 125V 450W UPS devices hanging around charged up. If I put the AC adapters each on their own UPS, and the UPS isn't plugged into anything, that should give me two isolated power sources. Even when they are plugged in, the power output is isolated from the wall by the charging circuit. Might this also be an option for solving this?

    You guys are great, and Parallax is definitely standing up to it's reputation for helping the customer.

    Thanks again,
    Dan

    Post Edited (DosManDan) : 4/11/2007 8:53:15 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-11 20:58
    Dan,

    To answer your question about why this hasn’t come up before…Remember, it does work on the PDB, and would probably work the same on the SX proto boards or even the Tech Tool Board. This also lends to my theory about capacitance being an issue. In the absence of a more plausible explanation I am going with the two I have provided until one is disproved. =) Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • DosManDanDosManDan Posts: 179
    edited 2007-04-11 22:29
    Hehe, with any luck I can confirm one of the suggestions as a fix for the problem. The more I think about it, the more I'm convinced you are right about the ground wires.

    I'll let you know tonight,
    Dan
  • DosManDanDosManDan Posts: 179
    edited 2007-04-12 08:45
    OK, here are the results.

    Using 4- Sanyo NiCad 1.2V 250mAh batteries(the ones Parallax use to sell) I was reading 5.09V at the leads. The breadboard is standalone with no connections to any other board. I am unable to use debug with the Key Ring in place.

    If I remove the Key Ring and use only the SX Key, I CAN use debug while powered with batteries.

    I also tried the Key Ring using 2- Duracell 1.5V batteries. The power at the leads measured 3.18V. The debug didn't work either.

    I tried connecting the board power to the Key Ring, I tried removing the power, removing the ground, every combination I could think of.

    Shorter leads do not correct the problem either. Since it doesn't work at 5V with the Key Ring, and it works without the Key Ring...I'm guessing whatever the problem is, the Key Ring is causing it.

    The ball is back in your court....ideas?
    Dan

    Post Edited (DosManDan) : 4/12/2007 8:57:50 AM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-12 22:32
    So it could be a capacitance issue…I would try building the circuit on a small proto board or solder ring board and see if it still causes you grief. If so we’ll certainly have to look deeper into it. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • DosManDanDosManDan Posts: 179
    edited 2007-04-13 10:44
    OK....I have an answer!!!

    Chris was right! Looks like capacitance was the problem. I built a compact test protoboard and ran it at various voltages and debug worked with them all.

    Thank you to everyone who offered suggestions, I really appreciated it.

    And, a big thanks to Chris, I don't think I would have solved it without your help.
    Dan
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-13 15:39
    Dan,

    That was my original assumption and I’m glad you got it solved. Of course I learned something in the process. Never having tried that (with the breadboard) I now know that the breadboard is just too much capacitance for the SX-Key when adding the additional length of the SX-Key Ring. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.