Sign In

Problem With NEC Ir Controller

dinusha dinushakothalawala@gmail.com Sri Lanka

Hardware: ATmega 16 16mhz External Crystal Nec Data Byte Display On Portc Software: Im Using AVR Studio6

i edited your NEC ir code on ATmega16 chip and 16mhz external crystal .i"m not using lcd display but i"m using portc for the displaying LED status of ir pattorn but module still not working can u help me for the verifying my problem

my remote like this link below,remote is working proper my another PIC16F877A code

http://www.dx.com/p/ir-remote-control-module-hx1838-receiver-nec-code-ir-remote-controller-for-mcu-207829#.WAS232YrLIU

Images

Program

/*#########################################################

Demo program for testing the IR Remote control libraries.
-----------------------------------------------------------

Copyright Avinash Gupta 2008 avinash@eXtremeElectronics.co.in

Web: www.eXtremeElectronics.co.in

Please give credit or reference to www.eXtremeElectronics.co.in
if you use this in your projects and find it useful.


##########################################################*/

#include <avr/io.h>

#include "remote.h"
//#include "lcd.h"

void main()
{
	uint8_t cmd=0;
    DDRC = 0xFF; //Nakes PORTC as Output
	RemoteInit();

	//LCDInit(LS_BLINK);

	///LCDClear();

	//LCDWriteString("IR RemoteDecoder");
	///LCDWriteStringXY(0,1,"Key Code:");

	while(1)
	{
		PORTC=GetRemoteCmd(1);
		//LCDWriteIntXY(10,1,cmd,3);
	}
}

Replies

R Avinash
2016-10-30 04:40:58
Severl things can break this code. Few being :-

* CPU Speed (so show the values of Low and High Fuse bytes and crystal speed)
* Sensor may not be correct TSOP1738 (so connect a LED using a transistor to check if it is responding to IR rays from your remote)
* Your remote may not be NEC format.

Post a reply to dinusha

Think you can help dinusha ? Then post your thoughts that might help dinusha. You will earn a lot of reputation in the technical community.

If your program is in multiple files, then ZIP the entire folder and attach below

Images and Screenshots

These helps other better understand your suggestion.