NEC IR Protocol remote decoder, help me before I kill myself!


Closed Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    Join Date
    Dec 2004
    Location
    Scarborough UK
    Posts
    77


    Did you find this post helpful? Yes | No

    Default Re: NEC IR Protocol remote decoder, help me before I kill myself!

    I've looked at the nec ir protocol but i'm non the wiser :-(

    Just if anyone is interested I have attached the actual code that came with my remote and reciver IC kit, it was written for the arduino and commented in japanese, I have translated the comments to english but I cant translate the code, if anyone wants to look at it it might reveal to someone more experienced what I need to do to get it to work maybe ?.
    Attached Files Attached Files
    Reading the datasheet & understanding it are two different things.

  2. #2
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Re: NEC IR Protocol remote decoder, help me before I kill myself!

    Plan B:

    Use an other pic and set up the HPWM manually for 38 kHz. Then you connect an IR diode to the HPWM pin using a resistor to get aprox 20 mA in the led.

    Then in the code you make a simple main loop. Turn on the HWPM, delay 9 ms, and then turn off the HPWM, wait a while (i.e 5 ms) and then goto main again. Point this led towards the ir-receiver from a close distance and now you have a signal that you really know how it looks like. Then you put a shoebox upside down over both the receiver and the transmitter led so they get a nice dark space to be in.

    Have you ever thought about catching the IR signal using the CCP module or by using interupts and a timer?

    This way you can even build a text signal for the NEC protocol ... [startpulse] delay [bit0] delay etc..

    Which way to decode the signal is the best? Well it all depends what other things your pic will do. If it will only decode the IR signal you can just read the pin in a fast loop and increment a counter when it is LOW.

    Keep in mind that the receiver you are using is ACTIVE LOW.. so the pin will be high when there is no modulated IR light present.

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts