Interrupt Service Routine for Car Ignition!

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.

Replies

  • Harshad Italiya
    Harshad Italiya
    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
  • JAIHO
    JAIHO
    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 .

You are reading an archived discussion.

Related Posts

Training help needed-2nd year EXTC hi all 1.I have finished my 2nd year engg in elec and telecomm and want to do some training of about 1 month to utilize...
We said goodbye to March, managed to make it through April Fools', and now it's time for a look back at the most popular posts of the week. Remember, if...
can anyone explain the operation of four switch buck-boost converter and to make act as buck and boost mode operation.😕
can anyone tel me some projects which are related to design field.....plz share wit me if anyone has an idea..