Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

RS232 <=> midi full duplex dual core completed full de

Status
Not open for further replies.

VSMVDD

Banned
Joined
Jun 12, 2005
Messages
643
Helped
92
Reputation
184
Reaction score
34
Trophy points
1,308
Location
scotland uk
Activity points
0
midi rs232

LAST UPDATE : 03/02/07 00:21..GMT

Hi all

before we start
download and install proteus pro demo version
www.labcenter.co.uk
to view the various circuits on offer


I looked round the net to find a serial to midi baud converter

but the main problem with all everyone i found
was it has latency above acceptable levels to be able to use it
as a serious device in a multi instrument chain
so i remade my own version
for the source i used picc but you can use sdcc or other c compiler
and two pic 18F242s
you would think it a waist but two micros are needed to buffer and keep the stream duplex and timed
1 micro will always add more latency

so i dont know why people use just one
in the folder is the diy efforts i can find online
if you see a bug or find other diy projects for this task {rs232 to midi}
let me know below i added a copy of the ones i found to the archive below
{remember i can add other devices to the pics like midi control change pots etc so it is usefull to use two}

the cbx driver from yamaha/roland drivers will work fine and output from the comport 38400baud
and give low latency
20mhz clock should easily be fast enought

here is a picture of my finished first generation unit

34_1164782188.gif


The unit is fully tested and runs flawlessly
i added a second hex file that has a 600byte 200 event buffer to the
rs232 to midi conversion pic only ... you can choose see the readme text file

i also removed port powering as its rubbish and totaly useless
and instead added a bridge rectifier
so ac or dc can be used 7-10v ac 7-14v dc powering any polarity

reworked the pcb and connections

i used in the test design a normal max232 and a
surface mount low dropout 78M05 regulator

the whole unit uses @10v dc input 1.7ma peek whilst in use

this gives from a 300 maph{normal 9v cell} about 150hrs or more uptime
so battery power is cool i suppose

i found in the local maplin a battery charger solar box
it has a nice box inner that can be removed
to form a nice abs project size box with solor cell lid

the cell is 12v with a few carefull wafer fragment snaps and resolders
so gob on the fat ginger headed p...k
in maplin greatwestern road glasgow scotland
who sneered and laughed as i bought it for £3.99
{6 euros or less cant be bad for a box and power}

so 2ma is easy even in a light bulb room
i thought to add this next


The yamaha driver win 98 95 me and roland win xp2k
is best
watch out for usb midi drivers
install these last and uninstall first

use single port not multi port in the driver and no flow control !!!!
its also ok to have yamaha on com 1 roland on com2 etc
as long as any usb driver reside last {build the midi stack}

i also removed the cts connections from older diagrams
in practice i found its not needed for any of the three drivers
the archive now contains

finaly

usb is crap for midi
serial was crap as a diy and i know no other maker of any bidir
serial cables or units around that uses a dual core design
and even you can still buy

so any of these pretend cables from maplin etc
rs232 to midi using one core
are also crap in my opinion
as a single core is the issue like a train station instead of a junction
but a station where trains disappear completely



so for older machines laptops and for people who dont need a sound card
or even use linux etc this is a cool tool

if there is someone
willing to make two single sided boards as 600dpi bmp

for midi in only
and the core unit design in the archive
or wants to do this

pm me and we can arrange a sked
i want semi smd versions {just a multipic type socket design {should be easy}}
the rest smd
here is the full circuit

remember you may need to swap pins 2 and 3 of the 9 pin socket to suite
the rs232 cable type you have and also CTS RTS signals
leave these out till later if you like {best}
ill add this maybe if i cover extended ports
and auto baud rate detection for midi in/out as used by the drivers
in multiport mode

you can use 25 pin to this or 9 pin serial

a great site for diagrams is

**broken link removed**

51_1164945211.gif



enjoy...! :|

ps..... if you use linux then there is a java version of the bootloader colt
called jolt seek it on the same site domain



THIS PROJECT IS NOW COMPLETED
AND WORKS PERFECTLY IN BOTH DIRECTIONS
 

midi to rs232

the circuit i use uses two hardware interrupts and ports
a ram buffer
is fully bi dir
uses any pics with at least one hardware uart
uses software uart only for data transmits
uses c code not asm so its easier to understand for people
who want to see a full project built in c that uses more than one uart in a chip
is just 30 or so lines of code
uses bootblock flash

is expandable to allow merging thru other uart pin pairs
 

rs232 midi

THIS PROJECT IS NOW COMPLETE
AND WORKS PERFECTLY IN BOTH DIRECTIONS


SEE FILE ABOVE
 

rs-232 to midi

VSMLIBS:
Very nice and useful project. Thank You.

