PDA

View Full Version : Crystal Error



estteban
03-21-2009, 01:53 PM
Hello friends!

I have a problem to config the 5MHz crystal. I config the crystal whith this, but the code don't start..
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000

When i comment this lines
'CON
' _clkmode = xtal1 + pll16x
' _xinfreq = 5_000_000

The program runs right, I try with another crystal with 20 and 30 pF but the problen continues..

The 5MHz crystal it's connected directly to propeller crystal pins..

Do you have any idea to solve this??


Thank's

Philldapill
03-21-2009, 01:58 PM
What is the rest of your code? The bug may be in the code itself, and the default clock modes might cause the bug to not be a "bug" anymore, allowing your program to run...

estteban
03-21-2009, 10:18 PM
Hello, Thanks for your interest

I try with another propboard and the same code work's fine, but on my board fail's, this is the code..
-----------------------------------------------------------------------------------------------------------------------
CON

_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000



OBJ
FS : "FloatString"
GPS : "GPS_SmartMode"
lcd : "Serial_Lcd"
sdfat : "fsrw"
NumCon: "Numbers"
XB : "XBee_Object_2008_03_09"
Comm : "FullDuplexSerial"
Comm2 : "Pluto"
Var
long WFStack[50]
byte WiFiStr[50]
byte IMEI[20]
byte VelStr[10]
long LatAnterior
long LatActual
long LonAnterior
long LonActual
long VelAnterior
long VelActual
long VelActual2
Dat
Servidor byte "AT+IPDEST=",34,"189.252.29.136",34,",7000",13
Comando1 byte 13,10,"ERROR",13,10,0 'Comando predefinido que recibe del Pluto
Comando2 byte "<SEND>",0
Comando3 byte "<ERSE>",0
Comando4 byte "<IDENT>",0
pub go | x
NumCon.Init
x := \start
lcd.str(string("Falta Memoria", 13))
comm.str(string(10,"FALTA MEMORIA",13))
repeat ' Se inicia un bucle infinito
!outa[9] ' Anteponiendo "!", se cambia el estado del PIN Que es el LED de status
waitcnt(30_000_000 + cnt)

PUB start | r, x, y
dira[9]~~ ' Se hace el P9, salida. Es lo mismo escribir, dira[0]:=1 Para Activar/desactivar LED Status
Comm.start(31,30,0,9600) ' Initialize comms from Prop to PC For Debug
comm.str(string(10,"Iniciando Modem",13))
Comm2.start(13,14,0,19200) ' Initialize comms(rxpin, txpin, mode, baudrate) Rxpin va al RxPluto y txpin al TxPluto mode bit 0 = invert rx
Comm2.delay(1000)
comm.str(string(10,"Modem Iniciado",13))
comm.str(string(10,"Esperando conexion GSM",10,13))
comm.str(string("IMEI: "))
Comm2.IMEI(@IMEI)
comm.str(@IMEI)
comm.str(string(10,13,"Esperando conexion GSM."))
'-------------------------
repeat
Comm2.delay(200)
comm.str(string(".")) 'Mientras este desconectado de la red GSM realizara
while Comm2.GSM==0 'el ciclo contenido en repeat. GSM=0 Desconectado GSM=1 Conectado a la ared GSM
'-------------------------
comm.str(string("OK"))
comm.str(string(10,13,"Esperando conexion GPRS."))
'-------------------------
repeat
Comm2.delay(800)
comm.str(string(".")) 'Mientras este desconectado de la red GSM realizara
while Comm2.GPRS_Start(1)==0 'el ciclo contenido en repeat. GSM=0 Desconectado GSM=1 Conectado a la ared GSM
'-------------------------
comm.str(string("OK",10,13))

comm.str(string(10,13,"Conectando al SERVER"))
repeat
comm.str(string(".")) 'Mientras este desconectado de la red GSM realizara
Comm2.delay(2000)
while Comm2.Conectar(@Servidor)==0 'el ciclo contenido en repeat. GSM=0 Desconectado GSM=1 Conectado a la ared GSM
'-------------------------
' comm.dec(Comm2.Conectar(@Servidor))
comm.str(string("->OK",10,13))
repeat
Comm2.GPRS_Send(@IMEI)
waitcnt(300_000_000 + cnt)
comm.str(string(".")) 'Mientras este desconectado de la red GSM realizara
Comm2.Conectar(@Servidor)
-----------------------------------------------------------------------------------------------------

Thnk's again

estteban
03-21-2009, 10:26 PM
Hi--

I try with this code, with the same result, don't start, when y remove the clockset, work's fine, but too slow
----------------------------------------------------------------------------
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000

PUB start | r, x, y
dira[9]~~ ' Se hace el P9, salida. Es lo mismo escribir, dira[0]:=1 Para Activar/desactivar repeat ' Se inicia un bucle infinito
!outa[9]
waitcnt(30_000_000 + cnt)
---------------------------------------------------------------------------------

Mike Green
03-21-2009, 10:45 PM
You may have damaged your Propeller chip. There is a failure mode where the internal RCFAST (default) or RCSLOW clock works. The crystal oscillator also works, but the PLL does not. You can download programs just fine because the bootloader uses the RCFAST clock, but any program that uses the PLL fails. There are some threads that discuss this failure, but it's primarily due to voltage spikes on the Propeller supply pins, sometimes due to improper wiring or bypassing. The PLL control circuitry seems to be the most sensitive area of the chip and is usually damaged first. There was some discussion of the value of redesigning the PLL circuitry, but the feeling was that another area of the chip would then fail because the problem was the voltage spikes, not any real weakness in that area of the chip.

estteban
03-22-2009, 03:43 AM
Thank's Mike, that's the problem, i change the Propeller chip and all work's excellente..

In the future will be care with static or bad connections...

Thank's again and have a nice day

-------------------

Mike Green said...
You may have damaged your Propeller chip. There is a failure mode where the internal RCFAST (default) or RCSLOW clock works. The crystal oscillator also works, but the PLL does not. You can download programs just fine because the bootloader uses the RCFAST clock, but any program that uses the PLL fails. There are some threads that discuss this failure, but it's primarily due to voltage spikes on the Propeller supply pins, sometimes due to improper wiring or bypassing. The PLL control circuitry seems to be the most sensitive area of the chip and is usually damaged first. There was some discussion of the value of redesigning the PLL circuitry, but the feeling was that another area of the chip would then fail because the problem was the voltage spikes, not any real weakness in that area of the chip.