|
|
|
The following page was printed from RemoteCentral.com:
Hex to Pronto: Question regarding...
| |
|
Topic: | Hex to Pronto: Question regarding complement, MSB and LSB possibilities This thread has 11 replies. Displaying all posts. |
|
Post 1 made on Thursday April 7, 2022 at 07:57 |
Hello, I have a few questions regarding NEC1 hex to Pronto conversion. Being new to this and after reading various posts it seems to me that there can be 4 possible solutions due to notation (i.e. MSB->LSB bit-reversing) and the use of command byte vs. complement byte. Example: NEC1 hex (Volume UP): 0x10EF 0x1AE5 We have device address, subdevice, command, complement, giving the following solutions: 0x10EF 0x1AE5 (using MSB, 3rd byte) D = 0x10 S = 0xEF F = 0x1A 0x10EF 0x1AE5 (using MSB, 4th byte/complement) D = 0x10 S = 0xEF F = 0xE5 0xF708 0xA758 (using LSB, 3rd byte) D = 0x08 S = 0xF7 F = 0x58 0xF708 0xA758 (using LSB, 4th byte/complement) D = 0x08 S = 0xF7 F = 0xA7 Is this a correct assessment? Is there a "correct" use as per NEC specification? Is there a "popular" use among manufactorers? What is the difference between NEC and NEC1 as seen in IrScrutinizer?
Last edited by tomchr on April 7, 2022 20:23.
|
|
Post 2 made on Friday April 8, 2022 at 11:56 |
Barf Long Time Member |
Joined: Posts: | August 2013 350 |
|
|
I am not aware of an defining document for the NEC protocol, sorry. Many are referring to San Bergman's text [Link: sbprojects.net] , but it is clearly not a defining document. Another document is [Link: techdocs.altium.com]Regardless of parametrization, there is a payload of 32 bits. Following Bergman (section "Extended NEC Protocol"), we take the first 8, ordered as LSB first, as "device" ("D"), next 8 as "subcommand") ("S"), and the next 8 bits as "function" ("F"). Last 8 bits are the (one) complement of the F. (There are some variations though). Of course, it is possible to make your own interpretation of the 32 bits. Particularly popular ( :-) ) it appears to use MSB-first representation. Note that there is a priori no way to tell if, e.g. "0100000" denotes 64 with MSB-first, or 3 LSB-first... What is the difference between NEC and NEC1 as seen in IrScrutinizer? There are different methods a NEC signal can repeat. Using the method in the second link, we call that protocol NEC1. If a captured signal is not containing any repeat at all, it is probably an incomplete capture, and called "NEC".
|
|
|
OP | Post 3 made on Wednesday April 13, 2022 at 20:30 |
Hi, Yes, It it also my impression that MSB-first seems a popular representation. Thanks for providing the excellent IrScrutinizer :-) By the way, I noticed that the older irMaster has additional export options for converting pronto codes to wav files under "Output HW" for Audio such as "Divide Carrier" and wave form modulation. Have these features been omitted in IrScrutinizer?
Last edited by tomchr on April 15, 2022 10:27.
|
|
Post 4 made on Thursday April 14, 2022 at 14:45 |
Barf Long Time Member |
Joined: Posts: | August 2013 350 |
|
|
Thanks for the nice words :-). ... It it also my impression that MSB-first seems a popular representation. well, anyone can parametrize how he or she wants... IrScrutinizer contains one protocol called "NEC-Shirrif" where the payload is one parameter ("data") in MSB-first format, for compatibility with the Arduino IRremote by Ken Shirriff (the current version is different though). By the way, I noticed that the older irMaster has additional export options for converting pronto codes to wav files under "Output HW" for Audio such as "Divide Carrier" and wave form modulation. Have these features been omitted in IrScrutinizer? You are right, some not very useful (and hard to explain) options have been removed. Do you miss anything in particular?
|
|
|
OP | Post 5 made on Sunday April 17, 2022 at 17:07 |
On April 14, 2022 at 14:45, Barf said...
You are right, some not very useful (and hard to explain) options have been removed. Do you miss anything in particular? I miss "Wave form modulation" and Divide carrier" options. The more options the merrier - especially addressing the single/dual LED IR blaster devices used in mobile phones.
Last edited by tomchr on April 18, 2022 05:41.
|
|
Post 6 made on Monday April 18, 2022 at 12:58 |
Barf Long Time Member |
Joined: Posts: | August 2013 350 |
|
|
The more options the merrier A program that presents the user with a bunch of options that are hard to understand and possibly not even needed is not a good program, but considered intimidating for the user. "Just tell me what to use." The options need to be documented and, occasionally, explained again. But I am open for arguments why a particular option is required. I miss "Wave form modulation" and Divide carrier" options. Ok, so am listening to your arguments... especially addressing the single/dual LED IR blaster devices used in mobile phones. Using a smartphone as an IR sender using IR diodes in the headphone jack, is not a good idea. It is like using a microscope as a hammer to slam in nails: It does not make a very good hammer, and there is a large risk that you damage a delicate and expensive instrument...
|
|
|
OP | Post 7 made on Monday April 18, 2022 at 19:41 |
With regards to having more options available for waveform export, my starting point was your website description of the "Audio" Pane for IrMaster found at [Link: harctoolbox.org]As for waveform modulation options, I would presume that sine waves as default is adequate. However, I noted your own recommended settings in the above mentioned website description stating "48000kHz, 8bit, 1 channel, divide carrier, omit trailing gap, and square wave form". So, I thought why not include the square waveform option. How would using a smartphone to transmit IR commands emulated using the headphone jack equipped with IR diodes constitute a possible danger to infrared receiving hi-fi equipment such as preamplifiers? Most remote controls are made cheap, flimsy, inadequate, needlessly complex because they are developed by insular companies that have always ignored the user experience. Smartphones have the ability of providing a fully customizable user interface with the ability to cover both bluetooth and wifi interoperability. However, it is unfortunate that integrated infrared transmission hardware has been neglected or depreciated by smartphone manufacturers, thus leaving users to fend for themselves using hacks. But here we are.
|
|
Post 8 made on Tuesday April 19, 2022 at 03:49 |
Barf Long Time Member |
Joined: Posts: | August 2013 350 |
|
|
why not include the square waveform option. The square wave form is always selected in IrScrutinizer. How would using a smartphone to transmit IR commands emulated using the headphone jack equipped with IR diodes constitute a possible danger to infrared receiving hi-fi equipment such as preamplifiers? Not the equipment, the smartphone. The audio "power" amplifier is designed for 30 ohms resistive/inductive load (or something like that). In particular if using IR diodes without serial resistors (as is described in numerous descriptions/videos!!): this presents the amplifier with essentially a short-circuit. Not to mentioned that your fancy smartphone is locked-up while IR-ing; it cannot be used for phoning or music listening until you unplug the dongle. it is unfortunate that integrated infrared transmission hardware has been neglected or depreciated by smartphone manufacturers, Agree to that. It would be better if smartphones and tablets came with an IR blaster.
|
|
|
OP | Post 9 made on Tuesday April 19, 2022 at 17:45 |
With regard to square waves vs sine waves, is it not mathematically prudent to use sine waves instead of square waves in some cases due to modulation issues or possible frequency band limitation issues? I am not well-versed in the mathematitics of calculating two 19kHz audio channel signals which are to be transformed into covering a frequency around 38kHz. However, one source describes how to generate left and right channel outputs 90 degrees phase shifted signals, using two leds in parallel, which will cover the 38kHz pulses by ways of both positive and negative "difference" pulses. Others talk about phase shifting one channel by 180 degrees to allow for higher voltage to drive the LEDs. What is your take on a effective way of combining two lower frequency "audio" channels to cover higher frequency pulses? As for putting my smartphone in harm's way, in this day and age I think that everybody has leftover smartphones which have been made redundant by planned obsolecense. Fortunately, some of these devices have a chance to be made useful again. I like the idea of repurposing leftover hardware.
Last edited by tomchr on April 19, 2022 20:21.
|
|
Post 10 made on Wednesday April 20, 2022 at 11:46 |
Barf Long Time Member |
Joined: Posts: | August 2013 350 |
|
|
However, one source describes how to generate left and right channel outputs 90 degrees phase shifted signals, using two leds in parallel, which will cover the 38kHz pulses by ways of both positive and negative "difference" pulses. Others talk about phase shifting one channel by 180 degrees to allow for higher voltage to drive the LEDs.
What is your take on a effective way of combining two lower frequency "audio" channels to cover higher frequency pulses? Note that if you are using "stereo" and connect your LEDs between the left and the right channel (ignoring ground), the resulting signal L-R is simply a mono signal that you could have generated to start with. The only advantage is that you can get the double amplitude, which is only of concern if you turn up the volume to the max, and it is still not enough. I think that everybody has leftover smartphones which have been made redundant by planned obsolecense. Fortunately, some of these devices have a chance to be made useful again. Have you considered using something like this device connected with USB?
|
|
|
OP | Post 11 made on Saturday April 23, 2022 at 18:52 |
I have been trying to figure out how to wirelessly operate an amplifier with a self-powered bluetooth/infrared receiver connected to a RJ12 RS-232 serial port covering Rx,Tx and GND. Naturally, I thought that going down the IR route would probably be the easiest way to go wireless, since the amplifier is already fitted with a infrared receiver. However, I would also like to replace the cabled RS-232 serial connection to my laptop with a battery powered infrared, bluetooth or WiFi solution. I have looked at commercial products such as the following: [Link: lm-technologies.com]I am not familiar with the various Arduino offerings, but they are quite interestering and cheap. Resently, I have come across the Arduino Bluetooth HC-05 module which looks promising.
|
|
Post 12 made on Sunday April 24, 2022 at 05:42 |
Barf Long Time Member |
Joined: Posts: | August 2013 350 |
|
|
Now we are lightyears away from the original topic... Also consider something like a GlobalCache; here is an emulator using Arduino technology.
|
|
|
|
Before you can reply to a message... |
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now. |
Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.
|
|