Searching \ for '[PIC] MIDI transmission via 16F877 USART' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=usart
Search entire site for: 'MIDI transmission via 16F877 USART'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] MIDI transmission via 16F877 USART'
2002\11\03@173804 by Heath Carlisle

flavicon
face
Hello, Listers. This is my first post the list.

I am looking for information and code examples regarding the transmission of
MIDI data using the Mid-Range PIC's onboard USART. I have sen examples that
"bit-bang" an I/O pin, but it seems that the USART is a better method.

Any methods, caveats, wisdom or advice from you experienced folks?

I am programming in assemby language using the MPLAB IDE. I program the
chips using Design Devices Programmer and thier boot-loader enabled 16F877.

Thanks,

Heath Carlisle

----

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\11\04@104707 by Byron A Jeff

face picon face
On Sun, Nov 03, 2002 at 02:40:27PM -0800, Heath Carlisle wrote:
> Hello, Listers. This is my first post the list.
>
> I am looking for information and code examples regarding the transmission of
> MIDI data using the Mid-Range PIC's onboard USART. I have sen examples that
> "bit-bang" an I/O pin, but it seems that the USART is a better method.
>
> Any methods, caveats, wisdom or advice from you experienced folks?

Absolutely nothing special about it. Your best bet is to take a read of
Fr. McGahee's PICUART.ASM document as it's the most complete discussion of
the PIC USART around. You simply set the clock frequency and the bit rate
to 31250 BPS, and either check for the appropriate flags or build an interrupt
routine or two.

As for the phsical interface I use the standard interface from
Hal Chamberlin's "Musical Applications of Microprocessors" book. MIDI OUT
consists of a single 7407 open collector buffer output tied to 220 ohm
resistor. The other end of the current loop is simply a 220 ohm resistor
to +5. There are a dozen ways of arranging the current loop. All you need to
remember is that you want current to flow the the USART output is low and
not to flow when the USART output is high. You can use a simple transistor
driver or an opamp if you like. In fact the PIC output itself probably can
push enough current through to drive it directly.

As for MIDI IN, every interface I've ever seen has used an optoisolator. The
key thing is to ensure that the slew rate is sufficient to get clean edges.
Chamberlin suggested using 6N138 Darlingtons.

A sample of such circuits can be found here:

http://www.usyd.edu.au/su/anaes/rpa/Loadsmanextras/Macmidi.html

I would suggest that you test your interface circuits by creating a MIDI THRU
by connecting the output of the optoisolator of the MIDI IN to the input of
the buffer for the MIDI OUT. Hook it up between a MIDI keyboard and MIDI
module and test it out. You can be sure then that your interface works OK.

>
> I am programming in assemby language using the MPLAB IDE. I program the
> chips using Design Devices Programmer and thier boot-loader enabled 16F877.

That should get you set up. MIDI is down on my list of things to do. I'm going
to get around to building that MIDI sequence/drum machine that I dreamed up
oh so many years ago. With Compact Flash and high speed 18F parts, it should be
a piece of cake. If only I could find the time.

BAJ

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\11\04@130208 by Byron A Jeff

face picon face
On Mon, Nov 04, 2002 at 10:46:56AM -0500, Byron A Jeff wrote:
> On Sun, Nov 03, 2002 at 02:40:27PM -0800, Heath Carlisle wrote:
> > Hello, Listers. This is my first post the list.
> >
> > I am looking for information and code examples regarding the transmission of
> > MIDI data using the Mid-Range PIC's onboard USART. I have sen examples that
> > "bit-bang" an I/O pin, but it seems that the USART is a better method.
> >
> > Any methods, caveats, wisdom or advice from you experienced folks?
>
> Absolutely nothing special about it. Your best bet is to take a read of
> Fr. McGahee's PICUART.ASM document as it's the most complete discussion of
> the PIC USART around. You simply set the clock frequency and the bit rate
> to 31250 BPS, and either check for the appropriate flags or build an interrupt
> routine or two.

A followup to this. I'm not sure where Fr. McGahee's latest version is located
but I have a 1.04 copy of it here: http://www.finitesite.com/d3jsys/picuart.zip

BAJ

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...