Jump to content

amardeep

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About amardeep

  • Rank
    Newbrie
  1. hello i am try to understand some conditional loop in the code which is written by Dan McFarland (Speed control for a single-phase AC motor using Microchip's Picdem MC demo board and BoostC compiler ) code located at http://www.sourceboost.com/Products/BoostC/ExampleCode/cmotor/cmotor.c.html // FLAGS bits #define TIMER0_OV_FLAG 0 #define INC_INDEX1_FLAG 4 #define INC_INDEX2_FLAG 5 // FLAGS1 bits #define DEBOUNCE 0 #define KEY_RS 1 #define KEY_PRESSED 3 #define RUN_STOP 4 #define RESET 5 #define FREQ_UPDATE 6 UCHAR flags ; // res 1 ;Flags registers used to indicate different status UCHAR flags1 if ( flags & (1<<TIMER0_OV_FLAG) ) // back from Timer0 overflow? btfss flags, TIMER0_OV_FLAG { Update_PWM_Dutycycles(); // Yes, update the PWM duty cycle with new value Update_Table_Offset(); // Update offsets flags &= ~(1<<TIMER0_OV_FLAG); // Clear the flag } what it does mean ??? if ( flags & (1<<TIMER0_OV_FLAG) ) // back from Timer0 overflow? btfss flags, TIMER0_OV_FLAG please help me
×