CrazyEngineers
  • Interrupt Service Routine for Car Ignition!

    JAIHO

    Member

    Updated: Oct 26, 2024
    Views: 1.0K
    I need to write an Interrupt Service Routine in C, for microcontroller. I have no idea where to start. I have an idea of the difference between using an Interrupt and a Polling. And I am going to go with Interrupt.
    Rather than making the Cpu ask the device , "is it done, is it done" until the device says " yes " .

    I would rather just go with a Interrupt. Except I have no clue where to start , This is my 2nd project at this company.
    How do you write an interrupt and how can i implement it on the development board ??

    I really appreciate the help you can give me. Thanks.
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Harshad Italiya

    MemberApr 4, 2009

    Dear Jai ho,

    First off all check that for interrupt which pin you are using and as you are using KEIL it shows the interrupt service routine for perticular pin... use that command..

    interrupt 1 using 2 or any other

    Or there is one more way..
    Continue checks that pin when that pin gets high or low edge then transfer your execution to ISR.

    Godfather
    Are you sure? This action cannot be undone.
    Cancel
  • JAIHO

    MemberApr 7, 2009

    Thanks Godfather. I completed the program.It's working now. Good luck with your studies ! I hope you do well.
    I Did some reverse engineering , to figure out how to configure the Timer, interrupt and ports.
    Thank you so much. I have another question that I am going to post. its' regarding adding a debounce code to the main Interrupt program I have.

    I have the interrupt routine working properly and the interrupt is edge triggered , from the Ignition.
    Now I want to debounce it and check if the edge has been triggered even after 1 second of the initial interrupt and PROCEED only after it's been confirmed. Any help you can give me , i will greatly appreciate it .
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register