Why Basic Stamp when we now have such cheap SX?
Mag748
Posts: 269
I am not quite sure what the difference is between the SX and the Basic Stamp. It would seem obvious to get the SX tool kit for cheaper than a BS2 kit and then buy as many SX chips as you want for 1.79 to 7 bucks each. As I have been reading, beside the languages, the SX and the BS2 are almost identical in performance, the only diff being one is 2 bucks, and the other is 50. Whats am I missing?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Comments
Actually the BASIC Stamp is a complete package that includes a voltage regulator, EEPROM, built in resonator,·and a resistor network and more.· It's not as easy as looks to implement an SX chip in a circuit compared to a BASIC Stamp.· There is a great deal of information that is available for the BASIC Stamp compared to the SX.· These are some of the differences, I believe that once you are proficient in using the SX chips that it would be a cheaper solution compared to the BASIC Stamp in the long run.
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
www.parallax.com
Post Edited (Dave Andreae (Parallax)) : 11/21/2004 4:11:17 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
Business Page:·· http://www.knightdesigns.com
Personal Page:··· http://www.lightlink.com/dream/chris
Designs Page:··· http://www.lightlink.com/dream/designs
·
Compilers for 8-bit processors have been available long before we released SX/B. The Stamp is a success for the following reasons: (a) incredible ease of programming; (b) complete absence of programming "tools" except for a serial cable and the editor; (c) amazing amounts of documentation/application support; (d) really quick development capabilities; (e) industry support with many 3rd party books, boards, sensors designed for quick "Stamp compatibility"; and (f) code space much larger than the SX chip. A few of these capabilities are made possible by the on-board EEPROM and the fact that the microcontroller is programmed with our "interpreter" instead of compiled code.
Often, I can have a quick project running in the Stamp in minutes whereas the SX could take me part of a day to do the same thing. The investment in development time for our customers correlates to how many widgets they want to make. Problems get solved with the BASIC Stamp very easily.
With the SX (or any chip) you become responsible for understanding much of the architecture. This means you will need to know about pages/banks, interrupts, oscillator speeds, and the other limitations of the processor. Some things which are routine in the BASIC Stamp seem quite complex with the SX - debugging, lack of word variables, etc. The startup cost of using the SX is significantly higher, both in terms of time and money.
Hope this helps a bit.
Ken Gracey
The BASIC Stamp has commands not present in SX/B for parallel LCDs, I2C, 1-Wire, frequency generation, writing to/from the EEPROM (can only be done at program loading on an SX).
- Ken
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
In addition to a voltage regulator, your working circuit may need an external crystal/resonator/oscillator circuit. I say "may" becuase programs that are not timing critical can often use the internal oscillator.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I think by 'timing critical' he was refering to processing speed. Some simpler applications might be able work properly using the SX's internal oscilator which clocks at 4 Mhz. But with more complex applications, faster processing speed can become vital to get everything done in time. Using an external oscilator the SX's can run at 50 Mhz.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
To answer the question in context, Jon is talking about the internal oscillator of the SX which is an RC oscillator. By using the time constant inherent to the RC combination (the discharge of the capacitor through the resistor is V=V0*e^(-t/RC) for t>0 (where V0 is the initial voltage), and feeding the junction between the R and C to a circuit which changes state at a particular voltage (schmitt trigger input, analog comparator etc) the triggering will always occur with the same amount of elapsed time. By repeating the charging of the capacitor, you get a fixed oscillation. The internal RC oscillator of the SX was designed for 4 MHz, but due to variations of the R and C in the manufacturing process·and the operating temperature of the SX, the actual frequency of the internal oscillator can be +/- 8% or in the range of 3.68 to 4.32 MHz.
Post Edited (Paul Baker) : 11/23/2004 7:33:17 PM GMT
A common way is to have a crystal of quartz, of a particular shape, between two electrodes. The shape determines what frequency it oscillates at. Build an oscillator circuit with this crystal, and it will oscillate at its frequency.
You can also do this with a capacitor and an inductor, called an "LC" circuit (L for inductance, C for capacitance).
I don't really know what is in a 'resonator' -- I suppose it is a very accurate capacitor and inductor combination. The goal is the same, though -- to have a component which reinforces an oscillator at a particular frequency.
So, "oscillator" is the general term for any circuit which generates an AC signal. Crystals, resonators, or "LC" circuits are devices for tuning that oscillation to a particular frequency.
let my try an easy explanation on that matter:
In general, an oscillator is any collection of electronic components assembled in a way that it generates a periodically changing output signal. The shape of this signal may be a sine wave, a square wave, a sawtooth, or whatever.
Microcontrollers, like the SX (and many other devices) require a clock signal in order to execute the operations defined in a program in a correctly timed order. IOW, the SX requires an oscillator that provides the required clock signal. The designers of the SX have implemented various options how such clock signal can be supplied or generated.
Here are the options:
- Internal RC Clock
This option does not require any additional external components, as the clock signal is generated by the SX-internal oscillator. It allows for clock frequencies up to 4 MHz, and it is not very accurate. Accuracy depends on the tolerances of the SX-internal components, the supply voltage, and the ambient temperature.
- External RC Clock
Here, an external capacitor and a resistor together with SX-internal circuitry is used to make an oscillator that supplies the clock to the SX. Again, accuracy depends on the supply voltage, the external and internal components and the ambient temperature, IOW - it is not very stable either.
- External Crystal or Resonator
Here, a crystal, or a ceramic resonator is connected to the OSC1 and OSC2 pins of the SX. Depending on the type of the crystal or resonator, additional external capacitors and/or resistors are also required. The internal SX components are used to generate the clock but the external crystal or resonator controls the value of the resulting clock frequency. Crystals or resonators allow for much more accurate clock frequencies compared to internal or external RC oscillators. They also allow for higher clock frequencies (up to 50 MHz, or even more).
Basically, a "crystal" uses a quartz to control the resulting frequency where a resonator usually makes use of a ceramic part to do this job. In most cases, crystals are more accurate than resonators. On the other hand, resonators are usually a bit cheaper and accurate enough for most applications.
- External Clock Supply
Here, the rectangular clock signal must be generated by some external device which is then fed into the OSC1 pin of the SX. There are many stand-alone clock generators at various frequencies available. You may also use one of the available ICs to generate the clock signal. Such ICs·usually work in PLL mode, i.e. they require a low-cost crystal specified at a lower frequency, and generate a clock signal which is a multiple of this frequency.
Please keep in mind that power consumption of the SX is a direct function of its clock frequency, IOW, the higher the clock frequency is, the higher the power consumption will be. Therefore, it is a good idea to first determine the required execution speed for a specific application before selecting the clock frequency.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
Günther
Post Edited (Guenther Daubach) : 11/23/2004 9:11:43 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
In order of precision from low to high is RC, LC, resonator, crystal and SAW (not a sawtooth-wave but a Surface Acoustic Wave).
RC is cheapest, but can only be used up to ~4MHz (higher frequency is possible but the result is not reproducible in a cost effective manner in a mass manufacturing environment).
A LC has a higher precision because a second order circuit (LC) has a higher Q than a first order circuit (RC). Think of two bells, one crafted by an expert bellsmith and a second crafted by an amateur. The one produced by the expert will have a clearer, more solid sound that the poorly crafted one (the resonance of the 1st bell is sharper than the second and hence its tone has less deviance from the resonant frequency, here think of the infamous bell curve, a·higher resonancy means the curve is more "peaky" meaning more students would get C's and fewer would get A's and F's (Q is the measure of resonance (or "peakiness") of a filter)). The expert crafted·bell is analogous to a second order circuit, the·amateur bell·to a first order circuit.
Resonators typically use a peice of ceramic, when struck by a voltage (equivalent to striking a bell) the resonator will output an oscillation near its resonant frequency. This is because the resonator acts like a high-Q bandpass filter in response to a unit step function. (A unit step function (used to model discontinuous pulses, like quickly applying a voltage) can be approximated by the summation of many different frequencies (this is the basis of a Fourier series). Since the step function is approximated by many sinusoids at many different frequencies, this is equivalent to throwing a broad-spectrum signal at a band pass filter, the output of the bandpass will be a close grouping of frequencies near the resonant frequency, the higher the Q the closer the grouping is.)
Crystal is the same as a resonator but using a piece of crystal instead of ceramic, the properties of a crystal varies less than ceramic under varing temperatures and other environmental factors, but finding crystals with a resonant frequency higher than around 20MHz is difficult.
SAW oscillators are not really used for producing clocks for computers but are gaining large grounds in communications with carrier waves of sub-GHz to multi-GHz.
At the frequency the SX runs (50MHz), neither RC nor LC is very accurate, crystals are nearly impossible to find and this is·typically too low of a frequency for a SAW, so resonators provide the greatest accuracy for the cost and speed we are talking about.
Actually I just checked, crystals are available in frequencies upto 120MHz but are only available in non-smt in frequencies upto 66MHz
Post Edited (Paul Baker) : 11/24/2004 5:54:48 PM GMT