[sdiy] bizarre pic-midi issues

Csaba Zvekan czvekan at gmail.com
Sat Apr 17 01:35:04 CEST 2010


I correct myself MIDI baudrate is 31250baud  ... it's late here, I'm tired  :( but you get the picture .


On Apr 17, 2010, at 1:23 AM, Csaba Zvekan wrote:

> Karl ,
> 
> 
>> 
>> Csaba asked about the baudrate: i've gotta assume the rate is correct since the transmission works flawlessly, also according to my calculations the baudrate should be pretty much 100% correct. BUT the microchip calculations allways confuse me...
> 
> I don't think it does that's why I am asking : Because of this 
>> I'm sending the data from my Juno 2 to my computer which monitors the data and then outputs it to my hardware - looks fine. The very interesting bit is that my hardware somehow completely fails at getting the 0xFE active sensing messages half the time, when they do show up they mostly become 0xFF instead.
> makes me think that there is obviously the MSB interpreted sometimes as one and sometimes as zero. Have you tried disabling "extended instruction set" , yet
> 
> Also looking at the datasheet on page 31 PLL settings . What do you have set on FOSC3:FOSC0 ? I would say:  b111x can you confirm that ?
> So you're running your µCU at 16Mhz with CPUDIV = b 11
> 
>> Running a 12MHZ crystal to the PIC with the following division attributes:
>> #pragma config PLLDIV = 3 
>> #pragma config CPUDIV = OSC3_PLL4
>> #pragma config USBDIV = 2
> 
> And I come up with a calculated  baudrate for 38400baud  = 41666
> 
> SPBRGH= b10100010
> SPBRG  =  b11000010
> 
> How did you come up with these values ?
> 
>> 	SPBRGH = 0;
>> 	SPBRG = 11;
> 
> Check all the oscillator and baudrates again . I think there is your problem .
> 
> 
> 
> 
> 




More information about the Synth-diy mailing list