OK solved the problem. In high power mode, 1:10 oscilloscope probe capacitance is killing the oscillator output. Use 1:100 probe if you want to see anything and 10pF capacitors. Also the TCLKCON_T1RUN must be set if tmr1 use the 32768Hz oscillator.
On Wed, May 12, 2010 at 2:36 PM, vasile surducan <[email protected]>wrote: > Hi all, > > I don't know why TMR1 oscillator does not start with 32.768 KHz on > PIC18F44J11. > > PIC is running from primary oscillator with PLL enabled at 40MHz. > No oscillation with LPT1OSC in high or low power mode, 15pF capacitors on > crystal (12pF recommended by Microchip) > Anyone has similar problems? > > thx, > Vasile > > > ------------------------------------------------------- > -- TMR1 settings, used for clock&button_read procedure > ------------------------------------------------------- > var volatile bit T1CON_T1CKPS0 at T1CON_T1CKPS :0 > var volatile bit T1CON_T1CKPS1 at T1CON_T1CKPS :1 > var volatile bit T1CON_TMR1CS0 at T1CON_TMR1CS :0 > var volatile bit T1CON_TMR1CS1 at T1CON_TMR1CS :1 > var byte tmr1l_l = 0x5d > var byte tmr1h_l = 0x0a > > -- initialize timer1 for 80mS button delay generation > -- t = TMR1*prescaler*Tcy; prescaler=1 (2 or 4 or 8) tcy=1/32768=30.51uS > -- t = (256*0x0a+0x5d)*1*30.51=(2560+93)*30.51uS=2653*30.51uS=79.97mS > T1CON_TMR1CS1 = 1 > T1CON_TMR1CS0 = 0 -- tmr1 in timer mode,external osc > T1CON_RD16 = 0 -- RD/WR in two 8 bit operation > T1CON_T1CKPS0 = 0 > T1CON_T1CKPS1 = 0 -- prescaler 1:1 > T1CON_T1OSCEN = 1 -- start external osc 32.768KHz > T1CON_TMR1ON = 0 -- tmr1 is off > INTCON_GIE = 0 -- disable all interrupts > PIE1_TMR1IE = 0 -- disable tmr1 overflow interrupt > > tmr1l = tmr1l_l > tmr1h = tmr1h_l -- overflow period 256*TMR1H+TMR1L > T1CON_TMR1ON = off -- tmr1 is off > ------------------------------------------------------ > -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
