Searching \ for '[SX] How To Choose the Truly Correct OSCHS3, OSCHS' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/ubicom/devices.htm?key=sx
Search entire site for: 'How To Choose the Truly Correct OSCHS3, OSCHS'.

Exact match. Not showing close matches.
PICList Thread
'[SX] How To Choose the Truly Correct OSCHS3, OSCHS'
2008\01\24@113636 by Zootn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Zoot wrote:

Quick background: I installed my SX servo/led controller in my big 'bot. This is a 'bot that has run fine w/o code changes for 6 months or so. Used to have a PSC in it, which I replaced with the SX version.

Now, I spent all morning get SERIN failures (sporadically) on the host side when it would query the SX. At all baud rates. Board worked perfectly on the bench.

After much trial and error, I discovered that when the motors were OFF that everything would be fine. Motors ON = serial problems. I figured maybe it was noise, but it seemed weird because the PSC (at same baud rates, exact same wiring, power supply, etc) was fine for the nearly 18 months it was installed.

In any case, it seemed like noise would be the culprit, and a single battery supplies all power systems, but I couldn't find anything amiss on the serial line with a scope, no brownouts, etc.

I decided to try a 20MHZ resonator for the SX in lieu of the 50MHZ. SX wouldn't run properly. It ran, but not "right".

Then here is the *really* strange thing -- I put a DIFFERENT 50MHZ resonator in (a blue murata from the same Parallax-sold batch as the original 50MHZ resonator), just for sh*** and grins. Guess what? PERFECT. No serial dropouts, host gets every byte fine, and the servo behaviors are truly wonderful.

So this led me back to the SX manual. For both the 50MHZ and 20MHZ trials I used OSCHS2. My understanding had been that the lower the setting you can get away with, the less power?

Then I looked over some of JonnyMac's recent columns and he uses OSCHS3 for 50MHZ and OSCXT2 for 20MHZ?

How is one to know? Are the "brittle" resonators (like the blue muratas) "high-speed" and the "mylar-y" resonators (like the brown 20mhz) "normal" speed?

If there is a cogent explanation of the fine points in choosing the clock setting, do tell.

I may have other problems going on here, of course, but given that a swap in resonators of the same type gave such different results, I figured I'd nail that down first.

Code & circuit for my SX controller board are here: http://forums.parallax.com/forums/default.aspx?f=21&m=244690
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\01\24@114634 by robotworkshopn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, robotworkshop wrote:

Maybe you just got a couple of questionable resonators???  A while back I was working on some motor control code for the SX48 running at 20Mhz.  At the time I was using one of my little 40-pin DIP SX48 modules on a breadboard.  Before that all the modules I had built worked perfectly.  This one was acting odd and when I swapped out the resonator the problems went away.  So far it was the only one i've had issues with and have tried a couple different styles with excellent results.

FYI: I've been using OSCXT2 with the 20Mhz resonators.

Robert
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497#m245502
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\01\24@161353 by Zootn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Zoot wrote:

Thanks.

1.
I tested some more this afternoon, and I'm sure I'm getting noise on the serial line. I swapped resonators again, but this time left all serial cables disconnected, and I get noise. I realized during earlier test I still had Stamp serial cable and SX-Key connected (the SX was not running from the key; I just left it in so I could hit program again when I wanted).

I think that whatever noise suppression is on-board the SX-Key brings the noise on my controller board down just enough that it doesn't error. With Key and Stamp serial disconnected it's sporadic.

I've got a 4.7k pull-up on the SX serial pin (open true) -- before pulling the board to work on noise suppression,  I decideed to try enabling the pullup on that pin (to give a little more noise immunity on top of the external pull-up). Y'know what, it *really* helped.

On the firmware end I cut the time delay for the "host to get ready" before TXing of a byte to 1ms from 5ms and that helped a lot too (my BSP has yet to choke on the shorter turnaround time). I think the longer delay let a greater chance of noise creep in (mostly in the form of bogus stop bits).

If anyone cares to check out my photo of the board against the schematic -- there's a cap on the SX, and the 5v power supply for the 'bot is heavily filtered and the power is clean. And the PSC worked fine, so it's most likely my board -- since that's the only thing that changed :-).

My best guess is that I cheated a bit and ran the Vss wire to the resonator center pin to right near the Vss host header pin. That pin however, remains disconnected; the board receives Vss from the servo power supply V- -- this was to avoid a ground loop on the single batter setup. I'm thinking I should have tied the center pin of the resonator right to the Vss pin of the SX, which puts it next to the .1uf bypass cap?

