spongebob Posted July 22, 2009 Report Share Posted July 22, 2009 On some pins of 74hc595 measured +5V after power-on. But there are must be 0V.I have insert this code to application source void Init(void) __wparam { unsigned char i; // ... for(i=0;i<128;++i) { MIOS_DOUT_PinSet0(i); // Set ALL DOUT pin to 0 } } ... void MPROC_NotifyReceivedEvnt(unsigned char evnt0, unsigned char evnt1, unsigned char evnt2) __wparam { // check if note on or off event at channel 1 has been received if( evnt0 == 0x80 || evnt0 == 0x90 ) { // if note off event: force evnt2 to 0 for easier handling of 'LED off' if( evnt0 == 0x80 ) evnt2 = 0; // number of DOUT pin in evnt1, value in evnt2 MIOS_DOUT_PinSet(evnt1, evnt2 ? 0x01 : 0x00); } if (evnt0 == 0x90 && evnt1 == 0x40 && evnt2 == 0x01) { for(i=0;i<128;++i) { MIOS_MIDI_TxBufferPut(0x90); // Send to PC DOUT pin state MIOS_MIDI_TxBufferPut(i); // MIOS_MIDI_TxBufferPut(MIOS_DOUT_PinGet(i)); // } } and after send "90 40 01" to device i get this 90 00 00 90 01 00 90 02 00 ... 90 40 01 ... 90 7F 00 If I send any 90 xx 01 - on DOUT pins nothing is change.DOUT module tested for bad soldering - all elements soldered good. Quote Link to comment Share on other sites More sharing options...
TK. Posted July 23, 2009 Report Share Posted July 23, 2009 You forgot to initialize the SRIO driver, see also the Init() function of this example:http://www.ucapps.de/mios_c_set_dout.htmlBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
spongebob Posted July 26, 2009 Author Report Share Posted July 26, 2009 I have this code in Init Function:MIOS_SRIO_UpdateFrqSet(1); // ms MIOS_SRIO_NumberSet(16); Quote Link to comment Share on other sites More sharing options...
spongebob Posted August 5, 2009 Author Report Share Posted August 5, 2009 I upload "midibox64" application to core, and nothing changed.May be 74HC595 are broken. But all 8 pieces?May be truble in PIC? How can I test PIC on working capacity?All MIDI events go from PC to CORE and come back (if I write necessary addition to MPROC_NotifyReceivedEvnt function).I dont know to do... Quote Link to comment Share on other sites More sharing options...
spongebob Posted August 26, 2009 Author Report Share Posted August 26, 2009 I have upload "srio_interconnection_test_v1b" and check the interconnections to the DIN and DOUT module with a multimeter.The Pins are mapped to following Modulation Wheel Values: # 0: Pin CORE::J8:DO and DOUT::J1:DO = ca. 5V - OK! # 1: Pin CORE::J8:SC, CORE::J9:SC, DOUT::J1:SC, DIN::J1:SC = ca. 5V - FAIL! (measured only 0.72V (on pin #22 of PIC too)) # 2: Pin CORE::J8:RC, CORE::J9:RC, DOUT::J1:RC, DIN::J1:RC = ca. 5V - OK!Is It a PIC problem? How to solve this problem? Quote Link to comment Share on other sites More sharing options...
spongebob Posted August 26, 2009 Author Report Share Posted August 26, 2009 trouble with PIC pin #22 solved (short circuit with another pin)but DOUT module still not work properly. Quote Link to comment Share on other sites More sharing options...
spongebob Posted August 26, 2009 Author Report Share Posted August 26, 2009 I don't know what happen? but it WORK!! :) Quote Link to comment Share on other sites More sharing options...
avogra Posted August 26, 2009 Report Share Posted August 26, 2009 Yay :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.