Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

Discussion Groups | BasicX | BX24 and MIDI out

Discussion forum for the BasicX family of microcontroller chips.

BX24 and MIDI out - Tom Igoe - Sep 30 20:55:00 2000

I finally got the BX-24 to send MIDI out. Following Jack's directions, I
opened COM1, then set the baud rate using register.ubrr = 14. The tricky
part was the circuit, but I borrowed one that i used to used from Mark
Coniglio's site at troika ranch:

http://www.troikaranch.org/schematic.html

At first it didn't work, but then I removed the hex inverter (14049/A in
his diagram), and sent the bytes directly from COM1 to the base of the
transistor. And voila! MIDI out.

I had a very simple program running, as follows. I included the
serialport.bas file from the basicx site to simplify my serial functions: sub main()
dim noteVar as byte

openSerialPort(1, 9600)
register.ubrr = 14

do
' get a note range from roughly 30 to 90
' using a 10K variable resistor as input
' on pin 14:

noteVar = cByte((getADC(14) mod 60) + 30)

' sent a noteon message, channel 1, velocity 64:
call putByte(144)
call putByte(noteVar)
call putByte(64)
call delay(0.5)

' noteon to the same note, velocity 0
(essentially noteoff):
call putByte(144)
call putByte(noteVar)
call putByte(0)
call delay(0.5)
loop

end sub

I'll post a more detailed version on my website when I get the chance to
make it fancy.
--
--
Tom Igoe






(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


Re: BX24 and MIDI out - Paul Everett - Jan 4 22:15:00 2001

I'm trying to follow in Tom's footsteps here... the MIDI standard
calls for 'rest' state (0) = ON. On my OOPic lashup an LED from the
MIDI pin to ground glows steadily, as the standard would lead you to
expect. Setting up the BX-24 as suggested, a similar LED is dark,
with occassional glimmers of activity when bytes are sent.

So I seem to have a NON-inverted Serial Port. The documentation says
that the serial port includes an inverter, and Tom got his design
working by removing an external inverter... Is there a setting that
I'm missing?

(It may relate, that the program download and control functions only
work if I disconnect the MIDI cable and sound module. Is that to be
expected?)

Thanks, Paul E --- In , Tom Igoe <tom.igoe@n...> wrote:
> I finally got the BX-24 to send MIDI out. Following Jack's
> directions, I opened COM1, then set the baud rate using
> register.ubrr = 14. The tricky part was the circuit, but I
> borrowed one that i used to used from Mark Coniglio's site at
> troika ranch: http://www.troikaranch.org/schematic.html
>
> At first it didn't work, but then I removed the hex inverter
> (14049/A in his diagram) ... voila! MIDI out.
> ...
> I'll post a more detailed version on my website when I get the
> chance to make it fancy.





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Re: BX24 and MIDI out - Tony Brenke - Jan 5 3:38:00 2001

from what I have heard about the bx-24 the com1 is inverted internal to
the chip.
com3 is not.

--- Paul Everett <> wrote:
> I'm trying to follow in Tom's footsteps here... the MIDI standard
> calls for 'rest' state (0) = ON. On my OOPic lashup an LED from the
> MIDI pin to ground glows steadily, as the standard would lead you to
> expect. Setting up the BX-24 as suggested, a similar LED is dark,
> with occassional glimmers of activity when bytes are sent.
>
> So I seem to have a NON-inverted Serial Port. The documentation says
>
> that the serial port includes an inverter, and Tom got his design
> working by removing an external inverter... Is there a setting that
> I'm missing?
>
> (It may relate, that the program download and control functions only
> work if I disconnect the MIDI cable and sound module. Is that to be
> expected?)
>
> Thanks, Paul E > --- In , Tom Igoe <tom.igoe@n...> wrote:
> > I finally got the BX-24 to send MIDI out. Following Jack's
> > directions, I opened COM1, then set the baud rate using
> > register.ubrr = 14. The tricky part was the circuit, but I
> > borrowed one that i used to used from Mark Coniglio's site at
> > troika ranch: http://www.troikaranch.org/schematic.html
> >
> > At first it didn't work, but then I removed the hex inverter
> > (14049/A in his diagram) ... voila! MIDI out.
> > ...
> > I'll post a more detailed version on my website when I get the
> > chance to make it fancy. >
>
> .
> y website when I get the
> > chance to make it fancy. >
>
> .
=====
Tony Brenke
North Tacoma, WA

__________________________________________________





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: BX24 and MIDI out - Paul Everett - Jan 6 12:05:00 2001

Well my output LOOKed non-inverted, so I inserted a DC4049 inverter;
my sound module now happily recognizes MIDI signals. I left out the
transistor, and wired the inverter output directly to the MIDI signal
pin via a 220-ohm resistor.

(Psst... ICs are secretly alive, and they hate us. Pass it on...)

If I ever figure this out, I'll post here. If anyone else is toying
w/ MIDI, please do too. Anyway, on to keyboard polling.

Cheers, Paul E

--- In , "Paul Everett" <peverett@s...> wrote:
> I'm trying to follow in Tom's footsteps here... the MIDI standard
> calls for 'rest' state (0) = ON. On my OOPic lashup an LED from
> the MIDI pin to ground glows steadily, as the standard would lead
> you to expect. Setting up the BX-24 as suggested, a similar LED
> is dark, with occassional glimmers of activity when bytes are sent.
>
> So I seem to have a NON-inverted Serial Port. The documentation
> says that the serial port includes an inverter, and Tom got his
> working by removing an external inverter...
>
> --- In , Tom Igoe <tom.igoe@n...> wrote:
> > ...
> > At first it didn't work, but then I removed the hex inverter
> > (14049/A in his diagram) ... voila! MIDI out.




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )