Crystal Error
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
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
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
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)
In the future will be care with static or bad connections...
Thank's again and have a nice day