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 employer. 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 (hector@marcansoft.com) Public Key: http://www.marcansoft.com/marcan.asc -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist