Yahoo Groups archive

SynthModules

Index last updated: 2026-04-28 23:14 UTC

Message

Re: More on MIDI handler

2004-04-09 by grantrichter2001

I'm guessing about a 20 microsecond execution time for an 
equate. Each MIDI byte takes 320 microseconds. You could 
execute about 8 - 16 simple BASIC commands in each byte time.

Something as simple as:

TEMP = RDR 'read recieve data register
POKE INDEX, TEMP ' store byte in RAM buffer
INDEX = INDEX + 1 'increment index pointer
IF INDEX > 256 THEN ERROR 'buffer over run
RESUME 'reset interupt flag

Just off the top of my head that should take about 150 
microseconds. That uses less than 50% compute time even 
with a constant MIDI stream, assuming the mainline program 
can process the buffer fast enough to keep INDEX from going 
over 256 bytes.

--- In SynthModules@yahoogroups.com, "Mike Marsh" 
<mmarsh@w...> wrote:
> What about assembly language code for the ISR?  The 
processor is 
> fast, but probably not fast enough to keep up with servicing the 
> buffer and staying sync'd to some other program, me thinks.  
So 
> MIDI<->CV only?
> 
> --- In SynthModules@yahoogroups.com, "Brice D. Hornback" 
> <synthmodules@s...> wrote:
> > Mark,
> > 
> > It's not PIC based.  It has a Hitachi H8/3664 on it.  Read the 
> datasheet in
> > the files section of the Group's site.  Yes, you can PEEK and 
POKE 
> but there
> > may be easier ways to handle it.  I'm looking into this as well.
> > 
> > - Brice
> > 
> > "It's easy to play any musical instrument: all you have to do is 
> touch the
> > right key at the right time and the instrument will play itself."
> > - J.S. Bach
> > 
> > ----- Original Message ----- 
> > From: "Mark Pulver" <mark@m...>
> > To: <SynthModules@yahoogroups.com>
> > Sent: Thursday, April 08, 2004 11:48 AM
> > Subject: Re: [SynthModules] More on MIDI handler
> > 
> > 
> > > grantrichter2001 (08:37 AM 4/8/2004) wrote:
> > >
> > >  >Continuing my thinking out loud on the MIDI input.
> > >  >
> > >  >How would one handle a buffer in this BASIC?
> > >  >
> > >  >It does not support STR$ command or some of the other 
16K
> > >  >BASIC features for string handling.
> > >  >
> > >  >It seems you would have to use an array variable and 
brute 
> force
> > >  >move all bytes for a first in last out string.
> > >  >
> > >  >Any suggestions?
> > >
> > > This is where I was going with my questioning about how 
the PSIM 
> program
> > > memory is organized... I wanted to get some background 
before I 
> started
> > > babbling about the issues of BASIC as an ISR for a comm 
buffer.
> > >
> > > Trying to do a FIFO buffer in a minimal BASIC will be most 
> interesting. A
> > > bunch of questions...
> > >
> > > - I trust that there's ISR handling of some sort in the 
language
> > > implementation?
> > >
> > > - Is the PIC mapped such that you can control it? Either port 
or 
> memory?
> > >
> > > - Can the UART be setup to be memory mapped so that it 
dumps a 
> byte
> > > straight to memory, or is it port mapped?
> > >
> > > - Have you done any timings on reading from a port, 
moving a 
> byte/word of
> > > memory?
> > >
> > > - Does this BASIC allow for PEEK and POKE? Can you get 
the 
> address of a
> > > variable? The thought behind this is that PEEK/POKE 
would be 
> faster than:
> > >
> > >    CommBuffer[CommIndex] = $UARTIn
> > >    CommIndex = CommIndex + 1;
> > >
> > >
> > > Just some random questions...
> > >
> > > Mark
> > >
> > >
> > >
> > >
> > > Be sure to check out the primary Web site at:
> > > http://www.SynthModules.com
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.