Kevin Connor Posted February 21, 2014 Report Posted February 21, 2014 Hi list, I recently re-animated my sammichSID, which had been languishing in a drawer, after a studio redesign. The CTRLR editor runs fine on my Mac running 10.8.4 using latest instructions. I've played with the Lemur editor that normen has built, and that works also. Next, I'm going to try and program my old Peavey PC1600x midi fader control surface, to at least get CC control of various things. ( I gather that CC changes are buffered but not writable as patches? Please accept a low priority request that there be some kind of button or midi event I can press/send to freeze the current state into a new patch, thanks!) Anyhow, my question relates to providing a trigger or gate to an external eurorack envelope generator to drive euro VCAs, VCFs. I see that there are a few AOUT board options. However, I also see notes from searching this forum about using J5 to obtain a simple gate. That's all I need. But looking at the sammichSID board photo, I'm demned if I can find anything labelled J5. Is it a pin on the PIC? Am I blind? Assuming there is a pin I can tap to obtain a simple note-on-to-note-off gate, on a sammichSID board, is it possible to use that gate directly or does one need to build a little buffer circuit, to drive the gate input of a typical eurorack envelope generator? Thanks very much! Warm regards, KevinC Quote
Kevin Connor Posted February 21, 2014 Author Report Posted February 21, 2014 Found this, http://www.ucapps.de/mbhp/mbhp_core_v3.gif . Looks like J5 refers to 10 pins of the PIC. They aren't brought out explicitly as a header afaict on the sammich, but I do see a number of traces brought up to the control board in a header called J16. Is one of those pins directly useable as a gate? I'm hoping someone can point me to a pin or spot on board, say something like "Pin XX is useable as a digital gate, use a 10k resistor in series, need to recompile mios with this CONSTANT set to VALUE". Sorry for asking -- I will just use a meter to find out, but it seems to me that this is the kind of question that has been asked before, and I simply haven't found it through search yet. Thanks for your patience. p.s (( I built this sammich myself, about 2 years ago, but got distracted by computerless, eurorack fun )). Now hoping to use it also mostly computerless, as a euro oscillator module, using midi or CV to sync LFOs, pulse-width, or as a midi slave to an Elektron Octatrack, using parameter locks and CC values to do 'external wavetables'. Quote
Kevin Connor Posted February 22, 2014 Author Report Posted February 22, 2014 I see that v3.gif referred to PIC18F452, and the sammich can haz 18F4685, so looking at traces D0..D7 in J16 of http://www.schickt.de/mb.org/sammichSID_Base_PCB.pdf. Quote
Kevin Connor Posted February 22, 2014 Author Report Posted February 22, 2014 OK, guessing the pins D0..D7 are what I need. I think they are dedicated to LEDs? ... now looking at setup_sammich_sid.asm, ;; 0: J5 has no function at all (analog inputs don't need to be connected to ground) ;; 1: J5 used for analog inputs - A0..A4 control Knob#1..#5, A5..A7 are not used at all ;; 2: J5 used as digital output (pins can be added in CS_MENU_DOUT_TABLE as "shift register #0") ;; 3: J5 used as digital output for external switches (replacement for DEFAULT_EXT_SWITCH_DOUT, AOUT_INTERFACE_TYPE must be != 0) #define DEFAULT_J5_FUNCTION 0 So I believe I want DEFAULT_J5_FUNCTION=3, and see that mentioned explicitly in the V2 user manual. Is that all there is to it? Further in the setup_sammich_sid.asm, there is a table of DOUTs, but they all have values 0,0 S_MENU_DOUT_TABLE ;; Register and bit SR# Pin# Description DOUT_ENTRY CS_MENU_SELECTED_SID_FLAGS, 0, 0, 0 ; SID1 LED (Note: Pin #0 is the D7 output of first SR) DOUT_ENTRY CS_MENU_SELECTED_SID_FLAGS, 1, 0, 0 ; SID2 LED DOUT_ENTRY CS_MENU_SELECTED_SID_FLAGS, 2, 0, 0 ; SID3 LED DOUT_ENTRY CS_MENU_SELECTED_SID_FLAGS, 3, 0, 0 ; SID4 LED ... So slightly more refined question: is it necessary to recompile this .asm to a .hex, to obtain control over the pins D0-D7, to use one of them as a gate to trigger/gate an external device? Quote
Kevin Connor Posted February 22, 2014 Author Report Posted February 22, 2014 OK, downloaded the sdcc and gputils for mac from the 'ben' binaries. The docs have a gap here, after the instructions to download the tools, it doesn't lead to a page with the syntax for making from the command line. I'm sure they are there -- the documentation is excellent, but a bit hard to find. OK, got it, it's just plain "make". muse$ make setup_sammich_sid.hex gpasm -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/j5_io -I ./modules/aout setup_sammich_sid.asm Didn't find any processor named: p18f4685 So the 'ben' binary is a bit old, does not have support for the P18F4685. For mac, downloaded a new gputils tar.zip from http://sourceforge.net/projects/gputils/files/ , ./configure make sudo make install and after that, from the directory where I extracted the midibox_sid_v2_xxx.zip , 'make' works. rcdn-kconnor-89112:midibox_sid_v2_043 muse$ make rm -rf *.cod *.lst *.err rm -rf *.hex gpasm -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/j5_io -I ./modules/aout setup_6581.asm gpasm -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/j5_io -I ./modules/aout setup_8580.asm gpasm -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/j5_io -I ./modules/aout setup_sammich_sid.asm gpasm -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/j5_io -I ./modules/aout setup_tk.asm gpasm -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/j5_io -I ./modules/aout setup_tk2.asm gpasm -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/j5_io -I ./modules/aout setup_mb6582.asm gpasm -p p18f4685 -I./src -I ./include/asm -I ./include/share -I ./modules/j5_io -I ./modules/aout sid_filter_table.asm rcdn-kconnor-89112:midibox_sid_v2_043 muse$ I'll try out some variations in the setup_sammich_sid.asm, make and upload .hex's to my sammich. So final question (if this odyssey to set DEFAULT_J5_FUNCTION=3 works), do I need some kind of buffering circuit on say, D0, to protect the PIC from blowing, if the lead to the eurorack module gets shorted or something? Thanks, KevinC Quote
Kevin Connor Posted February 22, 2014 Author Report Posted February 22, 2014 OK, final post for the evening. Able to compile the setup_sammich_sid.asm into a .hex, upload it to my sammich. I set #define DEFAULT_J5_FUNCTION=3 and #define DEFAULT_GATE_OSC1_L_OUT 1 #define DEFAULT_GATE_OSC2_L_OUT 2 #define DEFAULT_GATE_OSC3_L_OUT 3 #define DEFAULT_GATE_OSC1_R_OUT 4 #define DEFAULT_GATE_OSC2_R_OUT 5 #define DEFAULT_GATE_OSC3_R_OUT 6 with other values in setup_sammich_sid.asm untouched. Playing midi to sammich, watching LEDs light, listening to beautiful sounds. However, I don't see any gate activity on the pins D0..D7. Can anyone help? I think I may need to be touching the CS_MENU_DOUT_TABLE to enable DOUT gates corresponding to incoming notes. DOUT_ENTRY TMP1, 0, 0, 0 ; OSC Env LED Thanks very much for your patience in reading this far! Warm regards, KevinC Quote
Kevin Connor Posted February 22, 2014 Author Report Posted February 22, 2014 Not quite final post -- I'm clearly mistaken. What I thought were D0..D7, in header J16, appear to be routed to the LCD panel only. All the LEDs are running though 74HC595 shift registers IC3,IC4 on the control surface PCB. I don't mind sacrificing some or even all LED function. Just want a pin to tap, and a constant to change in the .asm, to get a gate signal. I'm thinking this means a pin on the PIC itself (see the pads on pins 2,3,4,5, 7,8,9,10) or tapping a resistor connected to the LEDs. Can anyone help, please? Thanks, KevinC Quote
eptheca Posted February 22, 2014 Report Posted February 22, 2014 the sammichSID base PCB has the J5, like the Core. PIC pins 2,3,4,5,7,8,9,10 called A0-A7. (only A0-A4 can be used on the sammich) I use these as Analog IN's on the sammichSID base PCB MB-SID V2's I have As you wrote, J5 can be used for the different purposes as set in the .asm file Quote
Kevin Connor Posted February 23, 2014 Author Report Posted February 23, 2014 Thanks for response, eptheca, and confirmation that PIC pins 2,3,4,5 = A0,A1,A2,A3 == J5 on the sammich! On the sammich, there are extra pads brought out beside those pins, presumably for a builder to add their own header, so I will do that, reassemble, and test. If anyone has a working gate out example on Sammich, i.e. values for the .asm file, output resistor value or buffer circuit, please share. If I get something working, I'll post it here, but I don't know about how to protect those pins properly. Cheers, KevinC Quote
Kevin Connor Posted February 23, 2014 Author Report Posted February 23, 2014 Works! See gates at pins 2,3,4, etc. as expected. Do please anyone let me know if it's good practice to use these directly, or if a buffer is needed. Best, KevinC Quote
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.