MIDI on a BX-35

Started by Justin June 2, 2005
I'm trying to make a drum trigger to MIDI converter with a BX-35. In
order to communicate at MIDI's baud rate of 31,250 I was thinking
about either using the normal 7.3728Mhz crystal on the BX-35 and using
a MAX3100 with a 4Mhz crystal or something close to communicate. But
I've read that using SPI can cause a lot of problems. Would it be
easier to simplify things by using an 8Mhz crystal on the BX-35 while
running with a divisor of 16 to communicate at 31,250 baud? And if I
did run at 8Mhz would I be able to use COM3 at a normal baud of 9600
or 2400 for an LCD?

Thanks,
Justin



Justin wrote:

> I'm trying to make a drum trigger to MIDI converter with a BX-35. In
> order to communicate at MIDI's baud rate of 31,250 I was thinking
> about either using the normal 7.3728Mhz crystal on the BX-35 and using
> a MAX3100 with a 4Mhz crystal or something close to communicate. But
> I've read that using SPI can cause a lot of problems. Would it be
> easier to simplify things by using an 8Mhz crystal on the BX-35 while
> running with a divisor of 16 to communicate at 31,250 baud? And if I
> did run at 8Mhz would I be able to use COM3 at a normal baud of 9600
> or 2400 for an LCD?
>
> Thanks,
> Justin
>
I found these three links which I'm sure can help you:
http://www.embeddedrelated.com/groups/basicx/show/2615.php (BasicX
group message 2615)
http://ccrma.stanford.edu/~sbacker/docs/MIDIProjectFinalDocumentation.doc
http://www.google.com/search?hl=en&qsicx+midi&btnG=Google+Search

Regards,
Mike



Cool, that solves the 8Mhz problem. Now, at 8Mhz would the chip's
timing for 2400 baud on com3 be off? Or would it know how to compensate?

--- In basicx@basi..., Mike Perks <basicx@a...> wrote:
> Justin wrote:
>
> > I'm trying to make a drum trigger to MIDI converter with a BX-35. In
> > order to communicate at MIDI's baud rate of 31,250 I was thinking
> > about either using the normal 7.3728Mhz crystal on the BX-35 and using
> > a MAX3100 with a 4Mhz crystal or something close to communicate. But
> > I've read that using SPI can cause a lot of problems. Would it be
> > easier to simplify things by using an 8Mhz crystal on the BX-35 while
> > running with a divisor of 16 to communicate at 31,250 baud? And if I
> > did run at 8Mhz would I be able to use COM3 at a normal baud of 9600
> > or 2400 for an LCD?
> >
> > Thanks,
> > Justin
> >
> I found these three links which I'm sure can help you:
> http://www.embeddedrelated.com/groups/basicx/show/2615.php (BasicX
> group message 2615)
>
http://ccrma.stanford.edu/~sbacker/docs/MIDIProjectFinalDocumentation.doc
> http://www.google.com/search?hl=en&qsicx+midi&btnG=Google+Search
>
> Regards,
> Mike


Justin wrote:

> Cool, that solves the 8Mhz problem. Now, at 8Mhz would the chip's
> timing for 2400 baud on com3 be off? Or would it know how to compensate?
>
Well you can either find the answer in the 8535 documentation or run the
AVRCalc utility:
http://www.avrfreaks.net/index.php?module=FreaksTools&func=viewItem&item_type=tool&item_id)2

The answer is that with 8MHz, 2400 Baud is 0.16% off.

Mike



> ... with 8MHz, 2400 Baud is 0.16% off.

Who has significantly overclocked a BasicX part?

There are a few mentions of attempts in the archive but, naturally, no
follow-up; one suggested he was running a BX-24 at 10MHz, a ~35%
speedup, about the same as the BX-24p (which gets it's speed from the
ATMega8535 over the AT90S8535.

Comm clocking is an obvious obstacle to just cranking it up; thought is
required first, and crystal switching between development and in-situ
might be needed. Anyone pushing the envelopes? Tom
Tom Becker
--... ...--
GTBecker@GTBe... www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700


--- In basicx@basi..., "Tom Becker" <gtbecker@r...> wrote:
> [...] about the same as the BX-24p (which gets it's speed from the
> ATMega8535 over the AT90S8535.

I suspect that a large part of the speed increase is due to doubling
the SPI clock speed for communicating with the serial EEPROM.



Tom Becker wrote:

> > ... with 8MHz, 2400 Baud is 0.16% off.
>
> Who has significantly overclocked a BasicX part?

Just a reminder Tom that the original reason for running the BX-35 at
8MHz instead of the usual 7.3727MHz is to get an exact baud rate of
31250 that is required for Midi.

I just so happened to have socketed the crystal on my BX-35/AVR
development board so I tried a few very quick tests. 4MHz worked fine
and 16MHz didn't work at all. I don't have 8 or 10Mhz crystals on hand
to try.

Mike
http://home.austin.rr.com/perks/basicx/Projects/



> ... 31250...

Yes, FWIW, the MIDI baud rate is 1MHz/32= 31.25KHz, which might help
demystify its generation.

> ... don't have 8 or 10Mhz crystals on hand...

You probably do in your collection of ISA, EISA and VESA cards, or in
that old VCR, but a stable signal generator into XTAL1 would be more
flexible than arbitrary crystals. We did this with an 8085-8 25 years
ago. It wasn't necessary to remove the crystal, in fact, since its
load-side impedance (and, thus, its signal) is easily swamped by a
stiffer 1v external RF source. Of an 8MHz production batch, maybe 50%
could do 12MHz reliably.

I've just never tried it with a BX-24. Tom
Tom Becker
--... ...--
GTBecker@GTBe... www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700


Tom, as you know in this case, speed ratings are typically based on a
production run. Not the semiconductor physics. I would say 'go fer
it' if this is not going to be a commercial product. I know from
the 'PIC world' we can push the chips though I've not had a need to
go beyond 20MHz. As you mentioned, you will have to tweek timing-
related instructions and registers.

- Tom

--- In basicx@basi..., "Tom Becker" <gtbecker@r...> wrote:
> > ... with 8MHz, 2400 Baud is 0.16% off.
>
> Who has significantly overclocked a BasicX part?
>
> There are a few mentions of attempts in the archive but, naturally,
no
> follow-up; one suggested he was running a BX-24 at 10MHz, a ~35%
> speedup, about the same as the BX-24p (which gets it's speed from
the
> ATMega8535 over the AT90S8535.
>
> Comm clocking is an obvious obstacle to just cranking it up;
thought is
> required first, and crystal switching between development and in-
situ
> might be needed. Anyone pushing the envelopes? > Tom >
> Tom Becker
> --... ...--
> GTBecker@R... www.RighTime.com
> The RighTime Clock Company, Inc., Cape Coral, Florida USA
> +1239 540 5700