Hi
I want to receive a big midi SysEx file (approx 300,000 bytes) and have my Teensy 3.6 save it to the onboard SD card. There isn't enough ram to store it between receiving it and saving it to the SD, so I tried to write it on the fly as each byte arrives. The incoming data got corrupted though, I think because I was using serial port 1 and that shouldn't be used at the same time as writing to SD (wish I'd known this earlier or I could have designed my hardware using serial3).
So I tried USB serial instead. I can receive smaller dumps ok using usbMIDI.getSysExArray() and then save them to the SD, but my big dump is too big for RAM. Is it possible to read individual incoming bytes and store them to the SD as they come in? Will this be fast enough? How can I read individual bytes as they come in over USB? I know how to do this with DIN midi ( if (Serial1.available()) {.....dumpByte = Serial1.read(); etc.) but how can I do this with USB?
Thanks
I want to receive a big midi SysEx file (approx 300,000 bytes) and have my Teensy 3.6 save it to the onboard SD card. There isn't enough ram to store it between receiving it and saving it to the SD, so I tried to write it on the fly as each byte arrives. The incoming data got corrupted though, I think because I was using serial port 1 and that shouldn't be used at the same time as writing to SD (wish I'd known this earlier or I could have designed my hardware using serial3).
So I tried USB serial instead. I can receive smaller dumps ok using usbMIDI.getSysExArray() and then save them to the SD, but my big dump is too big for RAM. Is it possible to read individual incoming bytes and store them to the SD as they come in? Will this be fast enough? How can I read individual bytes as they come in over USB? I know how to do this with DIN midi ( if (Serial1.available()) {.....dumpByte = Serial1.read(); etc.) but how can I do this with USB?
Thanks