Jump to content

asimo

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About asimo

  • Rank
    Newbrie
  1. (sorry for my English) but if I write T0IF=.. GIE=... it does't work ex #pragma CLOCK_FREQ 4000000 //------------------------------------------------ void interrupt( void ) { PORTB ^= 0x80; // complement PORTB:7 T0IF=0; // clear TMR0 overflow flag } //------------------------------------------------ main() { OPTION_REG = 7; // set prescaler to 1:256 clear_bit(TRISB,7); // set PORTB:7 as OUTPUT GIE =1; // enable interrupts T0IE =1; // enable TMR0 overflow bit while(1) { clear_wdt(); } } clear...(..) and TOIF=0 have the same meaning????
  2. hi, what is the different if I write clear_bit( INTCON, T0IF ); //clear TMR0 overflow flag and T0IF=0; thx ???
×
×
  • Create New...