PIC Mapping for : [15.02.2005] for wiring details, refer to schematic on the website. [analoog aan Trump, Bourdonola] PIC1: Note ON/Note OFF board data-port: RB0-RB7 Port B van de PIC, alle bits geflipt: RB7 ==> D0 pic pin 28 RB6 ==> D1 pic pin 27 RB5 ==> D2 pic pin 26 RB4 ==> D3 pic pin 25 RB3 ==> D4 pic pin 24 RB2 ==> D5 pic pin 23 RB1 ==> D6 pic pin 22 RB0 ==> D7 pic pin 21 adressing strobe signals for the latches: Port C van de PIC: RC0 = Timer 1 output. Test LED op PIC board (zoals op het board) LED via 1k2 naar GND. pic pin 11 RC1 = A7, latch 7 notes 108-115 pic pin 12 RC2 = nc pic pin 13 RC3 = nc pic pin 14 RC4 = nc pic pin 15 RC5 = nc pic pin 16 RC6 = nc pic pin 17 RC7 = serial input for MIDI data pic pin 18 (zoals op alle andere boards) Port A van de PIC: RA0 = A1, latch 1 notes 60-67 pic pin 2 RA1 = A2, latch 2 notes 68-75 pic pin 3 RA2 = A3, latch 3 notes 76-83 pic pin 4 RA3 = A4, latch 4 notes 84-91 pic pin 5 RA4 = A5, latch 5 notes 92-99 pic pin 6 RA5 = A6, latch 6 notes 100-107 pic pin 7 [ note: we may have a 1 offset on notes for hardware wiring reasons] [ in this case RA0 would select note 59 - 66 etc..., note 59 being unconnected] GROUND: pic pin 19 pic pin 8 POSITIVE SUPPLY: pic pin 20 Software implementation: Channel = 2 (&H02) Note range: (note-on & note-off implemented): 60 to 115 (note range 60-108, 109-115 not notes = lights and effects) notes out of the range should be rejected in the PIC software. The software should have a seven byte array to store the contents of the latches: la(1) to la(7) On init, all strobe bits should be high and all notes switched to OFF. The note latches should be cleared. This should also happen on reception of an all-notes off command (176+ channel, 123, 0) : AllOff: FOR i = 1 to 7 la(i) = 1 RB = 0 la(i) = 0 ' 1 microsecond la(i) = 1 NEXT ************************************************************************************** PIC2: Pulse-board 8- percussion devices, (notes 120-127, with velocity - no note off required) mapping: Note 120 RA2 pulse proportional to velo, no note off Note 121 RA1 pulse proportional to velo, no note off Note 122 RA0 pulse proportional to velo, no note off Note 123 RA3 pulse proportional to velo, no note off Note 124 RA4 pulse proportional to velo, no note off Note 125 RA5 pulse proportional to velo, no note off Note 126 RB7 pulse proportional to velo, no note off Note 127 RB6 pulse proportional to velo, no note off (pulse scaling, to be tested, tentative: 1ms - 16ms) Note 119 RB5 (Note ON - Note OFF, light on percussion module) Note 118 RB4 (Note ON - Note OFF, RED light on bellows) [ Ctrl RB3 motor speed control from PWM or from controller pot (ON/OFF) ] [ Ctrl RB2 motor run reverse 1 = run ] Ctrl 65 RB1 motor enable / reset: 1 = enable, 0 = reset (wait 2") [ Ctrl RB0 motor run forward 1 = run ] Note 117 RC5 Note ON - Note OFF, light Sfz RC4 Pulses on every note ON with its VELO value. sfz solenoid control (if enabled by the appropriate controller) repeated pulsing, should merely extend the pulse. tentative pulse scaling: 4 - 64 ms Polarity depending on controller. Pulses also on reception of channel pressure commands. (cfr. midi implementation table) RC2 = PWM Motor controll (now using a diode circuit). [ scaling: for input value 100, motor frequency should equal 50Hz] RB2 and RB0 are mutually exclusive! RB2 must be True on init (output from mosfet must be false on init.) RB1 must be False on init (output from mosfet must be true on init). RB3 must be True on init. (output from mosfet must be false on init) These should not have any controller. Volume controller: controller nr. 7 [176 + k, 7, data] channel 2 (counting from 0) The received value for this controller should be output as a repeated PWM signal on pin 13 (RC2) of the PIC. (Motor speed) For parameter value 0, the RC2 pin should be 0. (no PWM) For parameter value 127 ,RC2 should be 1. (no PWM) For Piperola motor 0-10V dc control is used. We use no buffering other than the power mosfet followed by an RC with time constant ca.10 seconds (100mF / 100k). Note that the PWM is inverted (since we use a Mosfet as buffer, operating as an inverter). Motor on/Off controller: controller nr. 65 [176 + k, 65, data], mapped on RB1. data = 0 = False, motor off >0 = True, motor on (Note that the pic has to output the opposite values!!!: at data = %False, RB1 must be True. Motor on off should have no effect on the PWM value. Sforzando solenoid (RC4): Controller 10: 0 ===> NO sforzando 5 ===> velo sforzando using overpressure (solenoid at rest not activated) pulse length derived from velo on each reception of note on, the magnet should be activated 6 ===> velo sforzando using underpressure (solenoid at rest activated). pulse length derived from velo on each reception of note on, the magnet should be deactivated 9 ===> overpressure sfz., value derived from channel pressure message 10 ===> underpressure sfz., value derived from channel pressure message 16 ===> use solenoid as tremulant, frequency set with controller 11 (if this at all possible for a PIC?) Controller 11: tremolo speed (if controller 10 is set to 16) Frequency should be parameter value / 10. Channel pressure: 208 + k, 1 databyte If this is received and controller 10, is set to 9 or 10, a pulse proportional to databyte should generated on RC4. The polarity depends on the value of controller 10: 9 or 10. The midi procedure should trap the velo value for notes on in the range 60-108. If the value of controller 10 is 5 or 6 set, this must generate a pulse on RC4. So: Ctrl 10 = 0 means no sforzando in use (RC4 must be low) Ctrl 10 = 5 means sfz pulses derived from note-velo value (overpressure accents) Ctrl 10 = 6 means pulses derived from note-velo (underpressure accents) Ctrl 10 = 9 means sfz pulses derived from channel pressure value (overpressure accents) Ctrl 10 = 10 means pulses derived from channel pressure value (underpressure accents) Ctrl 10 = 16 means tremulant is active. This cancels all other modes. The tremulant frequency should now be set with controller 11.