Shop OBEX P1 Docs P2 Docs Learn Events
Hard starting Sx project — Parallax Forums

Hard starting Sx project

David BDavid B Posts: 592
edited 2005-04-18 16:44 in General Discussion
I have a problem with a Scenix power-up reset.

I've made maybe a dozen or so Scenix project boards, and have never had the problem I'm seeing with my current board. The board has an Sx28, 20 mHz crystal and header for SX-Key programmer. It programs fine and runs fine, but it doesn't start well at all. When I power it up, it only starts by itself maybe one time in 20. When I send a new program to it via the SX-Key, it programs, then runs the new code fine. But if I cycle power, it usually won't start. It acts the same whether or not the SX-Key programmer is plugged in to it. When it starts, it works perfectly.

At first I had tied MCLR high. After the board showed its failure to start reliably, I used the circuit in the Parallax application note AN18Reset.pdf, where a cap holds voltage low on the MCLR pin for a while, and a resistor gradually pulls the voltage high after power-up. No difference - the board still only starts about one time in 20. I've changed SX28 chips and seen the same result. Board power is 5.1 V, and seems solid.

If I reset the board and it doesn't start, I can tap a grounded wire to MCLR (which has a resistor-current-limiting circuit as in AN18Reset.pdf), and the program starts immediately, every time.

Is this normal? Is there anything more I can do? Do I need to add some TTL pulse generator reset circuitry to reset my Sx?

David

Comments

  • BeanBean Posts: 8,129
    edited 2005-04-14 18:49
    Usually this problem is from a slow rise time on the power supply.

    Try specifing BOR42 on the device line.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video Display Module" Available Now.

    www.sxvm.com

    "A problem well defined, is a problem·half solved."
    ·
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-04-14 18:56
    The SX28 has a fixed Delay Reset Timer of 72 ms, if the /MCLR pin does not stabilize by this time then you can experience problems with starting up properly, your correct operation after manually resetting the SX points to this. The behavior that modifying the /MCLR powerup circuit has no effect makes me think this behavior is due to your supply. The period of time required for a power supply to stablize is a function of the current supplied by your supply and the total capacitance of your load, increasing the capacitance or decreasing the current supplied will increase the startup time of circuit. If /MCLR is not above Vih of the pin at 72 mS after power up then your SX will end up in a indeterminite state. Even if your supply is adequate for running the circuit from a warm start (pressing reset) it may still exhibit a very slow cold start. Much like driving a DC motor from standstill requires more current than a running motor, the charging of the total capacitance of your board from a dead state requires more current than running your board in a charged state. If this is what is going on with your board, using a supply (and regulator) with a higher current rating should fix this.

    Post Edited (Paul Baker) : 4/14/2005 6:59:38 PM GMT
  • David BDavid B Posts: 592
    edited 2005-04-15 18:41
    Thanks for your advice. I tried BOR42 but it didn't help. Maybe my power supply is the problem.

    I think I'll pull out my SX-Tech board and make sure my programmed chip runs in it, then maybe try its power supply to run my homemade board...

    David
  • DaveGDaveG Posts: 84
    edited 2005-04-15 21:20
    David,

    You might try putting a 1 meg resistor across the crystal/resonator, as shown on
    page 177 of the SX-Key Development System Manual.

    Dave G
  • KenMKenM Posts: 657
    edited 2005-04-16 15:38
    1 Meg, or another value depending on the resonator used.
    DaveG said...
    David,

    You might try putting a 1 meg resistor across the crystal/resonator, as shown on
    page 177 of the SX-Key Development System Manual.

    Dave G
    735 x 578 - 105K
    752 x 380 - 60K
  • David BDavid B Posts: 592
    edited 2005-04-18 16:44
    Got it fixed.

    I'd used the oscillator circuit from one of the Sx app notes, with a 1 meg resistor across a 20 mHz crystal, 33 pF to gnd from OSC1 and 22 pF to gnd from OSC2. This same or similar circuit has worked for me many times on other projects, for both SX18 and SX28 chips.

    But for this particular troublemaker, it seemed that the circuit started marginally better with the Sx-Key plugged in, so guessing that more capacitance was needed, I played with a couple of variations, and when I had OSC1 up to 55 pF and OSC2 still at 22 pF, everything began to work perfectly.

    So I guess maybe this particular crystal had some odd characteristics?

    Anyhow, it now starts perfectly, each and every time, and my project can start to move ahead. Thanks to all who assisted.

    David
Sign In or Register to comment.