I’m trying to learn my way around some PIC assembler and figured I’d try to make something I want. It’s about as simple as it gets.
I just want to switch a single output line on and off with two specific SysEx messages. I want it to ignore all else and start with it off (low).
The messages are two JL Cooper CS-10 commands (7 bytes each)-
F0 15 15 00 12 7F F7 is “on”
F0 15 15 00 12 00 F7 is “off”
I found an ASM file for a 7 output MIDI to solenoid circuit using a 16f84 and it has helped me get a grasp on the “byte read” part of the interrupt routine. The timing and the frame check stuff has also already been worked out there. From that point, the writer goes on to number the 3 incoming note bytes and store their contents for later use. I don’t guess I need any of that.
What is the obvious way of checking for this string of hex? Do I check a byte at a time as they come in and drop out if I get a wrong byte, or do I get all seven and check afterward?
-Thanks!
PS- Two other stupid questions- Does a message like this always appear in one long uninterrupted string, even if the line were active with other MIDI messages? And, is there no reliable byte to byte MIDI timing? (can you count bits through one byte into the next or do you always clock from the start bit)