#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); }
Sir plz dont consider all thing about the delay and comment that i'll rectify later
.What i want is to blink LED say any of P1.16 to P1.23 based on particular conditon..
e.g if(array[curr_process].task_id ==1 ) // blink any of P1.16-P1.23
Sir my programm is running nicely but when i see peripherals GPIO windows ..its not blinking IO1DIR : 0x0000 0000 IO1SET : 0x0000 0000 IO1CLR : 0x0000 0000 IO1PIN : 0xffff 0000 Pins : 0xffff 0000
IO1PIN : 0xffff 0000
So you have managed to set the pins? Have you tried to clear them too?