Shop OBEX P1 Docs P2 Docs Learn Events
Oscillator problems — Parallax Forums

Oscillator problems

Mr_NukeMr_Nuke Posts: 47
edited 2006-12-25 11:26 in General Discussion
I am having some serious problems when trying to drive my SX28AC/DP's without the SX-Key.
I have tried several 50 Mhz resonators ,with OSCHS2 and OSCHS3,
and also a 4 Mhz resonator with OSCHS2 and OSCXT2,
as well as· the 75MHz TTL oscillator with OSCHS3.
Every time the chip stalls. However, when I use the SX-Key to generate the clock signal, everything works fine. Also, if I connect a resonator, and the SX-Key afterwards, without having it generate a clock signal, everything works fine. I am having this problem with·all my·SX28 chips.
Does anyone know where the problem may come from?
Thanks in advance for any help.

Comments

  • BeanBean Posts: 8,129
    edited 2006-12-22 02:08
    Do you have the brown-out-reset enabled on the DEVICE line ?
    For 5V use BOR42 and see if that fixes it.

    This is a fairly common problem caused to the rise time of the power supply to the SX chip.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com
    Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1

    "USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
  • Mr_NukeMr_Nuke Posts: 47
    edited 2006-12-22 02:26
    I am using BOR42, and I used it when I did the testing. This doesn't fix it.
    I think it may be the oscillator circuit in the SX chip, but I don't see how three different chips,
    two of which have not been used before have the same problem.
    Any ideas to what may cause this?

    Post Edited (Mr_Nuke) : 12/22/2006 3:19:53 AM GMT
  • BeanBean Posts: 8,129
    edited 2006-12-22 13:35
    Can you post a schematic and your code (at least the DEVICE line) ?

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com
    Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1

    "USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
  • Mr_NukeMr_Nuke Posts: 47
    edited 2006-12-22 15:14
    I don't have a drawing for the schematic, but here-s what I have connected:
    RB.0 : 470 Ohm ---- LED ---- Vdd
    RB.1 : 470 Ohm ---- LED ---- Vdd
    RA.0: (TX)·---- T1IN (Max2325)
    RA.1: (RX) ---- R1IN (Max2325)
    RA.2: (CTS)---- T2IN (Max2325)
    RA.3: ----·!INVALID (Max2325)
    The datasheet for the 2325 transciever is here : http://datasheets.maxim-ic.com/en/ds/MAX3233E-MAX3235E.pdf·. I have everything connected on the SX-Tech board, and I am not using the other I/O·pins as of yet.
    This is the code containing my DEVICE directives:
    DEVICE   SX28AC    ;//Using the SX28AC
    DEVICE   OSCHS3    ;//Oscillator setup
    DEVICE   TURBO     ;//Turbo Mode
    DEVICE   STACKX, OPTIONX
    DEVICE   BOR42     ;//Brown-out @ 4.2V
    IRC_CAL  IRC_FAST
    RESET Initialize
    Freq 50_000_000     ;//SX-Key Frequency
    

    I'm trying to use this with a 50 Mhz resonator. I've also tried HS1 and HS2 as the oscillator mode.
  • Mr_NukeMr_Nuke Posts: 47
    edited 2006-12-22 17:18
    I did some further testing and found the following:
    When I power up the chips with a resonator and without the SX-Key, they start normally, but they stall after a few seconds. I need to disconnect the power in order to get the chips restarted. The reset button doesn't help.
    When I power up the chips with the 75 MHz oscillator (output to OSC1, w/ OSCHS3), they start up fine and halt after a few seconds. Again, I need to disconnect the power to get them restarted.
    All the three SX28's I have behave in the same manner.
    Does anyone have any experience with this issue, or any ideas that would get these chips going?

    I just found out that everything works fine without the SX-Key if I remove·BOR42 from the device line. Any ideas on why this would cause a problem?

    Post Edited (Mr_Nuke) : 12/22/2006 5:31:36 PM GMT
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-12-22 17:32
    Well, it is not easy to say why you are having such trouble. But the the OSCHS3 seems about right.

    There is another factor, the internal feedback resistor.

    If it is disabled [noparse][[/noparse]the default is enabled], it might help to place a resistor [noparse][[/noparse]say 1 meg ohms] in parallel with the resonator. See page 231 of Guenther's text where it says, 'if /IFBD is cleared,an external resistor must be used.' or take a look at the SX28 PDF for the FUSE details.

    Also, it would not hurt to try OSCHS2 or OSCHS1 with the resonator. These setting provide less power to drive the resonator and that my eliminate the latch up.· You should try to run with the least amount of power driving the oscillations.· I am not sure that OSCHS3 is a good fit with a TTL oscillator.

    When you remove the Brown Out at 4.2volts, what value do you replace it with?· It might be that the Max232 is drawing enough current to pull the SX below 4.2volts.· The fact that changing the Brown Out line of code is pointing toward a power line problem -- needing better·filtering for ripple or lowering the brown out threshold.· The SX28 can go quite a bit lower [noparse][[/noparse]2.6 or 2.2volts].· But others have had trouble when turning off the brown out completely.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you want more fiber, eat the package.· Not enough?· Eat the manual."········
    ···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

    Post Edited (Kramer) : 12/22/2006 5:46:42 PM GMT
  • Mr_NukeMr_Nuke Posts: 47
    edited 2006-12-22 18:57
    You're right about the line filtering. I added a tantalum capacitor near the MAX232, and it solved the problem. The MAX232 doesn't seem to draw more than 50 mA. I goess the regulator on the SX-Tech board isn't fast enough. Anyway, the extra capacitor solved rthe problem. Thanks alot for your help.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-12-25 11:26
    Without a scope, these problems are a bit dicey to locate. A complete schematic makes it easier to spot what you left out.

    The MAX232 document that I have indicates a mere 8ma is required, but that doesn't take into account the noise it generates from the voltage multiplier circuitry that makes the 12volt. The regulator only regulates incoming power.

    The rule of thumb is that every chip has 0.1uf between Vdd and Vss at the chip to isolate the noise it internally generates when switching or whatever. A regulator will never catch that.

    Since the MAX232 is on the regulated side, that rule applies.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you want more fiber, eat the package.· Not enough?· Eat the manual."········
    ···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Sign In or Register to comment.