hi.
i'm making midi system synth.
synth midi out -> arduino serial1 in
arduino serial1 out -> synth midi in
buttons etc -> arduino in
ext midi clock -> arduino serial2 in -> arduino serial1 out -> synth
my question is:
the arduino getting clock messages external source via serial... these need passed on out of arduino's serial port. how can prioritise this? these bytes timekeeping they're important system. if check these incoming bytes @ same rate i'm checking else (midi in synth, buttons, other code etc) cause delays/poor timekeeping, correct? i'll doing things debouncing buttons , cycling through arrays.
i need arduino prioritise sending bytes received serial port serial port, regardless of else going on. possible?
i aware of interrupt, i've read doesn't work serial.
threading ideal (i think?) i'd rather not use library this.
using mega.
thanks in advance. ready answer q's.
i'm making midi system synth.
synth midi out -> arduino serial1 in
arduino serial1 out -> synth midi in
buttons etc -> arduino in
ext midi clock -> arduino serial2 in -> arduino serial1 out -> synth
my question is:
the arduino getting clock messages external source via serial... these need passed on out of arduino's serial port. how can prioritise this? these bytes timekeeping they're important system. if check these incoming bytes @ same rate i'm checking else (midi in synth, buttons, other code etc) cause delays/poor timekeeping, correct? i'll doing things debouncing buttons , cycling through arrays.
i need arduino prioritise sending bytes received serial port serial port, regardless of else going on. possible?
i aware of interrupt, i've read doesn't work serial.
threading ideal (i think?) i'd rather not use library this.
using mega.
thanks in advance. ready answer q's.
what kind of delay allowed ? few milliseconds ?
it possible write code in interrupt passes data on serial port, using direct register programming. however, think want combine clock midi (everything output serial1, right ?). think should done in sketch arduino serial library , buffers of serial library.
do have delay() in sketch ? hope don't use delay() debounce buttons.
perhaps there smarter way cycle through array. perhaps jump table (case-statement).
it possible write code in interrupt passes data on serial port, using direct register programming. however, think want combine clock midi (everything output serial1, right ?). think should done in sketch arduino serial library , buffers of serial library.
do have delay() in sketch ? hope don't use delay() debounce buttons.
perhaps there smarter way cycle through array. perhaps jump table (case-statement).
Arduino Forum > Using Arduino > Project Guidance > Prioritise Serial I/O
arduino
Comments
Post a Comment