Microcontroller › 8051 › HOw to interface servo motor with 8051? › ISR CODE
August 23, 2015 at 3:22 pm
#13212
Rahul Tungar
Participant
you can not write ISR inside main.. isr code should be outside of your main function.
flow should be lyk this
void main()
{
//basic initialisation as per your hardware
//configure and enable interrupts
while(1);
}
void extr1(void) interrupt 0
{
//your ISR CODE
}
void extr0(void) interrupt 2
{
//your another ISR CODE
}