Help, Crystal issues
steprog
Posts: 227
Hello,
I think my crystal is not working on my board and I need a crystal tomorrow. I am in Salem, Oregon this weekend trying to use the propeller for fire suppresson control and detection in vehicles. However I used some digikey crystals and i think they are not working for my prototype. Does anyone out there know where I may pick up some tomorrow up here ?
Greg
I think my crystal is not working on my board and I need a crystal tomorrow. I am in Salem, Oregon this weekend trying to use the propeller for fire suppresson control and detection in vehicles. However I used some digikey crystals and i think they are not working for my prototype. Does anyone out there know where I may pick up some tomorrow up here ?
Greg
Comments
Can you post the Digikey part number so we can tell you if they should work?
Also , it's a good idea to post a picture of your prototype if you can.
OSCMx
1 0
_CLKMODE
Setting
XOUT
Resistance
XIN/XOUT
Capacitance Frequency Range
0 0 XINPUT Infinite 6 pF (pad only) DC to 80 MHz Input
0 1 XTAL1 2000 Ω 36 pF 4 to 16 MHz Crystal/Resonator
1 0 XTAL2 1000 Ω 26 pF 8 to 32 MHz Crystal/Resonator
1 1 XTAL3 500 Ω 16 pF 20 to 60 MHz Crystal/Resonator
http://www.parallaxsemiconductor.com/sites/default/files/parallax/Web-PropellerManual-v1.2_0.pdf
The 20 pf capacitance rating you have is ok.
I'll have a look at X410-ND on the Digikey site.
X410-ND
ECS-50-20-4
ECS Inc
CRYSTAL 5MHZ 20PF THRU
3,652 - Immediate
0.97000
1
Bulk
HC-49US
X410-ND
HC-49US
That should work fine.
I guess we need to see pictures to help you.
My experience with xtals is that they usually work or not, nothing in between unless they are affected by temperature or stray capacitance.
If it works, then the issue may be with the PLL, and not the crystal. It is the most sensatvie part of the Propeller microcontroller to conditions outside of the absolute maximum conditions, so if the Propeller microcontroller was exposed to ESD, excessive current on a supply rail, or reverse or under-voltage conditions, a bad PLL is a likely outcome.
David Carrier
Parallax Inc.
2. The extra stray capacitance of the breadboard could impact reliability.
-Phil
How long are the wires to and from the crystal? Do you have a ground-plain under the crystal and the wires to/from it? On my boards so-far I've used <1cm wires to the crystal and a ground-plane under everything with rock-solid results.
Marty
It is just crazy. It is a PCB circuit. I built 4 boards and switched crystals and prop chips sometimes the boards work other times they don't. Something is just irratic I think. Coffee and another late night of troubleshooting I think. When I get something that makes sense I will report back.
Greg
Bob Lawrence suggested posting a picture of your board. Please do. Include both a photo and your layout artwork. David Carrier suggested running the Prop without the PLL. Have you tried that yet? We're trying to help, but if you don't follow our suggestions, there's not much we can do.
-Phil
I am out of town sitting in hangar in Oregon. I don't have a way to send my board layout or schematic. I did try running without the pll but I can't say I understand my results yet. Part of the problem is I am running on fumes. I decided I need to go slow and think through everything. Thanks Phil I know you guys are the best. Unfortunately, I really messed up and didn't bring my latest schematics with me.
Just write some code to flash a LED or 2 and see if it's stable.
Do you have access to an Oscilloscope , where you are?
In other words, i suspect that you should work through the other Propeller OSCMx settings regardless of it merely being a 5Mhz xtal.
Greg
_xinfreq = 5_000_000
_stack = 2000
CON
i2cSCL = 28
' Card Type
Under = TRUE
' CardNum = 2 'Under
' Sensor = True
' Mister = False
' Foamer = False
'Set pins for MosFet Drivers
FOAM_Pin = 17
MIST_Pin = 16
'Set pins and Baud Rate for USB comms
pcDebugRX = 31
pcDebugTX = 30
pcDebugBaud = 115200
Mode = 0
'Set Pins and Baud Rate for XBee comms
XB_Sleep = 26
XB_Reset = 27
XB_Rx = 24 'XB DOUT
XB_Tx = 25 'XB DIN
XB_Baud = 9600
'Count for A/D
num = 8
DAT
start byte "start",0 ' start processing command
Hello byte "hello",0 'send command
stop byte "stop",0 ' same as "reset"
space byte " ",0
VAR
byte command[128] ' store command from PC
byte V[8]
long OverPressure 'OverPressure Flag
long RfOverPressure 'OverPressure Flag from external
long GoodSwitch 'Switch Flag
long RfGoodSwitch 'Switch Flag from external
long Flame 'Flame Flag
long RfFlame 'Flame Flag from external
long RfFoam 'Foam Flag from external
long HiTemp 'High Temperature Flag
long RfHiTemp 'High Temperature Flag
long FlameTimeout 'FlameTimeOut Flag
word FlameCnt 'Flame time out counter
byte SetPoint,Upper,Lower,MaxThreshold
byte Sensor1_T2, Sensor1_T1, Sensor2_T2, Sensor2_T1
byte MaxTherm
byte Therm1, Therm2
word Sensor,n,ix,Timer,CheckWord
long Cog, TestVar
byte comd,Value
OBJ
USB : "FullDuplexSerialPlus"
getadc : "ad7829"
XB : "XBee_Object_2"
OP : "OverP2"
SW : "GoodSW"
pub main
Initialize
USB.start(pcDebugRX,pcDebugTX,Mode,pcDebugBaud) ' start the PC debug object
' XB.start(XB_Rx,XB_Tx,0,XB_Baud) 'initialize and start up the XB object
' XB.AT_Init ' Initialize for fast AT command use - 5 second delay to perform
' XB.Delay(1000)
' getadc.start(@V[1],num)
' OP.start(@OverPressure)
' SW.start(@GoodSwitch)
' display(string("Online ")) ' this string goes to PC for display
' USB.tx("O") 'Transmit Overpressure signal
repeat
display(string("Online ")) ' this string goes to PC for display
outa [MIST_Pin] := 1 'Activate Mist
outa [FOAM_Pin] := 1 'Activate Foam
waitcnt(clkfreq/10 + cnt) 'wait 1/5 sec to repeat writs
outa [MIST_Pin] := 0 'Activate Mist
outa [FOAM_Pin] := 0 'Activate Foam
waitcnt(clkfreq/10 + cnt) 'wait 1/5 sec to repeat writs
{
Are you using multiple cogs? Is your stack space correct?
David Carrier suggested that it may be a bad PLL and swamping out the Propeller chip for another one will determine that.
Why aren't you able to use a cell phone to snap a few pictures of your board and load them here?
_clkmode = xtal1 + pll16x 'Standard clock mode * crystal frequency = 80 MHz
_xinfreq = 5_000_000
-Phil
I don't see how you can test your code above with _clkmode = rcfast.
_clkmode = rcfast is ok for testing the PLL but you have to use simple code such as flash a LED.
Which part of your program doesn't work? Serial comms? XBee comms/ bad data etc, Please provide more details.