[sdiy] SOLVED: Atmel AVR midi controller
Bret Truchan
clone45 at hotmail.com
Thu Feb 26 05:20:25 CET 2004
Ah!
I've pretty much solved the problem. I hadn't set the crystal value in the
compiler, which threw off the baud rate. Eventually I'll try to create a
little web page that explains how to use an Atmel Mega16 for custom midi
controllers.
Thanks!
- Bret
>
>
>Hello everyone!
>
>I'm playing around with making a midi controller out of my Atmel Mega 16
>microcontroller. Has anyone else done this? I would love to see some
>example code. I seem to be sending out messages, but it seems like the
>numbers I intend to send are not the numbers that are reaching the
>computer.
>
>Thanks!
>- Bret
>
>Here's my code so far for Bascom AVR ----
>
>$regfile = "m16def.dat"
>
>Dim Mybaud As Long
>Dim Channel As Byte
>Dim Note As Byte
>Dim Velocity As Byte
>
>Mybaud = 31250
>
>Channel = 90
>Note = 60
>Velocity = 64
>
>Wait 1
>
>Do
>
>Waitms 10
>Serout Channel , 1 , D , 1 , Mybaud , 0 , 8 , 1
>
>Waitms 10
>Serout Note , 1 , D , 1 , Mybaud , 0 , 8 , 1
>
>Waitms 10
>Serout Velocity , 1 , D , 1 , Mybaud , 0 , 8 , 1
>
>Wait 1
>
>Loop
>
>End
>
>_________________________________________________________________
>Get a FREE online computer virus scan from McAfee when you click here.
>http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
_________________________________________________________________
Store more e-mails with MSN Hotmail Extra Storage 4 plans to choose from!
http://click.atdmt.com/AVE/go/onm00200362ave/direct/01/
More information about the Synth-diy
mailing list