Jump to content

robinfawell

Programmer
  • Posts

    292
  • Joined

  • Last visited

Everything posted by robinfawell

  1. Dear Thorsten I have been trying without success to produce a function which will reduce the amount of code considerably. I understand the concept, I think, but cannot implement it. I will show below a section of code derived from your previous suggestion. This is repeated about 10 times with changes of pin numbers and groupxselected ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when an button has been toggled // pin_value is 1 when button released, and 0 when button pressed ///////////////////////////////////////////////////////////////////////////// unsigned char group1_selected;//Pedal group, Pins 19-25 unsigned char group2_selected;//Tremelo Fast, Pin 28 unsigned char group3_selected;//Sw_P Group, Pins 33-34 unsigned char group4_selected;//Sw_M Group, Pins 36-38 unsigned char group5_selected;//Sw_R Group, Pin 40 unsigned char group6_selected;//Gt_P Group, Pins 42-47 unsigned char group7_selected;//Gt_M Group, Pin 49 unsigned char group8_selected;//Gt_R Group, Pins 51-57 unsigned char group9_selected;// Pedal couplers pins 16 & 17 unsigned char group10_selected;// Pedal Sub-Octave pin 18 unsigned char group11_selected;// Tremelo Swell Select unsigned char group12_selected;// Tremelo Great Select void DIN_NotifyToggle(unsigned char pin, unsigned char pin_value) __wparam { unsigned char i;// used for MIOS_DOUT_PinSet0 //////// Pedal Radio Group/////// if( (pin >= 19 && pin <= 25) && (pin_value == 0)){ //if button already selected, turn off LED's //this is identified with group1_selected = 0xFF if(group1_selected == pin) { group1_selected = 0xFF;// all LED's Off }else{ //save the selected button function of the group group1_selected = pin ;} //LED's should be cleared for(i=19; i<= 25; i++) MIOS_DOUT_PinSet0(i); //set the LED which relates to the selected function if(group1_selected != 0xFF) MIOS_DOUT_PinSet1(group1_selected); }else{ //////////Tremelo Fast/ Slow Push Button///////// if( (pin >= 28 && pin <= 28) && (pin_value == 0)){ //if button already selected, turn off LED's //this is identified with group2_selected = 0xFF if(group2_selected == pin) etc etc I think that it should be possible to add a function "ControlGroupLed" immediately after the line. if( (pin >= 19 && pin <= 25) && (pin_value == 0)){ in each repeated section. There are 3 variables associated with each group, "lowest pin", " highest pin" and "group'x'connected". From the different sections of DIN_NotifyToggle I would call ControlGroupLed (r,s,x) corresponding to the pins and identifying the relevant group'x'connected After the "ControlGroupLed" I could call the "SendDump2 function. I will be very grateful for your help. Regards Robin PS After sending this message it occurred to me that my Function "ControlGroupLed" needs only to be called with one variable ie groupxselected and that the other parameters could be loaded from an constant array above the function statement. Does this make sense?
  2. Dear TK I'm back! I have finished the organ console complete with 43 MEC LED Switches and 8 pots. Also the Pedal switches have been assembled and have tested satisfactorily. I have coded the button/ LED behaviour and the pedal coupling switches. Currently I am working on the Tremelo buttons. Tremelo There is one pot which provides the value yy in the Modulation messages using Bx 01 yy to the Roland Sound Canvas. There are two switches for two Midi Channels (0 and 1). When pressed they send the value of the pot (yy) to the sound module on the relevant channel. When depressed (pressed again) they send Bx 01 00. If the pot value changes when the PB is selected then Bx 01 zz will be transmitted. The AIN_Notify Change section will take care of the situation when the pot value has changed but how might I trigger the pot to be read after pressing the PB. DIN_NotifyToggle Currently this section has 420 lines(and more to come) mainly consisting of If/Else statements. Should I break this up into smaller sections. Does it matter? I have read somewhere that no section should be larger than one page for clarity reasons. Regards Robin
  3. Dear Thorsten I am currently thinking about the next stage in the organ program. I need to be able to read the sysex files that are stored on 2 Banksticks. The information was stored at various starting addresses, previously in assembler using the following code. ;;IN: Index (Midi_EVNT1 or canc) in WREG ;;OUT: Bankstick Address in MIOS_PARAMETER [12] ;; Count in TMP [12] ;; Bankstick # in TMP3 MIDIO_BANKSTICK_DUMP_GET Mullw 6 ;; the addresses jump in increments of 6 bytes ;; result of multiplication is in PROD[HL] ;; Add Offset to base address of table 16 bit addition) ;; copy result to TBLPTR[HL] movlw (BANKSTICK_DUMP_TABLE & 0xFF) addwf PRODL, W movwf TBLPTRL movlw (BANKSTICK_DUMP_TABLE >>8) & 0xFF addwfc PRODH, W movwf TBLPTRH ;; First Entry: Bankstick Number tblrd*+ movff TABLAT, TMP3 ;; Second Entry: dummy, not used tblrd*+ ;; Third & Fourth Entry: Bankstick Address tblrd*+ movff TABLAT, MIOS_PARAMETER1 tblrd*+ movff TABLAT, MIOS_PARAMETER2 ;; Fifth & Sixth Entry; Count tblrd*+ movff TABLAT, TMP1 tblrd*+ movff TABLAT, TMP2 movf TMP3, W call MIOS_BANKSTICK_CtrlSet call MIDIO_SYSEX_Send_Block return MIDIO_SYSEX_Send_Block MIDIO_SYSEX_Send_BlockLoop clrwdt;; used for Reset large file call MIOS_BANKSTICK_Read ;; Expects Addr in ;;MIOS_PARAMETER[12], Read byte from BS call MIOS_MIDI_TxBufferPut ;;Decrement 16 bit loop counter, loop until counter is zero decf TMP1, F skpc decf TMP2, F bc MIDIO_SYSEX_Send_BlockLoop return;; This may need changing BANKSTICK_DUMP_TABLE ;; BS No Addr Count dw 0x0000, 0x0000, 0x04D4 - 1 dw 0x0000, 0x04D4, 0x04D4 - 1 dw 0x0000, 0x09A8, 0x04D4 - 1 dw 0x0000, 0x0E7C, 0X09A8 - 1 dw 0x0000, 0x1824, 0X04D4 - 1 dw 0x0000, 0x1CF8, 0X04D4 - 1 dw 0x0000, 0x21CC, 0X04D4 - 1 dw 0x0000, 0x26A0, 0X03C0 - 1 dw 0x0000, 0x2A60, 0x04BC - 1 dw 0x0000, 0x2F1C, 0x04CA - 1 dw 0x0000, 0x33E6, 0x032C - 1 dw 0x0000, 0X3712, 0X0000 - 1 dw 0x0000, 0X3712, 0X0000 - 1 dw 0x0000, 0X3712, 0X0000 - 1 dw 0x0000, 0X3712, 0X0000 - 1 dw 0x0000, 0X3712, 0X0000 - 1 dw 0x0000, 0x3712, 0x02F4 - 1 dw 0x0000, 0x3A06, 0x02F4 - 1 dw 0x0000, 0x3CFA, 0x02F4 - 1 dw 0x0000, 0x3FEE, 0x01E0 - 1 dw 0x0000, 0X41CE, 0X0000 - 1 dw 0x0000, 0X41CE, 0X0000 - 1 dw 0x0000, 0X41CE, 0X0000 - 1 dw 0x0000, 0X41CE, 0X0000 - 1 dw 0x0000, 0x41CE, 0x0574 - 1 dw 0x0000, 0x4742, 0x028C - 1 dw 0x0000, 0X49CE, 0X0000 - 1 dw 0x0000, 0X49CE, 0X0000 - 1 dw 0x0000, 0X49CE, 0X0000 - 1 dw 0x0000, 0X49CE, 0X0000 - 1 dw 0x0000, 0X49CE, 0X0000 - 1 dw 0x0000, 0X49CE, 0X0000 - 1 dw 0x0001, 0x0000, 0x04CA - 1 dw 0x0001, 0x04CA, 0x04CA - 1 dw 0x0001, 0x0994, 0x04CA - 1 dw 0x0001, 0x0E5E, 0x04CA - 1 dw 0x0001, 0x1328, 0x04CA - 1 dw 0x0001, 0x17F2, 0x04CA - 1 dw 0x0001, 0x1CBC, 0x032C - 1 dw 0x0001, 0X1FE8, 0X0000 - 1 dw 0x0001, 0x1FE8, 0x02F4 - 1 dw 0x0001, 0x22DC, 0x01E0 - 1 dw 0x0001, 0X24BC, 0X0000 - 1 dw 0x0001, 0X24BC, 0X0000 - 1 dw 0x0001, 0X24BC, 0X0000 - 1 dw 0x0001, 0X24BC, 0X0000 - 1 dw 0x0001, 0X24BC, 0X0000 - 1 dw 0x0001, 0X24BC, 0X0000 - 1 dw 0x0001, 0x24BC, 0x0574 - 1 dw 0x0001, 0x2A30, 0x03A0 - 1 dw 0x0001, 0x2DD0, 0x03A0 - 1 dw 0x0001, 0x3170, 0x03A0 - 1 dw 0x0001, 0x3510, 0x03A0 - 1 dw 0x0001, 0x38B0, 0x0574 - 1 dw 0x0001, 0x3E24, 0x0574 - 1 dw 0x0001, 0x4398, 0x028C - 1 dw 0x0003, 0x0000, 0x4056 - 1 dw 0x0003, 0x4056, 0x0AC4 - 1 dw 0x0003, 0x4B1A, 0x0AC4 - 1 dw 0x0003, 0x55DE, 0x0000 - 1 dw 0x0003, 0x55DE, 0x0000 - 1 dw 0x0003, 0x55DE, 0X0000 - 1 dw 0x0003, 0x55DE, 0x0000 - 1 dw 0x0003, 0x55DE, 0x0000 - 1 I assume that using "C", the address and count will be located in an array associated with the" pin" variable. I may also, I think, need to include the clwdt in the loop for the large "reset" byte count. I think that the following is pertinent. Is it better to have an assembler routine or will the loop program be OK using loops in C program code. Your help will be appreciated. Regards Robin
  4. Dear Thorsten I spent some time trying to get the new code working until I remembered that I am using momentary action buttons. I changed if( (pin >= 4 && pin <= 7) to if( (pin >= 4 && pin <= 7) && (pin_value == 0)){ It works! I will now see if I can put the pin numbers and group_selected parameters in parallel arrays for the 7 radio groups to keep the code size down. It is a very neat solution. Thank you once again. Regards Robin
  5. Dear TK I have spent about 2 days trying to figure out how to code the next stage---without success. A few times I nearly got there but it was always incorrect. Your last code snippet worked fine. What I want is the following. Ultimately to send sysex message when new DIN in the group is pressed. When same lamp pressed in succession it's lamp will go OFF and a Group_Cancel sysex sent. If same Din pressed in succession again the Sysex sent previously will be sent and the lamp will come on. etc etc The Sysex messages can be dealt with later. I want to get the Buttons and LED behaviour sorted out first. RULES A) Only one LED On in group at any time. B) If the same Din pressed repeatedly then it's LED should turn on and off alternately ie toggle. C) If different DIN pressed then new LED comes ON and if previous lamp is ON it will go OFF. Here is my code unsigned char group1_selected; unsigned char last_pin; unsigned char toggle_state[31]; // 31 buttons can toggle void DIN_NotifyToggle(unsigned char pin, unsigned char pin_value) __wparam { unsigned char i;// index for toggle_state & MIOS_DOUT_PinSet //unsigned char array_index; // DIN 4..7 will be pressed if( pin >= 4 && pin <= 7) {if (pin_value == 0) {group1_selected = pin - 4;//save current p i = pin - 4; //Starts array at 0 if(last_pin == pin) { toggle_state [i] ^= 0x01;// changes state on each press MIOS_DOUT_PinSet(pin, toggle_state [i] ? 0x7F : 0x00); }else { // all toggle_state arrays reset and LED's should be cleared for(i=0; i<=3; i++) //toggle_state[i]== 0; {MIOS_DOUT_PinSet0(i);} //set current LED and reset toggle_state MIOS_DOUT_PinSet1(group1_selected); toggle_state[group1_selected] == 1; } last_pin = pin; }else{ //other pins } } } I'm not sure about the storage of last_pin . Also the resetting of the elements in the toggle_state array and the LED's is not working. I thought that I could manage this part on my own. Sorry! Regards Robin
  6. Thanks Thorsten My difficulty is to how record the last Pin # pressed. Also to temporarily store the current Pin # so that I can restore the array index after setting the group array_index values to zero. I am trying to use my Assembler method using C. On each Din I reset all array_index in the group. Then set the current array index by using the stored current pin # or array_index. I realise that it would be possible to use a conditional 'for loop' using break and/or continue. This ensures that only the current array_index is On and it is copied by Dout. Dout. If however the same Din in the group is pressed twice in succession (using Last_ pin_pressed) then each array_index is set to zero prob by using the XOR toggle. I am no sure how to set up the two stored values. Regards Robin
  7. Can anyone help me to find a UK source for Alps 25mm -30mm Sliders and suitable Knobs . I need about 10 of each. Ideally the knobs would be in various colours. Thanks Robin
  8. Dear Thorsten I have made an attempt to introduce code in the Din_Notify_toggle section. It worked in a fashion but not correctly. I believe I need to have a register (I am thinking hardware not software!) to store the last unsigned char pin . I can then compare the current ' pin' with the stored value using an if /else statement. Depending on the result I can manipulate the MIOS_DOUT_PinSet expressions and the toggle_state arrays to Drive the LED's and to eventually send appropriate Sysex messages. At this stage I want to restrict the work to just getting the correct LED behaviour. I suspect that I may need another global variable and some additional code in the Din_Notify_toggle section. Briefly how do I achieve this? Also can I use 'pin' or 'array_index' in a for statement? Do they need to be 'int' ? eg for ((array_index) = 0 ; (array_index) <= 3 ; (array_index)++) toggle_state[0] == 0; Thanks Robin
  9. Thanks Mickey, I will check the forums out when I begin solve my C Programs. I/m sue they will be useful. Regards Robin
  10. Dear Thorsten Since I first sent this message I realise that I dont need pointers for a character array. I realise that I only need single quotation marks and dont need the *. However it should still work. Here is the modified code. I still get the same errors during compilation! void AIN_NotifyChange(unsigned char pot, unsigned int pin_value) __wparam { //Send Midi Control to Sound Module eg B1 08 XX, B0 0B YY etc unsigned char status[8] = {'B1', 'B1', 'B1', 'B0', 'B0', 'B0', 'B2', 'B1'}; unsigned char byte[8] = {'0x08', '0x0B', '0x09', '0x0B', '0x07', '0x08', '0x0B', '0x01'}; if( pot >= 0 && pot <=7 ){ MIOS_MIDI_TxBufferPut(status); MIOS_MIDI_TxBufferPut(byte); MIOS_MIDI_TxBufferPut(pin_value);} } Orig Message I have managed to program on Core 2 the two keyboards complete with:- A) one Unmuxed Analog channel generating B1 07 XX B) 2 X 61 keynotes with upper keyboard wired backwards to minimise DIN - DIN cabling C) Coupling of the two keyboards (Double Note On/Off Messages. Thanks very much for your input. 8 Unmuxed Analog Inputs I am attempting to write the code for Core 1 Analog inputs, these are balance controls and Tremelo speed pots. There are 8 pots. I have proved that the system will generate Midi Control Changes but not in the required manner. As you will see below I am attempting to construct a character array pointer with two variables (status) and (byte). These correspond to the 1st and 2nd bytes of the midi message. The compilation does not work, I get character incompatibilty problems. (see below). I am showing the two sections concerned with AIN inputs. ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS after startup to initialize the // application ///////////////////////////////////////////////////////////////////////////// void Init(void) __wparam { // initialize the shift registers MIOS_SRIO_NumberSet(16); // shiftregisters MIOS_SRIO_UpdateFrqSet(1); // mS MIOS_AIN_NumberSet (8); // number of pots MIOS_AIN_UnMuxed ; //define deadband, use 7 MIOS_AIN_DeadbandSet (7); } ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when a pot has been moved ///////////////////////////////////////////////////////////////////////////// void AIN_NotifyChange(unsigned char pot, unsigned int pin_value) __wparam { //Send Midi Control to Sound Module eg B1 08 XX, B0 0B YY etc unsigned char * status[8] = {"B1", "B1", "B1", "B0", "B0", "B0", "B2", "B1"}; unsigned char * byte[8] = {"0x08", "0x0B", "0x09", "0x0B", "0x07", "0x08", "0x0B", "0x01"}; if( pot >= 0 && pot <=7 ){ MIOS_MIDI_TxBufferPut(status); MIOS_MIDI_TxBufferPut(byte); MIOS_MIDI_TxBufferPut(pin_value);} } [u]Compiler text[/u] C:\C_Stops>make Makefile generated. Makefile.bat generated. Directory already exists Assembling MIOS SDCC wrapper ========================================================================== Compiling pic18f452.c Processor: 18F452 ========================================================================== Compiling main.c Processor: 18F452 main.c:238: error 78: incompatible types from type 'unsigned-char generic* [8] ' to type 'unsigned-char' main.c:239: error 78: incompatible types from type 'unsigned-char generic* [8] ' to type 'unsigned-char' -:0: error 103: code not generated for 'AIN_NotifyChange' due to previous errors ERROR! Please note that I am trying the' Hex' 0xB1 and 'straight' B1 data. Both give the same error. Please help. Best Regards Robin
  11. Dear Thorsten Maybe I'm being naive, but I think that I should be able to use the MIOS_DOUT_PinGet , MIOS_DOUT_PinSet0 and MIOS_DOUT_PinSet1 functions to achieve the "Toggle Mode." required for the LED's and to set the necessary "gates" needed to double up the keynotes.(coupling) I am experimenting with two switch/LED's on my core 2. This is now using the small program that you kindly sent me. It works fine and I'm very impressed with the very small number of lines of program required. I'm not sure how to use the first function above. The other 2 seem to work for me. Do I define variables for this function? Please send me a few tips. Regards Robin
  12. Thanks for your comments. I knew that they might be availble from that source. I was looking for a cheaper DIY solution; there are 10 busses +2 small 1 note busses??(spelling) I'm fairly certain that they are gold plated copper. I will wait until the sytem is working, clean the contacts and review the matter before taking any action. Regards Robin Fawell
  13. Thanks Thorsten I think that this problem should wait until I have tested the coupling sensitivity of the sound module. This is some way off. I have to revise hardware and software due to the C program. At this stage it is enough to know that I could limit the degree of coupling if I need to. Regards Robin
  14. Dear Thorsten I have started to look at Core 2 Programming using C. This core is fairly simple and uses 122 pins just for the keyboards. There will be either 1 or 2 pins for coupling purposes where I can begin to test the problems discussed by Per S. A thought occurred to me that I may be able to reduce the midi choke possibilities by letting Core 1 know the extent of coupling in Core 2 ( and vice versa) by connecting Core2 DOuts to Core1 Dins and vice versa. I haven't thought this through completely. But it seems possible that I could restrict how much coupling can take place if this proves to be a problem. However is this type of Core interconnection allowable? Regards Robin
  15. Thank you Thorsten and Per S for your comments I cannot change the basic system and must persist with the Sound Canvas SC 8850 and with 2 core solution. I would if necessary use another core! I take Per's comments regarding Midi choke but bear in mind that I have128 voice poliphony. At present I have two cores independently working. The SC 8850 has 2 Midi In . I am wondering if I should change the system to route the Midi out from the 2 keyboards (Core 2) via Core 1 using Midi Merge. Would this work to improve matters? I called Edirol (Roland) this morning to find out more about how the module will react to "coincident" Midi On messages on the same Midi channel and the possibility of losing Note Off . They will get back to me. Regards Robin
  16. Dear Thorsten You have suggested before that I should use C programming. I decided last time to persevere with Assembler. I have had some success now with Assembly programming and have dealt with the various modes of button behaviour to my satisfaction. As you know all of this was using the meta handler. I am quite happy to spend a few weeks to learn C but 6 months might be too long. My previous programming knowledge is over 30 years ago and it was minimal. I have sent for a C program book from Amazon and will look at what you have done and try your test example. Regards Robin
  17. Dear Per S Thanks for your input. I have not even thought about the implications of your observations. There is no doubt that the SCPOP organ behaves the way I described to TK. However so far I have only tested the "software organ" one channel at a time. My understanding is that two things may happen. Firstly that the previous On message is cancelled. Second that the next message is ignored. This behaviour depends on the desgn of the sound module. I should be able to test this soon. Is Coupling a matter that you have dealt with? Regards Robin
  18. This message is to anyone who knows about older electronic organs, possibly Jim Henry. I would like to replace the gold plated buss in the Conn Model 716 that I am redesigning with midibox bits. They are pitted and I think that the contact reliability should improve. The manual refers to these as Clad rods. I guess that they are gold plated copper. Each buss is just under 6.5" long with a right angle bend projecting about 3/8". This is the contact for the buss. There are 5, one for each octave. There is also a short one for one note about 1/2" long. The dia is 1.1mm. Where should I look for this gold plated wire. I imagine that the spares may be difficult to find and that I should be able to make them with any luck. Regards Robin
  19. Thanks Thorsten I am not really sure how to proceed. I believe that I can cope with the controls and "gating" from the coupling select buttons. However I cannot figure how to generate the 2nd and 3rd (required in one case) midi event. From your suggestion to use Midio_ Din.inc I assume that somehow you will be sending the 2nd midi event by triggering another pin number of equivalent Note but with a different Midi channel. It seems that this will also mean that the 128.ini file will need to have defined the note and channel of this 2nd "input" This may present a problem for me. Core 1 has the 31 pedal notes and the Meta handler based organ stops. The Core 1 128.ini defines these. Core 2 has upper manual (61 notes), lower manual (61 notes) and two only Meta handling controls (actally used to couple the upper and lower manuals) . Again, Core 2 128.ini defines these. The might be a problem in coupling the pedals to the upper or lower manual. The or is important. Due to polyphony constraints only one manual can be selected at one time. The pedal 128.ini file has no "knowledge" of the Core 2 128.ini file. Coupling means that if the pedal coupler selects the upper keyboard then the notes played on the pedal will also utilise the organ steps that have been already selected on the upper keyboard. In the old days this was achieved by mechanical coupling. Coupling between the upper and lower manuals should be OK on my reasoning. Your reply will be appreciated. Regards Robin
  20. This is a coding question. Probably for Thorsten. I need to couple the upper keyboard to the lower keyboard and the pedalboard to the upper and lower keyboards. This will only happen when the relevant coupler(s) is(are) selected. This is achieved by doubling the midi note on and the midi note off and changing the channel number on the second pass. In my system Midi channel 0 is used by the lower keyboard, Channel 1 by the upper k/b and channel 3 for the pedals. I have looked through the Midio_128 coding and have concluded that I should modify the lines in Midi_event.inc following MIDI_EVNT_Send_8x ; Note Off MIDI_EVNT_Send_9x ; Note On The coupling selection is associated with specific Din/Dout pins and I will utilise the Dout "flag" status to generate either single or double Note On/Off with the midi channel change with the latter. Am I on the right track ? Regards Robin
  21. Thanks Per S Regarding the spare pins, I would guess that in using Note on /Note Off it does not matter what values are entered because there will be no input on the relevant input pins. The important point is that the spare entries are made. This will ensure a complete set of Din entries (128 in my case). Regards Robin
  22. I would appreciate confirmation that the following will work. I have two keyboards each with 61 notes. Swell and Great (Upper and Lower) I have allocated 2 Din Modules for each keyboard. Total 4 Din Modules. One core module will be used for the two keyboards. Channel 0 is used for the Great manual and Channel 1 is used for the Swell manual. The lowest note on each keyboard is C2, the highest C7. For convenience I will use Din 1& 2 with the lower manual and therefore the entries under Midi Out in Midio128.ini will commence with (Pin) 1 90 37 7F 90 37 00 This will continue until (Pin) 61 90 60 7F 90 60 00 Instead of continuing on Midi Channel 1 with (Pin) 65 9137 7F 91 37 00 I propose to allocate (Pin) 65 to the last note C7 ie (Pin) 65 91 60 7F 91 60 00 (Pin) 66 91 5F 7F 91 5F 00 This will reverse the Din allocation on Din3 and Din4. Is this allowable? This will save criss-crossing the length of the keyboaard with long Din - Din connecting cables. Also what entry do I make in the ini file for spare unused Din inputs. In my case Pins 62,63, 64 and 128 Any guidance will be appreciated. Regards Robin
  23. I have managed to make the program work with the following code GrpF0 (Not Radio Group): Deals with "single" Buttons where a given Din triggers a sysex message ;; The next Din is unused and allows a Cancel Sysex to be sent. MIDIO_META_Handler_F0 movf MIDI_EVNT1, W call MIOS_DOUT_PinGet; btfss MIOS_PARAMETER1, 0 ;Has this Dout been set previously? (tests Dout state) rgoto MIDIO_GRPF0_SYSEX_SEND movf MIDI_EVNT1, W call MIOS_DOUT_PinSet0 ; set LED to off movf MIDI_EVNT1, W addlw 0x01 ; to change the Din by 1 rgoto MIDIO_BANKSTICK_DUMP_GET MIDIO_GRPF0_SYSEX_SEND movf MIDI_EVNT1, W call MIOS_DOUT_PinSet1 movf MIDI_EVNT1, W rgoto MIDIO_BANKSTICK_DUMP_GET It seems as if I must keep inserting the "movf MIDI_EVNT1, W" line before any MIOS_DOUT line. Do these call statements destroy WREG values? Regards Robin
  24. Dear Thorsten I am back on the organ project after a summer break. It seems to me that I should be able to utilise the Dout shift register of my F0 meta group to record the toggle state of 3 push buttons. This requires a different behaviour to my radio groups ( now working). I have 3 buttons First press sends sysex message; Second press sends a different sysex message. They are independent from each other. ;;GrpF0 (Not Radio Group): Deals with "single" Buttons where a given Din triggers a sysex message ;; The next Din is unused and allows a Cancel Sysex to be sent. MIDIO_META_Handler_F0 movf MIDI_EVNT1, W call MIOS_DOUT_PinGet; Has this Dout been set previously? btfss MIOS_PARAMETER1, 0 ; tests Dout state rgoto MIDIO_GRPF0_SYSEX_SEND addlw 0x01; adds 1 to W thus increasing MIDI_EVNT by 1 call MIOS_DOUT_PinSet0 rgoto MIDIO_BANKSTICK_DUMP_GET MIDIO_GRPF0_SYSEX_SEND movf MIDI_EVNT1, W call MIOS_DOUT_PinSet1 rgoto MIDIO_BANKSTICK_DUMP_GET This works to some extent then causes the PC to crash. Please comment. Regards Robin
  25. Since sending my previous message I have found the thread http://69.56.171.55/~midibox/forum/index.php?topic=4446.0. This is very relevant to my problems. I will continue using the analog inputs to the core. I will try to see if a "triple three" screen works twisting the signal, 5V and 0V cables using J2 and capacitors as suggested by Thorsten. If it works or not I will report back. Regards Robin
×
×
  • Create New...