Shop OBEX P1 Docs P2 Docs Learn Events
Crystal Error — Parallax Forums

Crystal Error

esttebanestteban Posts: 4
edited 2009-03-21 20:43 in Propeller 1
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

Comments

  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-03-21 06:58
    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...
  • esttebanestteban Posts: 4
    edited 2009-03-21 15:18
    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[noparse][[/noparse]50]
    byte WiFiStr[noparse][[/noparse]50]
    byte IMEI[noparse][[/noparse]20]
    byte VelStr[noparse][[/noparse]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[noparse][[/noparse]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[noparse][[/noparse]9]~~ ' Se hace el P9, salida. Es lo mismo escribir, dira[noparse][[/noparse]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
  • esttebanestteban Posts: 4
    edited 2009-03-21 15:26
    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[noparse][[/noparse]9]~~ ' Se hace el P9, salida. Es lo mismo escribir, dira[noparse][[/noparse]0]:=1 Para Activar/desactivar repeat ' Se inicia un bucle infinito
    !outa[noparse][[/noparse]9]
    waitcnt(30_000_000 + cnt)
  • Mike GreenMike Green Posts: 23,101
    edited 2009-03-21 15:45
    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.
  • esttebanestteban Posts: 4
    edited 2009-03-21 20:43
    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.
Sign In or Register to comment.