How to Add A Infrared Interrupt to AVR
Some one may need to use a remote changing the way his/her AVR runs, then, obviously, a Infrared (IR) remote is the most easy solution.
Want to do it? Here is what you need to do
1. PCM Remote Control Systems Receiver Module, I choose VISHAY’s TSOP1738 which can sensitive to 36KHz Carrier Frequency and 950nm wave-length Infrared. You can get more information from its datasheet:VISHAY’s TSOP138
2. You need a 4.7uf capacitor to suppress power supply disturbances.
And If you get these, you can follow the Schematic to connect them to your AVR,
The PDF file: Add A Infrared Interrupt to AVR.pdf
And Here is an Example Code
//* This code was created by Liang Chen known as BiGreat
//* Everyone can use it without any restrict
//* IN IAR EWAVR TESTED
#include “imo8.h”
#include “inavr.h”
#pragma vector = INT0_vect
__interrupt void INT0_Int(void);
void delay(unsigned int uiCount)
{
unsigned int uiCounter;
for(uiCounter=0;uiCounter<uiCount;++uiCounter)
{
__delay_cycles(1000);
};
}
main()
{
DDRD=0×00;
PORTD=0xff;
DDRC=0xff;
PORTC=0×00;
GICR=0×40; //enable int0
MCUCR= (0<<ISC01)|(1<<ISC00); //changing
__enable_interrupt();
while(1);
}
__interrupt void INT0_Int(void)
{
PORTC=0xff;
delay(10);
PORTC=0×00;
}
machine machines slot play online play machine slot
play slot machine machines - July 26th, 2008 at 9:16 pmfrance rentals car cheap rentals in car france
cheap france rentals car - December 31st, 2008 at 9:28 amcrookston university minnesota minnesota university website
minnesota university occupational - January 4th, 2009 at 12:46 pmappraisal fha streamline refinance fha streamline for refinance
guidelines streamline refinance fha - January 7th, 2009 at 12:27 pm