Hot!PROBLEM IN CODING TIMER 0 OF PIC16F526

Author
saksunindustries6@gmail.com
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2017/05/18 23:48:49
  • Location: 0
  • Status: offline
2017/10/02 05:07:25 (permalink)
0

PROBLEM IN CODING TIMER 0 OF PIC16F526

Hii,
 
I'm using pic16f526, mplabx, xc8 compiler for coding. I'm trying to generate 15s delay using timer 0. But there was no T0IF bit present then how to run timer??how to know overflow is occurring or not??
plz help....
thank you.
#1

2 Replies Related Threads

    diegocw
    New Member
    • Total Posts : 5
    • Reward points : 0
    • Joined: 2017/12/06 13:48:46
    • Location: 0
    • Status: offline
    Re: PROBLEM IN CODING TIMER 0 OF PIC16F526 2017/12/07 10:20:05 (permalink)
    0
    it would be easier to help you if you would share your code.
    Anyway, make sure that have you correctly configured the following:
    - timer0's enable bit
    - timer0's prescaler and postscaler
    - timer0's preload value
    - timer0's clock source
    - timer0's interrupt must be enabled
    - general interrupts must be enabled
    - make sure to clear the timer0's interrupt flag once you are in the interrupt routine. TMR0IF=0
     
    And if you want to check if the interrupt is actually working you could use the Debug Tool from MPLAB or you could toggle an LED within the interrupt service routine, that way you can see it without needing the Debug Tool.
     
    I'm by no means an expert, this is the first time that I write something in this forum. That being said, I hope that what I wrote isn't wrong.
     
    Good luck
    Diego.
     
    #2
    qɥb
    Monolothic Member
    • Total Posts : 171
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: PROBLEM IN CODING TIMER 0 OF PIC16F526 2017/12/07 12:31:36 (permalink)
    0
    Why use an ancient PIC that does not implement interrupts at all?
    There are much nice, cheaper PICs that will fit into the same footprint.
     
    #3
    Jump to:
    © 2017 APG vNext Commercial Version 4.5