Discussion forum for the BasicX family of microcontroller chips.
|
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 |
|
|
|
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. |
|
|
|
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 __________________________________________________ |
|
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. |