Quote Originally Posted by Robson View Post
I have scanned the signal with a digital scope.

Many blocks like Init sequence, sequence 01, preparing for next block are in all instruction of each button.
In that case create separate arrays for

InitSeq
Seq01
NextBlock

Only a few bits are different in the instruction line.
Create separate arrays for each command or one large array with all commands and just point to a segment of it eg bits 34-57 (havent worked out the numbers!)

But this String must be sent as one data without interrupts or delays. Exactly from every bit 1ms.
When you need to send a command just call the component parts as required eg

SendInitSeq
SendSeq01
SendCommand
SendNextBlock
SendSeq01
SendCommand
SendNextBlock
SendSeq01
SendCommand

The PIC should be able to read and process the values quickly enough not to cause problems, if you see that your output pulses are taking slightly too long then change the pause to pauseus and shorten slightly

Every instruction will be sent 3 times.
Just add a loop and go round it 3 times. Presumabley there must be some idle time between the 3 instructions so dont forget to add that as a pause

When you will paint same blocks in different colours you will better see, how it works. But it´s not possible to mark with colours
I pasted it into a text editor and broke it into 4 bit chunks and you can see the patterns you refer to.

I have built a universal remote control that reads different values from different variables on the fly and that works just fine so I doubt you will have too many problems.

I seem to remember seeing something by either Darryl or Melanie that showed how you can access individual bits of a byte or word array as well but cant remember where it was eg byte0 was bits 0-7 byte1 was bits 8-15 but I could be wrong.