I have had those issues before when dealing with precise timing and I assigned the registers a little less values and I was able to get an accurate measurement on the Oscilloscope. Data sheets are great references but theory and practices are seldom the same. Hardware by nature causes delays and we will never be able to illuminate those latencies. I wouldn't call the compiler stupid, it is something that is almost impossible to avoid.
I fixed the code. the way you did it dont work for xc8 #include #define _XTAL_FREQ 16000000 void __interrupt() myISR(void){ PORTBbits.RB0^=1; TMR0L=236; INTCONbits.TMR0IF=0; } void main(void){ TRISB=0; PORTB=0; T0CON=0b01001010; TMR0L=236; INTCONbits.TMR0IE=1; INTCONbits.GIE=1; T0CONbits.TMR0ON=1; while(1){
I have had those issues before when dealing with precise timing and I assigned the registers a little less values and I was able to get an accurate measurement on the Oscilloscope. Data sheets are great references but theory and practices are seldom the same. Hardware by nature causes delays and we will never be able to illuminate those latencies. I wouldn't call the compiler stupid, it is something that is almost impossible to avoid.
Very nice!!!
Please upload new videos. Your videos are soooooo good.
Good
Wish I could understand your accent like everyone else in the comments, it is very hard.
Thank you for the explanation, One thing I need to convey is that your English pronunciation is hard to grasp. Please make it more clear.
sir i could not understand latency. please need details maith
Latency delay is the "Delay" time it takes the signal to propagate (travel) from signal source to destination
error: expected ';' after top level declarator
I fixed the code. the way you did it dont work for xc8
#include
#define _XTAL_FREQ 16000000
void __interrupt() myISR(void){
PORTBbits.RB0^=1;
TMR0L=236;
INTCONbits.TMR0IF=0;
}
void main(void){
TRISB=0;
PORTB=0;
T0CON=0b01001010;
TMR0L=236;
INTCONbits.TMR0IE=1;
INTCONbits.GIE=1;
T0CONbits.TMR0ON=1;
while(1){
}
return;
}
why did he assign T0CON=0b01001010; shouldn't it stay 0b0000000
0