• AVR Freaks

Hot!PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overflow

Author
Paul Thompson
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2010/07/18 09:21:19
  • Location: 0
  • Status: offline
2020/05/13 05:44:54 (permalink)
0

PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overflow

Hello, I am attempting to use the pic16f886 via Timer1 to drive a simple Clock display.
This is only for my own personal interest not for a particular job so don't delve in too deeply unless you really want to.
Clock display is Driven via Max7219 SPI 8 x 7 segment Display Driver. (cheap nasty nock off no doubt)
I decided to use a 32.768KHz crystal via Timer1 overflow interrupt to generate the seconds pulse.
Setting Timer1 to use external Crystal between pins 11/12 with caps to Gnd.
I had it running for about 8 Hours overnight and the PIC time lost about 3 mins not that great.
I have tried many different ways to achieve the timing.
With Interrupt enabled on Timer1
1) [Timer1 overflows]/[Interrupt triggered]/[Interrupt code increments time by 2 seconds]/[Updates Display]
2) [Timer1 overflows]/[Interrupt triggered]/[Interrupt code sets flag]/[Main code/if flag set inc time by 2 seconds update display/ clear flag]
With Interrupt Disabled on Timer1
3)[Timer1 overflows]/[Main code waits for change in TMR1H Bit7(MSB of Timer1) - If change detected increment time by 1 second]
All above give bad results.
Crystal gives 32768Hz so every 2 seconds this will cause Timer1 to overflow and trigger interrupt every 2 seconds.
I was wondering if the Timer1 was not counting the pulses just after the Timer1 interrupt was running, but found that it was by
sending TMR1L to the Clock display and it showed it had incremented to 4 by the time I had read it. Pic was running at a low 250KHz
internal clock speed to test this.
I did try and modify the TMR1L and TMR1H registers to try and offset timings a little but thats just asking for trouble.
I then went though the Datasheet again and read a section that sounded like the PIC16F886 had a 32.768KHz oscillator built in.
So I removed my external crystal and caps and the clock continued to run as before.
So I assume it has one built in, One forum post suggested that they didn't because why would it have the thing allocated pins on the pic if it was internal.
So can someone tell me for sure that there is no built in crystal? and if there isn't why is the clock still running when i remove it?
Thank you.
Paul.
#1

