Respectfully, I'm pretty sure that the issue is with your code, Steve. ("Let he who is without sin cast the first stone").Steve W wrote: ↑Fri Nov 15, 2024 5:25 am Could be coincidence, but whenever the FA went to an output and whenever the FC went to an output, they were directed to the Ath (11th) and the Cth (13th) port respectively. It is almost as if the lower half of the command became the channel. The errant FA only showed up at the 11th [10 + 1] port and the errant FC only showed up at the 13th [12+1] port.
I agree with Colin's analysis. You have to ensure that if you're parsing a System message, then the channel number returned by the GetChannel method is undefined, and should be ignored:
My suspicion is that the GetChannel method always returns the bottom four bits of the Status Byte, irrespective of whether it's a channel (80h to EFh) or system command (F0h to FFh). So, it's up to the programmer to decide if it's appropriate to request the channel number, after parsing the Status Byte.
I also suspect that if you were to use the wrong form of SetMessage to construct a System command, you might also get into trouble:
(i.e. If you specified the third form, would it unconditionally OR the channel number with the bottom four bits of the Status Byte, or even overwrite them entirely???)