sx28 reboot
Hi
I made some nice projects with the sx28. With my latest project I have some problems. It is running fine on my sx Key. So the coding is casing no problem. When I run on the resonator it is starting but after a few minuts it is restarting, and so on. Te time between restarts is not ecual. Sometimes it is running for 15 minuts befor it is doing that, sometimes it is after a minut. If I swap back to the sx key I dont have that problem. I can run several hours without any problem. I used different resonators (50 Mhz) with the same result. I checked my power and that is no problem. It is stable. It has to be something with the resonator. I use them from Parallax. What I 'm not sure of it if I need to use aditional capacitor's and a resisteor parallel to the resonator? Hase sombody hade the same issue?
Thanks in advance for the reply.
Stef
·
I made some nice projects with the sx28. With my latest project I have some problems. It is running fine on my sx Key. So the coding is casing no problem. When I run on the resonator it is starting but after a few minuts it is restarting, and so on. Te time between restarts is not ecual. Sometimes it is running for 15 minuts befor it is doing that, sometimes it is after a minut. If I swap back to the sx key I dont have that problem. I can run several hours without any problem. I used different resonators (50 Mhz) with the same result. I checked my power and that is no problem. It is stable. It has to be something with the resonator. I use them from Parallax. What I 'm not sure of it if I need to use aditional capacitor's and a resisteor parallel to the resonator? Hase sombody hade the same issue?
Thanks in advance for the reply.
Stef
·
Comments
What OSC setting are you using on the DEVICE line ? Try lowering it by one setting.
If you are using OSCHS2 then try OSCHS1 etc.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?
www.iElectronicDesigns.com
·
I already tried OSCH2 and OSCH1. It has the same reaction.Now I 'm running on OSCH2.
Stef
- Is it built with one of the Parallax protoboards with the chip already on it?
- If not is this on one of the Parallax development boards?
- Is this the DIP version installed on a solderless breadboard?
- Is this your own PCB?
You mentioned running at 50Mhz which makes board layout, etc critical. The faster you run these chips you have to think less in the digital realm and more like an RF engineer since your getting into that range and traces become inductors and stray capacitance that is minor at low frequency can become an unknown part of your circuit.
Also, are any lines like the reset line left unconnected?
Robert
To answer your question.
The sx28 DIP version is on my own PCB. I tried everything out on a the developmentboad, then I designed my own PCB. I had it made, but I placed the components on it.
I understand your remark of the 50 Mhz but wy is it then running fine on the sx key. I pluged that also in on my PCB and run it on 50 Mhz. The traces use for the resonator are the same as when using the sxkey.
The reset line I always pull up with a 10K to 5V. Hope this is good as with the sxkey it creates no problem.
stef
Do you have a resistor between the OSC1 and OSC2 pins ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?
www.iElectronicDesigns.com
·
Yes, at this moment a 10K between OSC1 and 2. This is giving me the best result. Without is is worse.
stef
Even if it is working with the clock generated from the SX-Key there could be a problem with the layout at 50Mhz. When the key is plugged in it is extending those traces a bit on the OCS lines and will change things slightly. Does your program require a 50Mhz speed or can it run fine at 20Mhz? The lower the clock speed the more you can get away with on your board as it is more forgiving.
I've seen a few schematics where a small (around 5pf) cap was placed from one of the resonator lines to the center ground lead. That may also help. Not all the resonators seem to be created equal so you may want to swap it out with another one or perhaps try a different brand to see if that helps.
Robert
-Dan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A saint-like quantity of patience is a help, if this is unavailable, a salty vocabulary works nearly as well." - A. S. Weaver
This is almost certainly a signal quality problem on the OSC traces. I think the reason you do not see any problems when using the SX-Key is that it drives the SX chip with an active clock signal whenever connected. The SX chip, when using any of the internal clocking methods, uses these pins as connections to a passive device. I think you would see the same reliability improvement as given by the SX-Key by using an external 50Mhz TTL oscillator chip.
If you happen to have access to a good high speed o-scope with FET input probes, I'd bet you would be able to diagnose and correct the problem quickly.
I have hit this sort of problem myself from time to time. Would anyone else here have any tips on how to diagnose analog signal quality problems in the absence of a good o-scope?
John
one statement in Stef's initial post draws my attention: "When I run on the resonator it is starting but after a few minuts it is restarting, and so on."
When "restarting" means that the SX performs a reset, and then runs the program again, the resonator, or the clock generation in general may not be the reason for this behavior.
What about the /MCLR pin - is it pulled up to Vdd with a resistor (4.7 to 10 kOhm are common values). Are there other components that might cause /MCLR going low (a short spike would be enough) to cause a reset?
Is the Watchdog timer active in the application, and if yes, is a clr !WDT instruction executed often enough?
Are there any conditional skips in the application reading input pins, and is it sure that those input pins don't float?
Attaching the SX-Key to the target SX dramatically changes capacitive loads and impedances in the system which means that a system might really behave well as long as the Key is connected, and go bananas when left alone with a resonator.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
Dan,
·I added the 5pFcap to the OSC2 and am now testing for almost 1 hour on the resonator without any problems. Thanks for this advice. Can somebody explain me why this?? Can I assume that I may add a resistor of 10K parallel on osc1 and osc2 and the cap of 5 pF to Osc2 always to my pcb's. It is not hard to do if needed but dous it harm. I 'm now running stable and hope to keep it like that.
Guenther
Yes I always pull up unused pins. Even the /MCLR. Hope this is not wrong. I hade a electronic teacher that became wild when leaving things open. So it became a habbit.
John
thanks for the advice. I started with the resonators but if thier is something better I have no problem with swapping to it. The resonator is practical with not mutch needed around it. You are mentioning a external 50MHz ttl oscillator chip. Do you have a perticular partnumber in mand where you have some good experiance with it. (Perhaps with a litle schema or small explanation if needed) I 'm realy interested because my projects are getting more importand.
Thanks in advance to all.
Stef
·
Here are a couple of random samples of what I am talking about. If you go to your favorite parts supplier's Web site and search for "TTL Oscillator", you should find what you need. They use a small amount of power and cost more than crystals or resonators but are quite reliable in operation.
http://www.abracon.com/Oscillators/ach.pdf
http://www.crystekcrystals.com/crystal/spec-sheets/clock/C32xx.pdf
In use, you connect the output of the oscillator to the OSC1 pin of the SX chip and leave the OSC2 pin open (floating). Program the FUSE Register for one of the XT clocking modes.
John
Robert
your teacher was absolutely right - never let inputs float - pull them up or down accordingly. In case of /MCLR you MUST pull it up, otherwise the device might perform uncontrolled resets.
Good to hear that the 5 pF cap from OSC2 to Gnd did the job. As there are resonators available with and without integrated capacitors, you can't say that the cap and the 10 kOhm resiostor are always required. Nevertheless, it is a good idea to provide pads on the PCB for those components, just in case you might need them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
A lot of times I just solder a 603 size 5pF on top of the SMD resonators...
Glad it worked!
-Dan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A saint-like quantity of patience is a help, if this is unavailable, a salty vocabulary works nearly as well." - A. S. Weaver