• AVR Freaks

Hot!I'm not getting Timer 1 and Timer 5 interrupt on PIC16F18346

Author
razmiggee
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2020/10/07 14:59:06
  • Location: 0
  • Status: offline
2020/10/30 09:54:41 (permalink)
0

I'm not getting Timer 1 and Timer 5 interrupt on PIC16F18346

I'm not getting Timer 1 interrupt on PIC16F18346
Timer 5 gate needs to be routed to input RA0 there are pulses coming in  T5GPPSbits.T5GPPS = 0x00;
Timer 5 gate is active when low T5GPOL = 0;
Timer 5 counters low and high are initialized to zero TMR5L=TMR5H=0;
Timer 5 config. T5CON = 0b11100100; Timer5 clock LFINTOSC, Prescale 1:4, Do not sync external clk input
Timer is turned on TMR5ON = 1;
Timer gate is on TMR5GE = 1;
Timer 5 overflow enabled TMR5IE = 1;
I also made sure that the watchdog time is disabled!
I expect to see an interrupt when timer5 overflows, but, it does not happen.
#1

3 Replies Related Threads

    upand_at_them
    Super Member
    • Total Posts : 739
    • Reward points : 0
    • Joined: 2005/05/16 07:02:38
    • Location: Pennsylvania
    • Status: online
    Re: I'm not getting Timer 1 and Timer 5 interrupt on PIC16F18346 2020/10/30 13:16:14 (permalink)
    -1 (1)
    Duplicate thread.
    #2
    razmiggee
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2020/10/07 14:59:06
    • Location: 0
    • Status: offline
    Re: I'm not getting Timer 1 and Timer 5 interrupt on PIC16F18346 2020/11/04 10:47:38 (permalink)
    -1 (1)
    can I see a typical ISR construct for XC8 compiler using the 5 interrupts below
    TMR0IE
    TMR3IE
    TMR5IE
    IOCIE
    RCIE
    I have a feeling you guys were correct my code ISR routine construction is at flaw
    just show me the construction, don't need to fill in any code.
    This will be most helpful controller is PIC16F18346
     
    Thank you
    Raz
    #3
    ric
    Super Member
    • Total Posts : 28943
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: I'm not getting Timer 1 and Timer 5 interrupt on PIC16F18346 2020/11/04 12:08:41 (permalink)
    +1 (1)
    You already have a thread on this very question, and received an answer telling you what to do at https://www.microchip.com/forums/FindPost/1157146
    Please do NOT feed multiple threads about the same question.
     

    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!
    #4
    Jump to:
    © 2020 APG vNext Commercial Version 4.5