Hi there,
I'm new to swordfish and am working on a project with an 18f252 with a 20mhz xtal. I need to set my baudrate to 31250 to send messages out via midi.
I see this isn't a standard baud in the usart module. What if anything to I need to do to use this baud rate?
Thank you in advance!
-Chris
Help setting baud rate for midi (31250)
Moderators: David Barker, Jerry Messina
Well - right now I"m planning on using the harware USART - until I learn enough to know that maybe this wasn't the way to go! hehe Anyway I just now got it working...
I added....
br31250 as byte = FOSC / (FMULT * (31250 + 1)) - 1 + 0.5,
to the public const area of the usart.bas and renamed it midi_usart.bas to keep the original.
Loaded it up - programmed the pic and now I"m making music from the pic! yea!
Thanks for your prompt response - if you have any tips or tricks to do this better or smarter please let me know!
Thanks!
-Chris
I added....
br31250 as byte = FOSC / (FMULT * (31250 + 1)) - 1 + 0.5,
to the public const area of the usart.bas and renamed it midi_usart.bas to keep the original.
Loaded it up - programmed the pic and now I"m making music from the pic! yea!
Thanks for your prompt response - if you have any tips or tricks to do this better or smarter please let me know!
Thanks!
-Chris