Shop OBEX P1 Docs P2 Docs Learn Events
Programming SX-48 — Parallax Forums

Programming SX-48

rock.theoryrock.theory Posts: 3
edited 2014-04-10 08:21 in General Discussion
Hello,It's been a long time since I've been into microcontrollers and I'm wanting to start up again. I have a few old SX-48 protoboards laying around and would like to use them, but I gave up on them a long while ago due to an issue... I have the SX-Key, and my programs were working when it was plugged in (I "ran" the program), but when disconnected from the SX-Key the program no longer ran. Was I missing a step i.e. flashing, or something else perhaps? Thanks!

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2014-04-08 15:30
    Welcome Back !!!


    Do you have a crystal or ceramic resonator across OSC1 and OSC2? (Pins 27 and 26)

    The SX Key supplies the oscillator during programming and debugging, but during stand alone operation you need to supply a resonator or a crystal.
  • PublisonPublison Posts: 12,366
    edited 2014-04-08 16:07
    Hello,It's been a long time since I've been into microcontrollers and I'm wanting to start up again. I have a few old SX-48 protoboards laying around and would like to use them, but I gave up on them a long while ago due to an issue... I have the SX-Key, and my programs were working when it was plugged in (I "ran" the program), but when disconnected from the SX-Key the program no longer ran. Was I missing a step i.e. flashing, or something else perhaps? Thanks!

    Welcome to the forums, (or welcome back).

    Be sure to get the latest downloads from this link:

    http://www.parallax.com/product/sx48bd-g

    Under the Downloads and Documentaion.

    You may just to have to update your USB driver, but I would suggest updating the whole tool and manuals.
  • rock.theoryrock.theory Posts: 3
    edited 2014-04-08 16:32
    Thanks for the quick replies, and the "wb's"!No, I haven't used a crystal or resonator. I didn't know this was a requirement. Thanks for the info, though I don't know what to get, nor where to get it. Perhaps a typical radioshack run? =D
  • PublisonPublison Posts: 12,366
    edited 2014-04-08 16:37
    Thanks for the quick replies, and the "wb's"!No, I haven't used a crystal or resonator. I didn't know this was a requirement. Thanks for the info, though I don't know what to get, nor where to get it. Perhaps a typical radioshack run? =D

    The guys and Gals at Radio Shack would probably give you a blank stare when you ask for a resonator. :)

    Best the get the real deal from Parallax.

    http://www.parallax.com/catalog/components/resonatorscrystals

    The three at the bottom with three pins.

    EDIT: the resonators are required after you take the SX-Key off because the SX-Key supplies the clocking during programming and debugging..
  • ZootZoot Posts: 2,227
    edited 2014-04-08 16:53
    You can run the SX without an external clock source (crystal, resonator, TTL clock chip) only if:

    - you use the internal 4MHZ oscillator (gives ~4MHZ clock freq but will not be extremely accurate)

    - you have an SX-Key or SX-Blitz attached (the programmers supply the clock source).

    If you are using the Key or Blitz, you must "RUN" the program rather than "PROGRAM" the program. "RUN" flashes the program and uses the Key's clock to run the SX. "PROGRAM" flashes the program and uses the circuit's clock source or the internal 4mhz osc. if that's what's specified in the program directives. If you are "RUN"ning then you will want to remove the circuit's clock source (if any) or they will conflict.

    Digikey also carries SX compatible resonators in lots of frequencies.
  • rock.theoryrock.theory Posts: 3
    edited 2014-04-10 07:11
    Excellent! To use the internal clock; is there something I need to specify, or just PROGRAM the chip and it's good to go? My projects (as of now) do not require speed nor time accuracy.
  • ZootZoot Posts: 2,227
    edited 2014-04-10 08:21
    You have to use the correct FREQ and OSC directives in your program (whether it's .asm or .sxb). Freq specificies the actual frequency run and is generally used for compile/assembly-time calculation of loops involved in real-time operations (say a PULSOUT). The OSC directive is programmed into fuses in the SX itself telling it what to expect on the clock pin(s), such as ttl clock pulse, or a high-freq resonator/crystal, etc. or if it should use it's internal oscillator, etc. During RUN or PROGRAM you can also opt to have the internal oscillator "tuned" to be as close to 4mhz as possible.

    See the documentation :) under directives.
Sign In or Register to comment.