Timer interrupt in PIC16F877A working explained

Поделиться
HTML-код
  • Опубликовано: 4 дек 2024

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

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

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

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

    super bro Explanation.

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

    Best lecture.
    Lekin baaki comments kaha hai

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

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

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

    Bro u r Pro

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

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

  • @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