+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Junior Member level 2
    Points: 403, Level: 4

    Join Date
    Mar 2011
    Posts
    21
    Helped
    0 / 0
    Points
    403
    Level
    4

    16-bit Timer for PIC18F452

    hi i m trying to learn the timer for PIC18F452...please anyone can help me out about how to configure the timer and how to use TMR1L and TMR1H registers...



    many thanks
    akshay gadaria

    •   AltAdvertisement

        
       

  2. #2
    Full Member level 5
    Points: 2,045, Level: 10
    errakeshpillai's Avatar
    Join Date
    Oct 2011
    Location
    Chennai, India
    Posts
    256
    Helped
    64 / 64
    Points
    2,045
    Level
    10
    Blog Entries
    5

    Re: 16-bit Timer for PIC18F452

    Quote Originally Posted by angadaria View Post
    hi i m trying to learn the timer for PIC18F452...please anyone can help me out about how to configure the timer and how to use TMR1L and TMR1H registers...
    many thanks
    akshay gadaria
    This pdf file may help you learn the Timers in PIC...
    PIC Microcontrollers An Introduction to Microelectronics 2e.pdf

    Also one of the previous Edaboard thread might help you..
    What is the procedure for PIC timer0 to generate a 1 ms or 1 sec interrupt?
    Last edited by errakeshpillai; 8th January 2012 at 16:19.
    Hope it has helped you.....
    Don't be shy in asking questions..,
    Asking questions will help the cause of increasing your knowledge..



    •   AltAdvertisement

        
       

  3. #3
    Administrator
    Points: 69,512, Level: 64
    Achievements:
    Created Album pictures Created Blog entry 7 years registered
    bigdogguru's Avatar
    Join Date
    Mar 2010
    Location
    Southwest, USA
    Posts
    9,832
    Helped
    2358 / 2358
    Points
    69,512
    Level
    64
    Blog Entries
    4



    •   AltAdvertisement

        
       

  4. #4
    Junior Member level 2
    Points: 403, Level: 4

    Join Date
    Mar 2011
    Posts
    21
    Helped
    0 / 0
    Points
    403
    Level
    4

    Re: 16-bit Timer for PIC18F452

    hi thank you for your suggestions both of you..
    accordingly i tried to write the basic code on my own just to check the overflow of the timer but it is not working. timer overflow flag is not getting set.
    i m using PIC16F877A with 8MHz frequency and i m using MikroC PRo for PIC IDE. can u please check the code and let me know what is the error or what is missing?

    void main()
    {
    TRISC=0x00; //configure port c as an o/p port
    while(1)
    {
    PIE1=0x01; //enables the timer1 overflow interrupt
    PIR1=0x00; //clear the timer overflow flag
    INTCON=0xc0; //enables the global and peripheral interrupt
    T1CON |=(1< while(TMR1IF==0); //polling the overflow flag
    PORTC=0x55;
    PIR1=0x00; //clear the interrupt flag
    }
    }



--[[ ]]--