19 Replies Related Threads

    ric
    Super Member
    • Total Posts : 27022
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/13 06:06:30 (permalink)
    +1 (1)
    Can you show us the exact code you have in your ISR?
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    Paul Thompson
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2010/07/18 09:21:19
    • Location: 0
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/13 07:18:21 (permalink)
    0
    Hello, Here is the code, Its a mess as copy and past seems to lose the TAB positioning.
    The code I am posting below is for method number 2 in my list.
    2) [Timer1 overflows]/[Interrupt triggered]/[Interrupt code sets flag]/[Main code/if flag set inc time by 2 seconds update display/ clear flag]
     
    ORG 0x004 ; interrupt vector location
    ;
    movwf w_temp ; save off current W register contents
    movf STATUS,w ; move status register into W register
    movwf status_temp ; save off contents of STATUS register
    movf PCLATH,w ; move pclath register into w register
    movwf pclath_temp ; save off contents of PCLATH register
    ; MOVLW D'00' ;Not sure if this required
    ; MOVWF PCLATH ;Not sure if this required
     
    BANKSEL PIR1 ;
    BTFSC PIR1,TMR1IF ; checks to see if the timer interrupt caused the int trigger.
    GOTO TIMER1INT ;
    GOTO TMR1END ;; if not do nothing something else caused it and not Timer1 overflow.
     
    TIMER1INT ;
    BANKSEL PORTA ;
    BSF DOUPCOUNT,7 ;Set Flag for main code to check to count up.
    TMR1END
    BANKSEL PIR1 ;
    BCF PIR1,TMR1IF ;Reset the interupt flag. Must be done in software.
    movf pclath_temp,w ; retrieve copy of PCLATH register
    movwf PCLATH ; restore pre-isr PCLATH register contents
    movf status_temp,w ; retrieve copy of STATUS register
    movwf STATUS ; restore pre-isr STATUS register contents
    swapf w_temp,f ;
    swapf w_temp,w ; restore pre-isr W register contents
    retfie ; return from interrupt
     
    The code isn't doing anything special just setting a flag.
    Time does count up like its doing seconds but goes adrift after a short time.
     
     
    Other method does not use interrupt routine and just checks for the TMR1H,7  (MSB bit) changes every second.
    Normal program runtime code , No interrupt
     
    LOOPIT
    BANKSEL PORTA
    CALL UPDATE1    ;Update 7 segment Displays.
    BTFSS DOUPCOUNT,7 ;was TMR1H,7 set before?
    GOTO CCC ;no
    GOTO AAA ;Yes
    AAA
    BANKSEL TMR1H
    BTFSS TMR1H,7 ;Is TMR1H,7 Set now?
    GOTO BBB
    GOTO LOOPIT ;Yes , do nothing
    BBB
    BANKSEL PORTA
    BCF DOUPCOUNT,7 ;clear flag
    CALL UPCOUNT ;Count up by one.
    GOTO LOOPIT ;return

    CCC
    BANKSEL TMR1H
    BTFSS TMR1H,7 ;Is TMR1H,7 set now?
    GOTO LOOPIT ;Do nothing
    GOTO DDD

    DDD
    BANKSEL PORTA
    BSF DOUPCOUNT,7 ;
    CALL UPCOUNT ;
    GOTO LOOPIT ;
     
    Cheers.
    Paul.
    #3
    RISC
    Super Member
    • Total Posts : 5607
    • Reward points : 0
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/13 09:58:38 (permalink)
    +1 (1)
    Hi,
    So can someone tell me for sure that there is no built in crystal? and if there isn't why is the clock still running when i remove it?
    AFAIK there is no microcontroller on the market which has a XTAL oscillator built-in (XTAL are generally made out of quartz).
    It is not written anywhere in the PIC16F886 datasheet that this an XTAL oscillator but just an oscillator or an internal oscillator.
    Be aware thar there is a silicon issue with TIMER1 which is documented here 
    It is possible to make an accurate clock with TIMER1 but remember that this is an asynchronous one and therefore pay attention how you update it. e.g. if you use 1s interrupt with 32kHz, ONLY update the TMR1H to 0x80 do not touch TMR1L
    Regards
    #4
    Paul Thompson
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2010/07/18 09:21:19
    • Location: 0
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/13 14:03:34 (permalink)
    0
    Aha Thanks RISC, Will check out the errata info.
    Yes I was changing both TMR1L and TMR1H at some point in my tests and I ended up only modifying TMR1H after further testing as this would have more chance of me writing a value to it just as it updates via the pic hardware (causing problems as its the fastest changing register.) 
    The aim of this was to replace a faulty part in an LED watch, Watch has LED matrix of 72 LEDS on one thin board with driver transistors and batteries and chip onboard blob on the other. In my madness I decided to give it a try.
    But if I cant get a semi decent clock running it would be a bit silly to continue.
    Thanks again for the Tips.
    Paul.
    #5
    RISC
    Super Member
    • Total Posts : 5607
    • Reward points : 0
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/13 14:33:55 (permalink)
    +2 (2)
    Hi,
    I'm just curious why are you using assembler ??
    The XC8 C compiler is free...
    regards
     
    #6
    PStechPaul
    Super Member
    • Total Posts : 2671
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/13 21:22:55 (permalink)
    +1 (1)
    Are you sure the crystal is actually running at an accurate 32768 Hz? You might be able to speed it up a little by reducing the value of the capacitors. 3 minutes in 8 hours is almost 700 PPM which is probably beyond the ability to trim with capacitors. At first I thought you said 3 seconds/8 hours, which would be more like it.
     
    Are you sure your CONFIG bits are set for external low frequency crystal? Please show that as well.
     
    And your code will be easier to read, including formatting, if you use [code ] [/code ] tags (without the spaces).

     
    #7
    1and0
    Access is Denied
    • Total Posts : 10780
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/13 22:12:34 (permalink)
    0
    PStechPaul
    Are you sure your CONFIG bits are set for external low frequency crystal? Please show that as well.

    The crystal connected to Timer1 works independent of the PIC oscillator selection in the config bits.
    #8
    1and0
    Access is Denied
    • Total Posts : 10780
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/13 22:18:20 (permalink)
    +3 (3)
    Paul Thompson
    I decided to use a 32.768KHz crystal via Timer1 overflow interrupt to generate the seconds pulse.
    Setting Timer1 to use external Crystal between pins 11/12 with caps to Gnd.
    I had it running for about 8 Hours overnight and the PIC time lost about 3 mins not that great.

    Sound like you have a bad crystal or wrong value capacitors.
     

    I have tried many different ways to achieve the timing.
    With Interrupt enabled on Timer1

    Here's pseudo-code for ISR at one second interval:
    • save context
    • set TMR1H,7 bit for one-second interrupt
    • clear TMR1IF interrupt flag
    • increment sec01 variable
    • if (sec01 == 10) sec01 = 0 and increment sec10 variable
    • if (sec10 == 6) sec10 = 0 and increment min01 variable
    • if (min01 == 10) min01 = 0 and increment min10 variable
    • if (min10 == 6) min10 = 0 and increment hour01 variable
    • if (hour01 == 10) hour01 = 0 and increment hour10 variable
    • if (hour10 == 1 and hour01 == 3) hour10 = 0 and hour01 = 1
    • set update flag to update display
    • restore context
    • retfie
    where [ hour10,hour01 : min10,min01 : sec10,sec01 ] are the time variables in BCD format. In your main loop, check update flag and update the display.
     
     
    #9
    RISC
    Super Member
    • Total Posts : 5607
    • Reward points : 0
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/15 03:13:17 (permalink)
    +1 (1)
    Hi,
     
    Even a low quality 32kHz should not give more than 50ppm, so I believe your issue is a software issue...
    Do you have an oscilloscope ? If so toggle a pin in your interrupt and chek the frequency on that pin (don't do that on the oscillator as this will affect oscillator operation...
     
    Regards
    #10
    dan1138
    Super Member
    • Total Posts : 3496
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/15 08:46:29 (permalink)
    +2 (2)
    Using a Microchip DM163022-1 demo board (no longer available) I setup a PIC16F886 with the 32.768 KHz crystal oscillator driving TIMER1. 

    The results after running 22 hours is a 3±1 second loss. The error seems to be approaching -35ppm of the specified crystal frequency. The average ambient temperature of this period was 26°C. From typical crystal data sheets the frequency error at this temperature should be less than 10ppm. 

    My conclusion is that the bog standard circuit recommended by Microchip introduces more error in the oscillator frequency that one could want. 

    Here is a picture of my test setup:

    In your first post you said that you observed a loss of 3 minutes (180 seconds) after 8 hours. This level of error is too large for it to be cause by issues with the 32.768 KHz oscillator circuit. As others have commented your principle problem is most likely in your code.

    This is what I did to setup TIMER1:
    ;------------------------------------------------------
    Setup_TMR1:
    banksel Timer1Tick
    clrf Timer1Tick
    clrf Timer1Tick+1
    clrf Timer1Tick+2
    clrf Timer1Tick+3

    banksel PIE1
    bcf PIE1,TMR1IE

    banksel T1CON
    movlw b'00001110' ; Select Low power crystal oscillator, external clock, asynchronous mode
    movwf T1CON
    banksel PIR1
    bcf PIR1,TMR1IF
    banksel T1CON
    bsf T1CON,TMR1ON

    banksel PIE1
    bsf PIE1,TMR1IE
    banksel INTCON
    bsf INTCON,PEIE

    banksel INTCON
    bsf INTCON,GIE

    pagesel Main
    goto Main


    This is my ISR:
    ;
    ; Data updated by TIMER1 to count seconds
    ;
    RTC_DATA udata
    Timer1Tick res 4

    ;*******************************************************************************
    ; Interrupt Service Routines
    ;
    ;
    ; Interrupt context save RAM
    ;
    INTERRUPT_DATA udata_shr
    WREG_SAVE res 1
    STATUS_SAVE res 1
    PCLATH_SAVE res 1
    ;
    ISR CODE 0x0004 ; interrupt vector location
    ;
    ; Save context on entery of ISR
    ;
    movwf WREG_SAVE
    movfw STATUS
    movwf STATUS_SAVE
    movfw PCLATH
    movwf PCLATH_SAVE
    clrf PCLATH
    clrf STATUS
    ;
    ; Handle interrupt events here
    ;
    ; Handle TIMER1 interrupt
    ISR1:
    banksel PIE1
    btfss PIE1,TMR1IE
    goto ISR2
    banksel PIR1
    btfss PIR1,TMR1IF
    goto ISR2
    bcf PIR1,TMR1IF
    bsf TMR1H,7
    banksel Timer1Tick
    movlw h'01'
    addwf Timer1Tick,F
    btfsc STATUS,C
    addwf Timer1Tick+1,F
    btfsc STATUS,C
    addwf Timer1Tick+2,F
    btfsc STATUS,C
    addwf Timer1Tick+3,F

    goto ISR2

    ISR2:
    ;
    ; Restore context on exit of ISR
    ;
    movfw PCLATH_SAVE
    movwf PCLATH
    movfw STATUS_SAVE
    movwf STATUS
    swapf WREG_SAVE,F
    swapf WREG_SAVE,W
    retfie


    This is my main application loop:
    ;
    ; LCD messages
    ;
    LCD_message1:
    dt "v1.0 - PIC16F886",0

    ;*******************************************************************************
    ; MAIN PROGRAM
    ;*******************************************************************************
    MAIN_DATA UDATA
    TickSample res 4

    MAIN_PROG CODE ; let linker place main program

    Main:
    movlw (FOUR_BIT&LINES_5X7)
    lcall OpenXLCD

    movlw LINE_ONE
    lcall SetDDRamAddr

    movlw LOW(LCD_message1)
    movwf pszLCD_RomStr
    movlw HIGH(LCD_message1)
    movwf pszLCD_RomStr+1
    lcall putrsXLCD

    bankisel Timer1Tick
    movlw Timer1Tick+3
    banksel FSR
    movwf FSR
    bcf INTCON,GIE
    banksel TickSample
    movf INDF,W
    movwf TickSample+3
    decf FSR,F
    movf INDF,W
    movwf TickSample+2
    decf FSR,F
    movf INDF,W
    movwf TickSample+1
    decf FSR,F
    movf INDF,W
    movwf TickSample
    bsf INTCON,GIE

    AppLoop:
    movf INDF,W
    xorwf TickSample,W
    btfsc STATUS,Z
    GOTO AppLoop
    bankisel Timer1Tick
    movlw Timer1Tick+3
    banksel FSR
    movwf FSR
    bcf INTCON,GIE
    banksel TickSample
    movf INDF,W
    movwf TickSample+3
    decf FSR,F
    movf INDF,W
    movwf TickSample+2
    decf FSR,F
    movf INDF,W
    movwf TickSample+1
    decf FSR,F
    movf INDF,W
    movwf TickSample
    bsf INTCON,GIE

    movlw LINE_TWO
    lcall SetDDRamAddr

    movf TickSample+3,W
    lcall PutHexXLCD
    movf TickSample+2,W
    lcall PutHexXLCD
    movf TickSample+1,W
    lcall PutHexXLCD
    movf TickSample,W
    lcall PutHexXLCD
    GOTO AppLoop

    END
    post edited by dan1138 - 2020/05/15 09:23:42

    Attached Image(s)

    #11
    Paul Thompson
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2010/07/18 09:21:19
    • Location: 0
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/17 03:52:09 (permalink)
    0
    Hello, I'm afraid C is not something that I understand very well. I have dabbled with it but all those brackets just confuse me :-)
     
    #12
    Paul Thompson
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2010/07/18 09:21:19
    • Location: 0
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/17 04:01:00 (permalink)
    +1 (1)
    Golly, I am really grateful on how people are willing to delve into stuff for help.
    I am afraid it may be my setup that caused the timing errors.
    I don't have a fancy development board just a Pickit 3 and breadboard at the mo which I know isn't the "Ideal" setup for generating accurate timings/results.
    I have fiddled around with layout and managed to get the clock to run at a reasonable accuracy.
    I think I got it to about 1 second per 24 Hours on my last long test which is pretty good.
    This was using the 2 second Timer1 interrupt call and incrementing the second count by 2 on every call.
    I tried other methods and it was prob the same accuracy (but I didn't do a long test)
    I do like how everyones code layout is so neat and structured.
    I always struggle to understand code from previous projects because of this.
    I must try harder.
    Cheers.
    Paul.
     
    #13
    Paul Thompson
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2010/07/18 09:21:19
    • Location: 0
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/17 04:05:14 (permalink)
    0
    Hello, Yes caps were some nasty things I ordered off ebay probably just blobs of brown plastic on wires.
     
    I was put off modifying the TMR1H counters, but may do an experiment and test it to do 1 second Interrupt calls.
    I don't actually need to have a 1 second / second count as the watch will have no seconds readout.
    But on thinking about it I could implement it on the Display so will give it a go.
    Paul.
     
    #14
    Paul Thompson
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2010/07/18 09:21:19
    • Location: 0
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/17 04:14:28 (permalink)
    +1 (1)
    Hello,
    I think my problem WAS the crystal not running at 32768Hz. I changed the Caps so some I had for ages and not ones recently-ish bought from ebay. The result is its not only losing about 1 second per day I think.
    Yes config bits are all set correct.
    Yes my code formatting skills are severely lacking I know :-)
    I never had any proper programing lessons from school or college, I started coding on my commodore 64 via pokeing
    values into memory then moved to assembler and learn't from modifying other peoples code. When I got interested in PICs I had to draw a table of Commodore assembly next to PIC assembly so I could relate to what each instruction did.IE  Commdore LDA #$40 = PIC MOVLW 0x40  etc. it was daunting but eventually I've got used to it.
    Cheers
    Paul.
     
    #15
    PStechPaul
    Super Member
    • Total Posts : 2671
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/18 20:06:50 (permalink)
    0
    If you use the Microchip code editor, it automatically provides some formatting. You can also use a "code beautifier" to arrange your code in a more elegant and readable format.
     
    https://codebeautify.org/
     
    Also, Notepad++ does a good job formatting code.
     
    Other ideas:
    https://www.microchip.com/forums/m19910.aspx
    https://pic-microcontroller.com/introduction-microchip-pic-assembler-language-part-1/
    https://www.youtube.com/watch?v=8XnDVsY-83A
     

     
    #16
    Gusman_D9
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2020/03/20 05:55:09
    • Location: 0
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/22 04:41:15 (permalink)
    -1 (1)
    Hi, I am currently working with timers, but on the PIC16f688, with the aim of generating output signals at accurate set frequencies. 
     
    My program is using the internal 8MHz oscillator, the internal oscillators are also available on the 16f886.  I had some bother with external oscillators on earlier programs and was recommended to use the internal ones while I get to grips with embedded programming (this is my first PIC project programing with C, used JAL before that).  I was initially sending and receiving serial data, but with the external oscillators the data was never correct, I tried tuning with the oscillator control bits to try to get the baud rates correct but changing to the internal oscillator solved the issues more easily.  
     
    With Timers so far I've used the timer overflow interrupt to trigger an ISR where I toggle the output pins, I've been altering the starting value in TIR1H and TIR1L registers so that I can produce interrupts at set times.  I've found the amount of code in the ISR has a big effect on the toggle time, all the instruction cycles within the ISR need taken into account as well as the time the timer will take to overflow.  My next step is to work out the number of instruction cycles in my ISR and then work out what to set TIMR1 to and see if I can get the results I want.  
     
     
     
    #17
    PStechPaul
    Super Member
    • Total Posts : 2671
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/22 13:42:07 (permalink)
    +2 (2)
    You should really start a new thread for your issues. They are only marginally related to those of the OP, which have been solved, and this thread should be closed.
     
    An external crystal can be tweaked to obtain a very accurate clock frequency by adjusting the parallel capacitors. And then you can use the software simulator and stopwatch to compensate for the code overhead in the ISR. But it may be better to use other techniques to get the timing you wish.

     
    #18
    Gusman_D9
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2020/03/20 05:55:09
    • Location: 0
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/23 04:25:57 (permalink)
    0
    PStechPaul
    You should really start a new thread for your issues. They are only marginally related to those of the OP, which have been solved, and this thread should be closed.
     
    An external crystal can be tweaked to obtain a very accurate clock frequency by adjusting the parallel capacitors. And then you can use the software simulator and stopwatch to compensate for the code overhead in the ISR. But it may be better to use other techniques to get the timing you wish.




    Oops, I meant my post to read: I also had issues with external oscillators, using the internal one avoided those issues allowing me to move on to other problems. Appreciate the pointers.
    #19
    1and0
    Access is Denied
    • Total Posts : 10780
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: PIC16F886, Problems using 32.768KHz to generate accurate second count via Timer1 overf 2020/05/23 04:52:40 (permalink)
    +2 (2)
    Gusman_D9
     
    Oops, I meant my post to read: I also had issues with external oscillators, using the internal one avoided those issues allowing me to move on to other problems. Appreciate the pointers.

    Your use of external oscillator is different from the OP of this topic. Your external oscillator is for the primary system clock, while OP external crystal is for Timer1 only.
     
    #20
    Jump to:
    © 2020 APG vNext Commercial Version 4.5