Is SX speed fixed to the resonator speed?
![John Kauffman](https://forums.parallax.com/uploads/userpics/555/nZBNEPT0B6FMD.jpg)
What are the SX speed options for a given external resonator?
·
When I use a 4 MHz on the SX Tech Tool, can I do a halving or doubling of speed to operate the SX at 2 or 8 MHz? I am thinking there might be some kind of speed divider directive like the resolution argument in some commands.
·
Help says:
SX/B has a FREQ directive but the Help says that is used for the speed during debugging and in some time-sensitive commands.
·
Datasheet says:
I also see in the datasheet combinations of resistors and capacitors to get various speeds, but I don’t see how that would fit in with the SX Tech Tool.
·
Thanks.
·
When I use a 4 MHz on the SX Tech Tool, can I do a halving or doubling of speed to operate the SX at 2 or 8 MHz? I am thinking there might be some kind of speed divider directive like the resolution argument in some commands.
·
Help says:
SX/B has a FREQ directive but the Help says that is used for the speed during debugging and in some time-sensitive commands.
·
Datasheet says:
I also see in the datasheet combinations of resistors and capacitors to get various speeds, but I don’t see how that would fit in with the SX Tech Tool.
·
Thanks.
Comments
The SX runs at the resonator speed. There is no multiplier or divider for external resonator frequency.
The only option is to NOT use the TURBO directive on the DEVICE line, that will make the SX take 4 cycles instead of 1 cycle for most instructions. But you really don't gain anything by doing that, it was just an option to make the SX more compatible with some older PICs.
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
Coming soon! Propeller based OSD module www.hittconsulting.com
·
Part two:
Parallax sells the 4 & 50 Mhz Murata resonators. If I want another speed, can I use the same Murata series parts, but at different speeds? Digikey lists eight speeds other then 4 & 50 MHz.
In other words, does Parallax just carry two speeds because that is a reasonable range for inventory, or is there an intrinsic property (or rating) of the SX that requires 4 or 50MHz and Parallax stocks both of the allowable options?
Part three:
What OSCxx directives are available?
If I get a 20 Mhz resonator can I just use OSC20MHz in my SX/B directives?
Part Four:
When using SX/B, are there timing command problems if it is possible to use OSC directives, other then OSC4MHZ and OSC50MHZ?
Part (Overall)
Given that it is efficient to run the chip at slowest speed to get the job done, what is the best technique to run the SX at (for example) 10 or 30 MHz?
Thanks.
I run most of my projects at 20 MHz using a Murata resonator. The directive I tend to use is OSCXT2.
Remember that the faster your oscillator speed, the better resolution (and precision) you'll have when it comes to timing (especially with PAUSEUS). That said, the compiler does a great job a creating timing loops for the FREQ setting; if there is a problem (like attempting 250K serial with a 4MHz FREQ) the compiler will tell you.
The reason I use 20 MHz most of the time is that it's a common value and a good balance between speed and current consumption. But every project is unique and processor speed should be considered. In my March N&V project, for example, I found that it ran perfectly well using the 1 MHz internal oscillator, and even though I'm multiplexing 64 LEDs it ran for two full days on an old 9v battery.
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
Coming soon! Propeller based OSD module www.hittconsulting.com
·