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.
The calculation of the time delay is just great. Thank you!!
Thank you, but.
why is machine cycle equal to 4/20MHz ?
where is 4 from ?
Thank you, it is very clear but how is it different, using the timer and using __delay_ms(300);
Ya delay_ms also uses timer 0 in polling method but interrupt method produces more accurate time delay’s
@@SMtrainingacademy okay thank you
@@nyashadzashechikarakara5330 😊
super bro Explanation.
😊
Best lecture.
Lekin baaki comments kaha hai
😊
Bro u r Pro
Thanks Rahul
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;}
Can you tell the error you got..?
Or send the program to
smtrainingacademy@gmail.com
I will rectify and send you back
@@SMtrainingacademy the problem I faced is led not toggled at RB1 pin while all the pins in Port B has been active high
Finally I got the answer I wrongly mentioned option register value 0x27 instead of 0x87 thank u sir
Ok