This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

led is not blinking whiel simulation

#define ledon IO1SET
#define ledoff IO1CLR

void EDF_scheduler(void);
int main(void)
{ IODIR1 = 0x00FF0000; scheduler();
}

void scheduler(void)
{ while(1){ int i,time=0; int curr_process=0; while(time<sim_time) { if(curr_process > -1) { if(array[curr_process].ceu < array[curr_process].wcet ) { array[curr_process].ceu++;
if((array[curr_process].task_id )==1 ) { here i want to blink led ledon = (1<<16); // Turn ON P1.16 – P1.23 delay(900000); ledoff= (1<<16); // Turn OFF P1.16 – P1.23

}

if((array[curr_process].task_id) ==2 ) { ledon = (1<<17); // Turn ON P1.16 – P1.23 delay(9000); ledoff= (1<<17); }

Parents Reply Children
No data