Searching \ for '[PIC] Re: Receiving Infrared and common problems w' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'Re: Receiving Infrared and common problems w'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] RE: Receiving Infrared and common problems w'
2007\06\24@145120 by wouter van ooijen

face picon face
> Dear reader,
> [some rant snipped]

1. You require from others that they provide you (for free) something
that is usefull according to your rules. Then if you post on a forum,
*you* might invest some time into the rules and mechanisms of that
You might have discoverd that we use tags here, [PIC] being the most
used and the one appropriate to your posting. Without it you post will
be seen by only a fraction of the people that would see it with the

> "Receive a button-press-caused infrared-signal from a
> remote control with a TSOP1740(IR receiver module)

I dunno what internet you searched for your intel, but remotes that
operate at 40 kHz are a rare breed. 36 and 38 kHz are the most common.

> 2. Identify the button being pressed. Then return a number
> representing the button being pressed.

You are aware that there are all types of remotes, often with their own
protocol? There are some that are more common than others (for
instance RC5), but as you state it you are asking for an interpreter
that can translate "a text" for you. Though luck finding one.

> All comments I have read in the code are totally
> useless as they describe what everyone has already noticed.

I partly agree with you, but you must keep in mind that comments can
be usefull for a specific public, a you might not fit the public the
author had in mind when he wrote the comments. Or maybe you did not
well enough. Or all PIC code writers are totally stupid. Choose what you
think is most probable.

> What I want is the routine mentioned.

So go head, write it, document it well, and make it public. James will
happily provide you an internet page for it (in fact he provides you
the means to make one yourself, on his server).

Or are you of the kind that asks everything but never gives?

PS Your claim made me curious, so I googled "ir receive code pic".
The first hit is a quite adequately commented project. I did not
feel like looking any further.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica:
consultancy, development, PICmicro products
docent Hogeschool van Utrecht:

2007\06\25@185722 by Hector Martin

Thilo Klein wrote:
>      I want to go into detail about my experiences: There are all
>      kinds of code-examples, everytime combined with varieties of
>      hardware. No simple routine to call and get the values needed.
>      Not at all. It seems to me as if the creators of theses codes
>      have never ever reached adulthood. And this is meant in a
>      negative way. All comments I have read in the code are totally
>      useless as they describe what everyone has already noticed.
You sound like you really don't know what you're talking about. If you
had done any research at all, you would have noticed that there are
dozens of IR remote protocols around, and hundreds of brands and devices
each with its own set of codes. There is no such thing as a universal
routine that will magically turn a signal from an IR receiver module
into a button code, for the same reason there is no such thing as a
universal remote that will work for any device with no configuration.
Even the so-called universal remotes are incomplete for many devices and
don't work for others, and the only reason they are "universal" is
because they have a built-in database of codes for each brand and model.

>      For example(in picbasic): "PORTA = PORTA >> 1 & %00001111  'PORTA
>      moving 1 to the right whereas bit 4 to 7 are hidden." Totally
>      useless. I am asking WHY this is done exactly there to get a clue
>      what to delete or expand and not what it does.

Unless the code is obfuscated or extremely complex, you should be able
to figure out what to do by reading it. Understand what the code does,
and you'll be able to modify it. If your approach to programming is
copy-and-paste-and-blindly-change-things, I wouldn't want to be your

Infrared signalling is easy enough to implement from scratch if you have
any sort of experience with microcontrollers. If you don't, spend some
time and learn. You'll never get anywhere if you just expect others to
write code for you. If other people's solutions don't satisfy you, write
your own, learn from it, and post your findings so others can benefit
from them.

>      What I want is the routine mentioned. And a _good_ documentation,
>      if there are any modifications necessary.  A documentation which
>      does not require the user to rewrite the code
Hire someone to do that for you. Most of the time, people make solutions
well suited for *their* purposes, and post them. Don't expect them to
work for you with no modification. You're expected to be able to adapt
them to your needs. Unless someone is writing a proper library or an
otherwise formally reusable set of code, you'll have to edit things to
make it work for you.

>      just because the
>      writer thought of himself as a teacher who thought of himself to
>      be selected to teach everyone. I don't want to learn anything
>      because someone decides he is in need to teach without asking for
>      permission (!) (because noone ever would ask exactly those people
>      for a lesson).
You seem to want to build something. You certainly don't want to design
it, as you seem unable and unwilling to even adapt other people's code
to your purposes, much less write your own, and unwilling to learn how
to do so. I suggest you hire an engineer to write the code for you, and
design the circuit. You can compile it and put the circuit together
later. That way, you won't have to think too hard.

>      Look at references for python for example. Plain and clear
>      routines, only necessary values to be passed and a useful result.
>      THIS is why it is popular.
Unfortunately, the python interpreter alone, sans libraries and base
runtime, is well over 1MB. That's about 40 times larger than you could
fit inside any PIC, and it will also use much more volatile memory than
is available in a PIC. The reason code for microcontrollers tends to be
more esoteric is because resources are scarce, and you can't afford a
clean yet huge object-oriented system. You'll work directly with the
hardware. Less abstraction means less clear code, but much more space
efficiency and speed.

If you like python though, you might want to have a look at Pyastra. I
like python a lot for all sorts of scripting and small applications on a
desktop computer, but I'd still rather use assembler or C for PICs.

Hector Martin (
Public Key:

2007\06\25@192629 by Robert Rolf

picon face
I started to write a rebuttal to Thilo's rant, but decided that his
lazy, demanding and rude comments deserved NONE of my time.
The best way to handle such rude idiots is to ignore them.

Thilo wrote:
"It seems to me as if the creators of theses codes
     have never ever reached adulthood."

Apparently Thilo has also "never reached adulthood".

It is a pity that we wasted ANY time on replying to him, but perhaps others
will learn from his stellar example of how NOT to get help from this list.


Hector Martin wrote:

> Thilo Klein wrote:
>>     negative way. All comments I have read in the code are totally
>>     useless as they describe what everyone has already noticed.
> You sound like you really don't know what you're talking about. If you
> had done any research at all, you would have noticed that there are


More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...