2.
OK, OSCXT2 for 20mhz. I still couldn't get the SX running right, but I'm going to check that out separately with simpler code (not sure my firmware can handle 20mhz -- it's borderline.

That still doesn't answer the question of how do you know which to use, when????? Outside of JonnyMac's and other professionals' sample code and the rather broad frequency ranges specified in the SX Manual.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497#m245561
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\01\24@201120 by Zootn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Zoot wrote:

10uf cap on the power rails right by the Vss lead to the resonator -- noise gone. Works great. Will post video of the controller (run by the BS2p host) shortly.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497#m245627
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\01\25@050643 by beann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote:

Zoot,
 From my experience you need to experiment to find the right setting. But for a particular resonator the setting should be the same.

 I use the lowest setting that works. Higher settings use more current and can stress the resonator.

Bean.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497#m245671
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\01\25@094906 by g_daubachn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote:

The various OSX?? settings from LP1 up to HS3 control the setting of the three FOSC2...FOSC0 bits in the Fuse word, where settings from 000b up to 110b select one of the seven available gains for the internal oscillator feedback driver that outputs to the OSC2 pin (111b selects an external RC network).

There is no general rule which OSC setting to use because it depends on the type of the external resonator/xtal connected to OSC1/OSC2. Some components come with internal capacitors (like the "blue" Murata resonators available from Parallax), others require external capacitors, parallel resistors, etc.

As a rule of thumb, you can say, the higher the clock frequency, the higher the gain setting should be. But as Bean mentioned, sometimes, it requires a bit of experimenting to find the right setting for a particular resonator/xtal. It is correct: Higher gains result in more supply current, and also cause some more EMI.

Finding the lowest setting that works for a clock device is fine, but you should consider the possible ambient temperature range. When you minimize the gain, it can happen that the oscillator will not start at lower temperatures.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497#m245742
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\01\25@100657 by Zootn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Zoot wrote:

Thanks gents. One more question in that vein:

IFBD -- do you disable the internal feedback resistor when, say, using an external 10k resistor across the OSC pins along with a 20-50MHZ resonator w/internal caps? Or is that just for the internal RC oscillator? or?

I've not yet seen that directive show up in code I've sampled, so I never thought about until I checked out the OSC settings table in the SX manual more closely.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497#m245747
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\01\25@120057 by Zootn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Zoot wrote:

Video of the controller in situ here: http://www.youtube.com/watch?v=9PGgkRUSlDY. This is straight drop-in with just some minor changes in the Stamp host program to accomodate the serial format for this SX (the program always stored and handled servo positions in brads, so actually the changes were to cut *out* a lot of code that has been shifted to the SX. I did not yet retune the PID routines for this 'bot -- it's running through it's main loop *so* much faster now that the old PID constants make it way too responsive and jittery, but you get the idea.

Since everything is brads, it's easy to do some nice algorithmic work on obstacle distances and angles -- esp. for things like pan angles -- looking front, side, etc.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497#m245774
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\01\25@122918 by Peter Van der Zeen/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Peter Van der Zee wrote:

Hi All;
In fact my experience shows that too high a setting can cause some resonators even at 50 MHz to not work.

Cheers,
Peter (pjv)
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497#m245779
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\01\25@181337 by williamn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, william wrote:

Which setting has higher gain?
OSCXT2 or OSCHS1 ?

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497#m245862
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\01\25@184706 by Peter Van der Zeen/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Peter Van der Zee wrote:

Hi William;
OscHS3 is the highest;
OscHS2
OscHS1
OscXT2
OscXT1
etc
Cheers,
Peter (pjv)
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497#m245868
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\01\26@110623 by Tracy Allenn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Tracy Allen wrote:

When thinking about low temperature issues, I talked with John Barrowman at Parallax about how to evaluate the crystal or resonator choices.   He suggested looking at the crystal output with an oscilloscope, using a low capacitance 10x probe.  The output should be a strong sine wave, just less than rail to rail.   If it clips with flat tops, then turn the oscillator setting down a notch.   If it is less than full, then push it up a notch.   A few pf of extra capacitance can make a difference too, but the value of the external feedback resistor is not seem to matter much, except to establish DC bias.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497#m245976
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\01\26@192918 by williamn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, william wrote:

Very few scopes can look at 50Mhz signals....

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497#m246040
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\01\26@201715 by Peter Van der Zeen/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Peter Van der Zee wrote:

Hi Tracy;
When I was having my debug at 3 volt problems two days ago I spent a bunch of time on these issues, and, among other things, I did exactly what you are saying. I happen to have a scope that can go to 500MHz, and a special 1.5 pF low capacitance probe good to 1 GHz to go with that, so I'm pretty sure my measurements were real.

The debugger defaults the oscillator setting to OSCHS1. In debug mode, you can only override that by changing the setting in the DEVICE panel, and then programming the chip via that avenue. The SXKey delivers an amplitude to the oscillator input pin -OSC1- pretty consistent, regardless of frequency, but the output observed on the oscillator output pin -OSC2- varied dramatically with the oscillator gain settings, from next to nothing to hitting the rails.

Guenther advises that in debug that is of no consequence..... I suspect therefore that during debug the chip uses the input pin of the oscillator, whereas while not in debug it would of course use the output pin, or some buffer close to there. I still think my debug problems were related to the gain settings, but hey, I'm runnin' right now, and I'll dig deeper some other time.

In one of my 3 volt scenarios (SX48) the oscillator will not run with a 50 MHz resonator and a gain setting of OSCHS3. I need to back it off to HS2.

So my take on all this is along the lines as Terry stated; crank it up till it quits working, and then back it off one notch. That is if you can afford the extra current, and if you can't, then I would crank it down until it quits , and then up it by a notch. And if the span is wide, then park it near the middle. But do keep operating temperatures and different voltages in mind.

Cheers,
Peter (pjv)
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497#m246043
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

2008\01\26@205944 by Zootn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Zoot wrote:

Most illuminating.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=245497#m246053
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)

More... (looser matching)
- Last day of these posts
- In 2008 , 2009 only
- Today
- New search...