Hello:=20 I am new to the list.=20 I am trying to complete the following project: Convert MIDI data to a proprietary pre-MIDI format developed by the Roland Corp. called Digital Communication Bus (DCB). I want to do this using a PIC16F877-20MHz. Physical layer: MIDI- 31250 baud, 8-bit, start/stop bit, no parity, asynchronus serial DCB- 31250 baud, 8-bit, start/stop bit, odd parity, asynchronus serial =20 Data Conversion: when a MIDI note is played it sends 3 word bytes: NOTE ON---NOTE = VALUE----VELOCITY when a MIDI note stops playing it sends 3 word bytes: NOTE OFF---NOTE = VALUE----VELOCITY examples: A) 10010000----00000111----00111111 (NOTE ON----NOTE VALUE---- = VELOCITY) B) 10000000----00000111----00111111 (NOTE OFF----NOTE = VALUE---- VELOCITY)=20 =20 I need to convert the above 3 words to this DCB format equivalent: A) 11111110----10000111----ignore velocity (KEY CODE----NOTE VALUE = with GATE ON) B) 11111110----00000111----ignore velocity (KEY CODE----NOTE VALUE = with GATE OFF) ****DCB does not recognize VELOCITY.=20 ****KEY CODE is a constant, only the MSB of the second word changes for = NOTE ON/NOTE OFF What is the easiest way to accomplish this? I just need to set-up INPUT/OUTPUT on the PIC and establish IF THEN = cases. Does this sound about right? What should I use --C, BASIC, ASM????? There would be no DAC or ADC. Just a opto-isolater on the MIDI input and = IC gates on the DCB output. Any help is greatly appreciated. Thank you very much. Kevin Peek -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu