Shop OBEX P1 Docs P2 Docs Learn Events
What is required to run an SX chip? — Parallax Forums

What is required to run an SX chip?

Armored CarsArmored Cars Posts: 172
edited 2005-02-17 17:52 in General Discussion
I am trying to figure out how to wire an SX20AC/SS and had some questions.

First does it need an occilator?· Here: http://www.parallax.com/detail.asp?product_id=SX18AC/DP·it says "Internal Occilator -·32 kHz to 4 MHz" so does this mean I don't need one?· Also how do I set its speed without one?

Another question is how do I program it?· I am going to buy the SX Key but on the data sheet I dont see any pins designated to programming.· My best guess is "comparator", there are three of these; an output, positive, and negitive.· They are listed among the I/Os.

It has an Master Clear Reset Input Pin and says "active low" afterwords.· Should I use a pullup resistor to keep it from resetting?

I think·thats it, assuming a real-time clock isn't required.
Thanks, Aaron

Comments

  • dandreaedandreae Posts: 1,375
    edited 2005-02-16 00:47
    There is a book called SX Key Development Systems that will give· descriptive answer to·all of your questions, here is a link for the free download:· http://www.parallax.com/detail.asp?product_id=45111 .··

    Dave



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    www.parallax.com

    ·
  • BeanBean Posts: 8,129
    edited 2005-02-16 01:45
    The SX can use it's internal oscillator (4MHz, 1MHz, 128KHz or 32KHz) or you can use an external resonator, RC or oscillator.
    The internal clock is not very accurate (+/- 8%) so it's not recommended if you program need to do serial communication or other timing sensitive operations.
    Usually an external resonator is used. Parallax sells 4MHz, 20MHz and 50MHz resonators.
    The choice is made using the DEVICE directive in your program.

    The device is programmed through the OSC1 AND OSC2 pins and you will need some programming device (like the SX-Key).
    The comparitor is actually an internal comparitor.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out· the "SX-Video Display Module"

    www.TerryHittConsulting.com
    ·
  • Armored CarsArmored Cars Posts: 172
    edited 2005-02-16 01:57
    This may be a stupid question, but what is a comparitor?
  • BeanBean Posts: 8,129
    edited 2005-02-16 03:08
    The comparitor has two inputs and one output.

    Basically it compares two input voltage levels("+" and "-"). If the "+" voltage level is higher than the "-" voltage level, then the output goes high. Otherwise the output is low.

    Very useful for checking voltage levels and such.

    Let's say you want to check if a light level exceeds a certain threshold. You can set the "-" to a certain voltage with resistors or a pot, and connect a CDS cell as a voltage divider to the "+" input. When the light level causes the voltage divider connected to the CDS cell to cross the voltage set by the pot, the output will change from high to low, or low to high (depending on how you have it setup).

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out· the "SX-Video Display Module"

    www.TerryHittConsulting.com
    ·
  • The Dead BugThe Dead Bug Posts: 73
    edited 2005-02-16 03:52
    I've found that the neat thing about the SX (one of the neat things, anyway), is that it can do so much even in its minimalist configuration. I have one running on a breadboard in a project with no other supporting parts- runs on its internal oscillator, using a pullup resistor on the MCLR pin. I actually have two SX28s, one in the breadboard and one in my SX tech board so I can program, swap chips, tweak the program, swap chips, and so on. Makes for quick development.

    Bruce

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Name: Bruce Clemens

    Work:· Clemensb@otc.edu
    Good Stuff on my Bolg: http://theDeadBug.journalspace.com
  • Armored CarsArmored Cars Posts: 172
    edited 2005-02-16 22:21
    What are the (dis)advantages of different occilator speeds?
  • Armored CarsArmored Cars Posts: 172
    edited 2005-02-16 22:33
    Another question-

    You said the comparitor compares different voltages. If this is something special I'm assuming the rest of the pins cannot recognize differences in voltages (besides 1 and 0), so how do I get a chip to read an analog distance sensor that outputs varying voltages for different distances?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-02-16 23:09
    What are the (dis)advantages of different occilator speeds?

    Its mainly a processing power vs. current consumption issue, but there can also be other factors involed (such as EMI).

    You said the comparitor compares different voltages. If this is something special I'm assuming the rest of the pins cannot recognize differences in voltages (besides 1 and 0), so how do I get a chip to read an analog distance sensor that outputs varying voltages for different distances?

    While you could do everything nessesary to do this on an SX chip (see my post in this thread http://forums.parallax.com/showthread.php?p=526402), this is more easily accomplished by an offboard analog to digital converter (ADC).

    To rephrase my post in the other thread, ADC is accomplished by comparing two analog voltages (using a analog comparator), the first is the unknown voltage your measuring the other is an analog voltage you generate using a digital to analog converter (DAC), when the two are equal (by monitoring the comparator) you know what the voltage of the line your measuring is. You can do all this using an SX or you can buy a ADC to do it all for you.

    Post Edited (Paul Baker) : 2/16/2005 11:15:15 PM GMT
  • David BDavid B Posts: 592
    edited 2005-02-17 17:52
    I think the best answer for you depends on how handy you are with building electronics circuits.

    The SX-Key will operate plugged into a 4-pin header with two power pins and the other two pins connect directly to the Sx chip OSC pins. Feed volts to the Sx and raise MCLR and you're ready to program. But to construct this, you need to know how to read pinout diagrams, wire chip sockets and provide 5V power without burning out your parts. And you need to have sockets, a header to fit the Sx-Key, some kind of board...

    Or you can get the Parallax "sx-tech" prototype board that provides all of this already. I'd recommend this even if you start to build your own boards because anytime a newly built board just won't program and you want to verify that the serial connection is OK, the Sx-Key is OK, your Sx chip is OK, it's nice to have a proven board to test these on.

    David
Sign In or Register to comment.