Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/22/06 09:18
Read: times


 
#120842 - interrupt program
Responding to: ???'s previous message

/*
Author Nikhil Arora
ele.nikhil@gmail
Learning SDCC
Interrupt caused when P3.2 is made low negativetransition
Program in main loop goes on parallelly
*/
#include <at89x051.h>

//external interrupt 0 uses register bank 1
void extint0_isr (void) interrupt 0 using 1
{
P1 = ~P1;
}


void main(void)
{
int i;
char j;

IT0 = 1; //Edge triggered
EX0 = 1; /* ENABLE GLOBAL INTERRUPT */
EA = 1; /* ENABLE GLOBAL INTERRUPT */


while(1)
{
P3_7 = !P3_7;
for(i=0;i<1000;i++)
{
for(j=0;j<100;j++){}
}
P3_7 = !P3_7;
for(i=0;i<1000;i++)
{
for(j=0;j<100;j++){}
}
}

}


List of 14 messages in thread
TopicAuthorDate
i want to learn sdcc and keil plz help            01/01/70 00:00      
   Example ?            01/01/70 00:00      
      need simple code to start with            01/01/70 00:00      
   what is in the manual            01/01/70 00:00      
      nice site            01/01/70 00:00      
         try mine            01/01/70 00:00      
   why not use e-mail            01/01/70 00:00      
   This is all there for you to see            01/01/70 00:00      
      simple program to check the hardwar            01/01/70 00:00      
   Timer program            01/01/70 00:00      
   interrupt program            01/01/70 00:00      
      how bloody awful            01/01/70 00:00      
   Serial program            01/01/70 00:00      
      How to post code            01/01/70 00:00      

Back to Subject List