EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / ISR CODE

ISR CODE

|

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

}

 

RSS Recent Posts

  • FM Radio circuits February 7, 2026
  • wall transformer polarity February 7, 2026
  • To buy or DIY? February 7, 2026
  • engineering analysis of shmidth trigger without simulation February 6, 2026
  • ANOTHER OLD PROJECT REDO February 6, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise