Hi,
I have found temporary solution to read the IR data. I have made a simple delay
routine that calculates the delay needed between two bits of the IR signal.
The Delay routine is as below :
void Delay_routine()
{
unsigned long Time_stamp;
/*Initially tp1.tv_nsec will contain the time stamp of the first bit.
Time stamp(in ns) of the next bit will be assigned to tp1.tv_nsec.*/
tp1.tv_nsec = tp1.tv_nsec+ 1728000; //1.728ms is the delay between
two bits.
/*needs to be converted in terms of us*/
Time_stamp = tp1.tv_nsec/10000;
/*loop will be executed until the time comes to read the next bit(i.e.
tp2.tv_nsec catches Time_stamp)*/
while((tp2.tv_nsec/10000) != Time_stamp)
{
clock_gettime (CLOCK_REALTIME, &tp2); //Call
clock_gettime to fill tp
}
return;
}
After this delay routine write the code to read the OUT_DATA register and
continuously call this delay routine after reading the register. Do this for
14 times, store 32 bit data and then extract bit no. 7 from each 14 data
values. Finally you will be having a bunch of 14 bits which will correspond to
the key pressed on remote.
>
> Hi Yan,
>
> Thank you very much for your response.
>
> I think, my problem is not with register. I tried to read both registers but
> nothing comes if I read IN_DATA register and something comes if I read
> OUT_DATA
> register.
> You might be knowing that IR signal cosists of a pulse train of 14 pulses
> (if any key is pressed on IR remote). These all pusles are written on the
> bit number 7 of OUT_DATA register with the time delay of 1.728ms. Now the
> problem is, when I continuously read 7th bit of OUT_DATA register, it gives
> some different values than what I found on CRO ( when some key is pressed on
> remote). So I think my problem is with the time delay at which I read 7th
> bit of OUT_DATA register.
>
> So will you guide me to solve this problem?
>
> Regards,
>
> Dhaval Lakkad
>
>
>
>> Read IN_DATA register instead of OUT_DATA register.
>>
>> -Yan
>>
>> Hi,
>>
>> I am using a custom board having DM6467. The board has an%
--
_____________________________________________________________________
Disclaimer: This e-mail message and all attachments transmitted with it
are intended solely for the use of the addressee and may contain legally
privileged and confidential information. If the reader of this message
is not the intended recipient, or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby
notified that any dissemination, distribution, copying, or other use of
this message or its attachments is strictly prohibited. If you have
received this message in error, please notify the sender immediately by
replying to this message and please delete it from your computer. Any
views expressed in this message are those of the individual sender
unless otherwise stated.Company has taken enough precautions to prevent
the spread of viruses. However the company accepts no liability for any
damage caused by any virus transmitted by this email.
__________________________________________________________________________
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source