Timer interrupt in PIC16F877A working explained

Поделиться
HTML-код
  • Опубликовано: 8 дек 2024
  • In this lecture you will acquire knowledge on working of timer interrupt program in the microcontroller PIC16F877A ,This is a course on programming in MPLAB X IDE using XC8 compiler for the microcontroller PIC16F877A,.
    Here is the Full playlist link for this course:
    MPLAB X IDE Programming Course Playlist Link: • MPLAB X IDE Programmin...
    For learning this course for free with all the documents and necessary source code for all the lectures
    visit us on : www.smtrainingacademy.com
    Embedded Courses Link: smtrainingacade...
    CONTACT US ON : smtrainingacademy@gmail.com
    Advantage of learning the course on our site is you can access all the source code and documents necessary then and there and you can track your progress in the courses. visit our site ,Register for free and login to get access to lot of courses like this for free.

Комментарии • 17

  • @chaimapro9085
    @chaimapro9085 Год назад

    The calculation of the time delay is just great. Thank you!!

  • @longanang6218
    @longanang6218 5 месяцев назад

    Thank you, but.
    why is machine cycle equal to 4/20MHz ?
    where is 4 from ?

  • @nyashadzashechikarakara5330
    @nyashadzashechikarakara5330 2 года назад +2

    Thank you, it is very clear but how is it different, using the timer and using __delay_ms(300);

  • @SaiSai-jj8vy
    @SaiSai-jj8vy Год назад +1

    super bro Explanation.

  • @yashvarshney6761
    @yashvarshney6761 4 года назад +1

    Best lecture.
    Lekin baaki comments kaha hai

  • @RahulYadav-qm6mc
    @RahulYadav-qm6mc 3 года назад +1

    Bro u r Pro

  • @ranganathanrajaram2121
    @ranganathanrajaram2121 4 года назад +1

    Sir this is my program but not working pls tell me the reason
    Unsigned long=i;
    void interrupt timer()
    {
    if(INTCONbits. TMR0IF==1)
    {i++;
    TMR0=236;
    INTCONbits. TMR0IF=0;
    }}
    void main()
    {
    TRISB=0;
    INTCONbits. GIE=1;
    INTCONbits. PEIE=1;
    INTCONbits. TMR0IE=1;
    OPTION_REG=0x27;
    TMR0=236;
    while(1)
    {
    if(i==1000)
    {PORTBbits.RB1=0;
    }
    if(i=2000)
    {PORTBbits.RB1=1;
    i=0;}}
    return;}

    • @SMtrainingacademy
      @SMtrainingacademy  4 года назад

      Can you tell the error you got..?
      Or send the program to
      smtrainingacademy@gmail.com
      I will rectify and send you back

    • @ranganathanrajaram2121
      @ranganathanrajaram2121 4 года назад

      @@SMtrainingacademy the problem I faced is led not toggled at RB1 pin while all the pins in Port B has been active high

    • @ranganathanrajaram2121
      @ranganathanrajaram2121 4 года назад +1

      Finally I got the answer I wrongly mentioned option register value 0x27 instead of 0x87 thank u sir

    • @SMtrainingacademy
      @SMtrainingacademy  4 года назад

      Ok