Why you think that “usb is crap for midi „ ? I see advantage on USB - feeding, no need MAX232 or other interface and all new notebook are only with USB, no RS232.

There is idea of MIDI-USB based on Mircochip PIC18F4550.
**broken link removed**
**broken link removed**
 

rs232 to midi converter

THIS IS NOT A PROJECT FOR SUPER FAST MULTICORE DUAL
THIS AND THAT MACHINES

JUST THAT SOMETIMES OLDER IS BETTER HERE

The main problem comes because midi is a bi dir {'FULL DUPLEX'} stream
and modern pc's only at best have 1 comport and crap usb2 and midi port
i prefer master keyboards to have there own merged streem

rs232 and more over usb is semi duplex at a fine umessage level
and always will be

i have both usb and serial units

and if you play say a song in .mid format and play along
usb completely fails to keep sync
becouse its much higher up the service stacks in older machines

because it uses a non FULL DUPLEX system and one micro several times
so bottlenecks appears so its semi duplex instead
~200-250ms latency at best and totaly unacceptable

even usb2 or any version of it wont and doesn't cut it
especially if the usb is used for other peripherals as laptops are
and also older laptops have com 1 no com 2 and usb 1
many people cant afford to pay for a new laptop just for usb 2 and a little faster
so.. its just a serial project as usb for these reasons is unusable for real time

:|

and i still cant get rs232 to midi to work properly in the prototype i made
not had much time to deal with it as
im building a project for atari st series svideo-out board
and also reworking comvdd as i have reworked its classes
just a small problem with packetation
ill add a fix to the serial service routine to accept packets
when i also add a merger set of i/os
if someone wants to work on it fine
after having used ataris for years for midi
pc's always seem to pail into the dark becouse there timing is super shit for midi
and as i see always will be anyway basicaly becouse developers havent had ample time to fully optimise a system BEFORE
being forced to move on to the next chipset level
with this and that and none of the last..and then
no version of pc midi stuff ive used actualy worked without a major problem
and usualy the timing
when using a studio setup with many midi driven intruments
responding to both midi out from the pc
and rerouted midi played back in thru mode form a master keyboard

and the reason is one core transfers used in every single single minded design ive seen for serial

and tasking
no way round tasking but using one micro in serial interfaces is stupid
introducing multiple buffers and baud changes always causes problems
and two cores does it much better
try it then post your usb projects links in my topic
above all usb is shit at this task period and fails to keep sync ive tried many comercial projects heeps better than the links you posted
that claim to work
but serial is better for this task
older machines need to be used
and becouse of people using newer usb2
they get dumped for no reason but
there serial port unit didnt do it basicaly becouse it used a single core
and crap design
well this design will
without introducing extra latency that gets added by a single micro core design
{no matter what you say i know this is true }
usb is usefull for transfers one way or the other
but talking reliably at low speed is a serial ports job


i would rather add a max232 than
lose the ability to play in realtime multisteem and port
... :D
but usb 2 is usefull
atleast in one way
... makes the computer companies lots of dosh to spend on cars
and filthy planet polution
dont get me wrong usb may get better

but firewall already takes this lead but leaves the way for many retro fits

... roll on pic's with firewire
and be done with this issue.... for good

this serial system wil have at very worst a 5ms introduced latency

more like 100us latency max refersh

i use byte bang at present and it is 200ns X instructions used
this is 200ns X4X50 instructions = 0.0000002 * 4banks = 0.000008 seconds * 50
= 0.00004 seconds to get ready for the next byte
plenty of time

...............
....

Added after 1 hours 7 minutes:

also

you can use ANY PIC MICRO
that has at least one hardware serial portation
and ANY c compiler even free ones like sdcc

i will add a design for multimerge port powered midi input only
so... will have a latency of less than 1ms

and that's a promise....

now try the same with usb and ill laugh at you becouse i have
and usb gives at best with only the midi in used 10-15ms dependant on added steams usualy 15ms per steem again totaly unacceptable

and 15 orders of magnatude slower at least.....than serial in only

...
 

rs232 a midi

VSMLIBS: Thank you for your explication. Are you true, that latency is big problem. And now I understand, why you use RS232.
 

midi to rs-232

How long the latency is, for commercial USB to MIDI products from vendors like yamaha ?

Anyone feel that is unacceptable ?
 

midi to rs232 converter

Hi all, finally I found a REAL full duplex low latency midi to rs232 I/O. I would like to use 16f628 that has a uart inside, 200ns cycle instruction and is cheaper.
The ram, eeprom and program memory space are different , is this a problem ?
Many thanks
 

midi control of rs232

you can use any pic as long as you use the right flash routines

ive used many different types and all are fine
ive not yet had time to fully fix the midi to cpu section ill get around to this task soon
 

pc serial to midi

anyone has already tested the MBHP usb interfase???
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top