I'm trying to modify the example code that uses the NEC protocol but I'm stuck on defining the leading symbol.
It appears the RMT is designed to work with symbols that have 2 parts / transitions.
The NEC has a 9ms "AGC Pulse" followed by a 4.5ms space. These are followed by the bit codes
However, the SONY protocol has only a single 2.4ms "AGC Pulse" followed by the bit codes.
(sorry, I have an image but don't know how to insert it)
Seems like whatever I try the encoder reads the 1st half of the 1st bit symbol as the 2nd part of the leading symbol.
So everything is off by 1 transition. Here's what I used for the leading code RMT symbol constructor:
Code: Select all
// construct the leading code and ending code with RMT symbol format
sony_encoder->sony_leading_symbol = (rmt_symbol_word_t) {
.level0 = 1,
.duration0 = 2400 * config->resolution / 1000000,
.level1 = 0,
.duration1 = 0x7FFF,
};
(I've also tried defining both level0 & level1 as "1" logic state with a 1200us duration. But no difference)
Anybody else tried this?
Thanks