NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » Reading Input from Infra Red Remote

September 27, 2012
by ankush_karche
ankush_karche's Avatar

Hello All,

I was looking at code illustrated in thread http://www.nerdkits.com/forum/thread/834/

I have very basic queries on programs like this.

  1. Any one pin is assigned as input from IR diode then how the input is referred in program and in which interrupt sections.

  2. For further manipulation which variables/registers should be referred?

I wish to receive some tutorial or link explaining such basics.

Thanks in advance.

Regards, Ankush

September 27, 2012
by Ralphxyz
Ralphxyz's Avatar

Any one pin is assigned as input from IR diode then how the input is referred in program and in which interrupt sections.

ankush_karche, it would help to know more about your experience so far.

Have you gone through all of the Nerdkit User Guide projects?

What Nerdkits Tutorials have you completed?

I'll try to answer your question with my best guess of your understanding.

Any one pin is assigned as input from IR diode

You assign the input pin in your code.

then how the input is referred in program

Anyway you would like to refer to it. The Led_Blink project refers to a pin as output but just reversing the logic would give you input for essentially the same code.

and in which interrupt sections.

Interrupts are not required you could do this with polling in your while(1){ ... } loop.

But if you want to use interrupts you could start with a "pin change" interrupt.

Again study the Tutorials to learn about interrupts and input.

We really need specific questions, generalizations are hard to answer with any detail.

Hope this helps at least get you started.

Ralph

September 27, 2012
by ankush_karche
ankush_karche's Avatar

Thanks Ralph for your reply. I will go through tutorials again. And will post specific question.

Regards, Ankush

Post a Reply

Please log in to post a reply.

Did you know that you can see each keypress on a computer keyboard on an oscilloscope? Learn more...