Jump to content

MBSID user manual Midi CC confusion


djjonnyjams
 Share

Recommended Posts

Ok, I guess I should be more specific and descriptive.

My core module passed all the voltage checks just fine, so I plugged the IC's in and hooked my LCD up..

I guess I'm confused about a few things. Please be nice because I've googled, searched the forum, read and re-read the walkthrough/MIOS bootstrap for noobs/and all other documentation I could find.

!. My pic is pre-burned with MIOS 1.9 right? it says "MIOS 1.09 Thornsten Klaus blah blah" and then "Ready" I am building a Midibox SID. Is my next step to upload the 8580 hex file to my core? That's what I think the next step should be, but maybe I'm totally wrong....

2. On the MBHP_CORE page it describes what all the "J" ports are for, but none of them specifically say "connect this to SID module"

My assumption is that it's "J11" can someone confirm this?

3. I feel like I'm supposed to upload 8580 hex to the core, then do some more testing with my SID module connected next....

My midi ports are wired correctly, on the midi-out, it shows that the center pin is tied to ground, is it already tied to ground - so I just hook my midi port to that pin? or do I need to solder a jumper wire from the middle pin to ground as well?

I have a few different midi interfaces, and midi-controllers with IN/Out at my disposal, so I tried with all of them and it's the same thing, I set MIOS studio to smart mode, wait for request, and when I turn the core on, it receives the request, but never makes any progress.... it just get's stuck on block 1. I can put it on expert and it will send the whole thing, but there's no indication on my LCD that anything was actually recieved by the core....

If someone would be kind enough to tell me if I'm even on the right track, I would appreciate it very much.

Thanks

~Jonny Jams

Link to comment
Share on other sites

!. My pic is pre-burned with MIOS 1.9 right? it says "MIOS 1.09 Thornsten Klaus blah blah" and then "Ready" I am building a Midibox SID. Is my next step to upload the 8580 hex file to my core? That's what I think the next step should be, but maybe I'm totally wrong....

Correct.

Sidenote: It doesn't say "MIOS 1.09 Thornsten Klaus blah blah".

2. On the MBHP_CORE page it describes what all the "J" ports are for, but none of them specifically say "connect this to SID module"

My assumption is that it's "J11" can someone confirm this?

On http://ucapps.de/mbhp_core.html it says "Interface to application specific module extensions like the SID module." I won't tell you what the correctg J?? is, I am pretty sure you can find it ;)

My midi ports are wired correctly, on the midi-out, it shows that the center pin is tied to ground, is it already tied to ground - so I just hook my midi port to that pin? or do I need to solder a jumper wire from the middle pin to ground as well?

I am not sure what you mean, but you don't have to solder any jumpers on smash's PCBs. The sockets are already there. Stick MIDI cables in 'em.

I have a few different midi interfaces, and midi-controllers with IN/Out at my disposal, so I tried with all of them and it's the same thing, I set MIOS studio to smart mode, wait for request, and when I turn the core on, it receives the request, but never makes any progress.... it just get's stuck on block 1. I can put it on expert and it will send the whole thing, but there's no indication on my LCD that anything was actually recieved by the core....

That means that the Core MIDI out -> PC MIDI In works (it receives the upload request), but the PC MIDI Out -> Core MIDI In does not. This can have various reasons. The routing in MIOS Studio might be wrong, your midi device may not be able to forward SysEx correctly (check the blacklist on the wiki), one or more of the parts on your core may be wrong/broken (diode direction, dead opto coupler), ... Follow the MIDI Troubleshooting guide and post the results here, and we'll know.

Link to comment
Share on other sites

TEST PROG1: If you are not sure that the bootstrap loader has been burned successfully, use the verify function of IC-Prog/P18

- It's there "ready"

TEST CORE1: ensure that you've stuffed a 10 MHz crystal (parallel cut) to your PIC18F core module

- I used the one smash sent...

TEST CORE2: only relevant for MBHP_CORE_V1 and MBHP_CORE_V2 PCB: are all 5 jumpers connected to the programming port?

-what?

TEST CORE3: Check it visually for bad solderings or missed junctions

- My finest soldering job to date....

TEST CORE4: Check Vdd of the power supply like shown here: mbhp_core_extract_measuring_vdd.gif

- yeah, 5v all day

TEST CORE5: Check the ground of the power supply like shown here: mbhp_core_extract_measuring_gnd.gif

-good

TEST CORE6: Check the polarity of your MIDI plugs: mbhp_core_extract_midi_plugs.gif

-yes, I even swapped the wires back and forth to be sure

TEST CORE7: Check the polarity of the protection diode D1: mbhp_core_extract_midi_d1.gif

-It is properly oriented

TEST CORE8: Check the resistor values at the MIDI Out Port: R8 and R7=220 Ohm (resistor code: red-red-brown)

-yes 220

TEST CORE9: Just to ensure: this diagram shows a crosslink between the core module and your PC: mbhp_core_midi_crosslink.gif

-duh

TEST CORE10: If you notice a lot of request messages like shown in this snapshot, then there is a short circuit between the Rx and Tx pin of the PIC. Check the tracks which are routed from the MIDI-Link port J11 to the Rx/Tx pins for direct connections (see the layout and schematic), you could scratch with a screw driver between the tracks to ensure that they are not connected together.

TEST CORE11: The code upload can also fail if no, or a too small bypass cap is connected to the power rails of the PIC. A possible effect is, that for example "F0 F0 F0 F0 7E F0 00 01" will be sent by the PIC instead of the proper SysEx string "F0 00 00 7E 40 ... F7". Another effect could be, that something is received by your MIDI interface, but not displayed by the MIDI monitor because of the invalid MIDI event structure. This all can happen even when the IO and Software loopback test which is discussed below is passing,

If this happens, check that the 2200 uF cap (C5 of the core module) is soldered properly. If you are unsure about the state of the cap, since you've re-used it from an old device, try another one.

-I get the correct request code

If you are using the optimized PSU for MIDIbox SID, bypass the outer pins of the (not mounted) 7805, so that C5 has contact with the +5V/Ground rails (see also mbhp_4xsid_c64_psu_optimized.pdf)!

oh..... maybe I should remove that regulator....

TEST OUT1: Connect a LED to your MIDI Out port and check if it flickers: mbhp_core_extract_out_led.gif

TEST OUT2: Somebody noticed in the forum, that the MIDI Out of his core module didn't work because of an "incompatibility issue" with the bench supply he used and the switching PSU of his PC. The solution was to disconnect the middle pin of J12 (ground line of MIDI Out port)

Link to comment
Share on other sites

Follow the MIDI Troubleshooting guide and post the results here, and we'll know.

Especially the part that actually tests your core's MIDI In is interesting... That's the part followed by "If nothing happens, your MIDI-In is possibly not working:"

Link to comment
Share on other sites

Are you using real MIDI cables ? Or a home made pair of twisted wires like I first did ? Because I had the same problem than you, correct midi request (are you sure you set the good ID ? The number at F0 00 00 7E 40 XX 01 F7), first block then... nothing. It all solved when I used MIDI cables and sockets - after some experiments on polarity though.

Just to be sure :

- if you use a gm5, when viewed from above, the left socket is gm5's midi in (that you have to connect to core's midi out) and I let you guess what follows for the right one.

- the sockets on my core are soldered like shown below.

If it still doesn't work though, or if you're already in the right configuration, just do the test in 3 and let us know (beware particularly of the LED polarity - it should lit). If datas actually reach your PIC, this LED should flicker when, for example, you use the keyboard tool of miosstudio and hover your mouse on it. You've got to well observate the LED because the flickering is not obvious, since it's a normally lit LED. The more events you send at a time, the better it is. You can also send a sysex with midiox if you know how to do this.

If it doesn't flicker, check your MIDI device routing (the surest procedure is : restore default internal routing - open the midi device routing window - link your device IN LEFT PANEL to "MIOS studio IN port" in the right one, and "MIOS studio OUT port" IN LEFT PANEL to your device in the right one.), then retry to send a big amount of datas the way you want.

If it still doesn't flicker, maybe your opto is broken - there's some tests in the troubleshooting guide to figure it out, or maybe datas don't even reach it : you can do the test in 5 to see if datas are actually available after your core's midi in .

With all that, you should at least know if the problem is before the core, between the core's in and the pic or in the PIC itself.

I assume there's no problem in your midi out path (from core to PC) since you do see the sysex.

core midi sockets pinning.JPG

core midi sockets pinning.JPG

Link to comment
Share on other sites

I just wanna say you guys are great for helping me out. I am taking a break from electronics for the rest of the week. I wasn't getting enough sleep, and my brain has turned to marshmallow.... I haven't smiled since I started the midibox project last weekend, since I decided there's no reason I have to get this thing working right away, I feel less stressed out about life in general. Today I am smiling as I type this.

My wifey/family/work/music all get neglected when I spend too much time on the workbench, so I'm gonna enjoy those things for a couple days and then come back to this project with a fresh head. Thanks a lot guys, I'll let you know how it all works out. Till then, I'll leave you with some totally unrelated inspiration:

Link to comment
Share on other sites

ONLY 4.45 VOLTS on pin 26 of the pic... 5.06 - 5.12 everywhere else. What now?

LED lights up when connected to midi out (outer pin + middle pin) and flashes for a second when connected to both outer pins.

Midi interface is working properly (loopback passed)

when i play notes from my keyboard in midiox, I only get one set of messages, not 2 like in the picture?

Help!

I have checked my cables, wiring, and midi interface several times. Can we please rule that out?  I still get the upload request and midi-out from the midibox appears to function perfectly. I suspect the problem is with my midi-in. protection diode is properly oriented (it's impossible to screw that up on smash's pcb's, black line on the diode lines up with white line on the pcb....)  what's my next step guys? Is the 4.45v on pin 26 a clue?

Thanks

~J

Link to comment
Share on other sites

That was rude.. Sorry.

Just having fun.

Pin 26 is where MIDI IN enters the PIC.

That pin is an input, which means it's probably not the PICs fault (we'll get right back to that in a minute)

It is normally pulled up to +5 volts by resistor R6.

It is pulled DOWN by the optocoupler during an incoming MIDI signal. we'll check that in a moment.

SO let's tear this down:

verify resistor R6 as 1.2K from 6n138 pin 6 to +5 volts

verify resistor R5 as 5.6K from 6n138 pin 7 to GND

Unplug the MIDI cables, check the voltage again. Still low? Then it's not a bad MIDI OUT signal from your PC interface.(or unexpected MIDI traffic)

Turn off all power, remove the (hopefully socketed) optocoupler. RE-apply power. Is the voltage at 26 still low? I'd be surprised. Most likely it's fine now, so buy a new optocoupler.

If it's still low with the opto removed, pin 26 of your PIC has been damaged. replace the pic. (but I doubt it will be that)

Let us know what you learn along the way

Good Luck,

LyleHaze

Link to comment
Share on other sites

sorry for my ignorance, but I'm not sure what reading I am supposed to get from those pins you mentioned. It was nothing near 5v....

You were right, when I removed the 6n138 and unplugged the midi cables, the voltage at pin 26 on the pic was normal. So I need a new optocoupler..... I wonder how I blew it...

on the other tests you described am I supposed to be measuring resistance? or voltage?

Link to comment
Share on other sites

I'm not sure what reading I am supposed to get from those pins you mentioned. It was nothing near 5v....

Sorry, sometimes I get ahead of myself. Ill try again.

From the beginning,

With no power to the core, check the resistance of R6. It should be near 1.2K (1200 Ohms)

With no power to the core, check the resistance of R5, it should be near 5.6K (5600 Ohms)

Resistance tests are done with each meter lead on each end of the resistor, and the meter set

to Ohms.

These resistors are part of the PIC side of the 6n138 optocoupler, so I thought it would be a good idea to verify that they are correct. When I say "near", I mean within 5%. They do not have to be exactly right.

If you're building from a kit, I'll assume that R6 is between pin 6 and +5 volts, and that R5 is between pin 7 and GND. If you hand-wired your core, please check those details too.

Now on to voltage testing.

You said that you only have about 4.45 volts at pin 26 of the PIC. To find the cause, we need to eliminate one possibility at a time. To begin, put everything back together, hook up the MIDI Cables and power it all up. Connect the ground lead of your meter to MIDIBox ground. (The tab of the 7805 is handy for this) Set your meter to DC volts, some scale above 5 volts (probably 20). Check the voltage at pin

32 of the PIC. It should be very close to 5 volts. If it's not, either your power supply is bad or your meter sucks. Fix the power supply or change the batteries in your meter. (don't laugh, it happens all the time)

Now check the voltage at pin 26 of the PIC. You said before that it was 4.45 volts there. Is it still near that voltage? If so, proceed to the next step. If it's closer to the voltage you got from pin 32, your problem has magically disappeared, test your core.

Now we have determined that the voltage at pin 26 is a little low. We need to determine the cause. because a meter reads an "average" of a fast moving digital signal, we need to make sure that what you're seeing is not really unexpected MIDI messages coming in. So please unplug the MIDI cable connected to the MIDI IN jack of the core. So now you have the optocoupler IN, but no cable connected to CORE MIDI IN. with the power to the core ON, check the voltage at pin 26 again. If it is very close to full voltage, then either you were getting MIDI messages, or you have a bad MIDI OUT from your PC.

If the voltage at 26 is still a bit low, we will keep looking for the cause.

power the core down, remove the optocoupler. power back up. check the voltage at pin 26 again.

If it is back to near 5 volts, then we have determined that the optocoupler was pulling pin 26 down even with no signal attached. replace the optocoupler.

If the voltage at pin 26 is still low, even with the opto out, your PIC has been damaged, order a new one.

As always, I offer help for free, and it comes with a money back guarantee.

Good Hunting,

LyleHaze

Link to comment
Share on other sites

Oh my god.....

I checked all the thingas you told me to and they were correct.

I guess I just assumed that all the text on IC's would read the same way on a circuit (like in commodore computers....)

the optocoupler was backwards. 8580hex succesfully uploaded. Onto the SID module. Thanks dude. You were so very helpful and I really appreciate it.

Link to comment
Share on other sites

I guess I just assumed that all the text on IC's would read the same way on a circuit (like in commodore computers....)

Wow, thats an interesting input!

This could explain, why people sometimes report a problem with their MIDI IN port, or why sometimes optocouplers got fried. Therefore I added TEST IN1B to the troubleshooting page, but I fear that I've to change the labels in all schematics to be sure that nobody interprets them incorrectly.

TEST IN1B: Check that the 6N138 optocoupler is put with the correct pin orientation into the socket! 
Pin #1 (marked with a notch) shows into the direction of J11!
Note that the optocoupler could be damaged if you are trying the wrong pin orientation!
[/code]

Best Regards, Thorsten.

P.S.: LyleHaze: as always great tips!

Link to comment
Share on other sites

DJJ:

Glad I could help. As usual, sometimes I give too many details, sometimes not enough. If I get feedback I'll make adjustments as needed.

I try to describe WHY each test is being done. It is my hope to teach HOW to troubleshoot, not just how to get out of the problem of the day.

TK:

Lately I have been a little more active in the troubleshooting forums. If I step out of line, please feel free to tell me. I have no problem making adjustments if requested.

Nice adjustment on the build guide. Sometimes it's the little things that make a difference. (That's what she said!)

And they all lived happily ever after..

LyleHaze

Link to comment
Share on other sites

Note that the optocoupler could be damaged if you are trying the wrong pin orientation!

As could the PIC and all other ICs if oriented the wrong way around ;) Even though the same orientation for all ICs is good design practice it's not always doable (when working with size constraints for instance) - that's why smash's boards have this nice silkscreen and there's pretty detailed info about them (http://www.avishowtech.com/mbhp/mbhp_coreR4d.html)

TK:

Lately I have been a little more active in the troubleshooting forums. If I step out of line, please feel free to tell me. I have no problem making adjustments if requested.

Bwahaha, good one. Keep helping, no excuses :D

Link to comment
Share on other sites

You guys are the best. That's all there is to it. You are all really awesome dudes. You're my heroes.

So I didn't have the proper components to finish my optimized PSU, I am using the 5v from the commodore power supply, but my SID module is being powered by a wall-wart which puts out something like 13v dc (It works fine and the 7809 doesn't really heat up at all)

After grounding the audio input I barely hear any noise at all, but then again, I AM used to commodore 64's that are noisey as hell.

I just want to say that this whole project is brilliant. The PCB's from smash are really nice, You can desolder a few times if you make a mistake, and the pads still stick to the board.

I mucked around a bit with one of my keyboards, just playing with that preset lead patch (no bankstick)

The midi CC chart is kind of hard for me to follow because I don't understand hex, but I got a few things working, and I had a lot of fun!

Question: I have another SID module to build, and I kind of wanted to stuff it with a 6581, but my guess is I'd need another core with the 6581.hex. Correct? I mean, I understand that they require different filter caps and 12v instead of 9, but is there any way to have one core control both revisions, or would it just sound crappy because of the filter calibration?

My plans for today is to start mounting the stuff in an enclosure. I think I'm gonna hold off on the control surface and just see how far I can get with MIDI. My idea is that I can make a little automation clip in ableton that will send all the CC data I need to create the sound presets (kind of like a patch)

Also, my midi controller lets me store snapshots, so I could also use those like presets.

Anyone every done it like that?

One last question, I went through the CS page, but couldn't find any info on a minimal control surface for a 4x20 LCD, is it possible? How would that work?

Thanks again guys.

~Jams

Link to comment
Share on other sites

OK, sorry for all the questions but, lets say I want to activate filter on the different voices, I know I wanna use CC#8 but this seems like something I'd wanna use a toggle for, so say to turn voice 1 filter on, I would have it send a value of "0" then how do I turn it off? same message again? so my button for that function would have a msb and lsb of "0" ? and each time this message is sent, it would toggle the filter on/off in the midibox?

And, can I set it up so my midibox (with no banstick) uses the bassline engine by default? (Instead of lead)

Thanks

Link to comment
Share on other sites

I know I wanna use CC#8 but this seems like something I'd wanna use a toggle for, so say to turn voice 1 filter on, I would have it send a value of "0" then how do I turn it off?

I'm guessing, as I've never built a Sid. But USUALLY, in the MIDI world, if you are controlling a toggle with a CC number, a value of 63 or lower will turn it off, and a value of 64 or more will turn it on.

But most people just use zero (off) and 127 (on)

If you're curious about why we use those numbers, try seeing those numbers in binary. It's a seven bit number, with a range of 0 to 127.. The MSB (Most Significant Bit) is OFF below 64, and ON at 64 and above, so they just use that MSB to control the feature.

Have Fun,

LyleHaze

Link to comment
Share on other sites

Ok, I am familiar with midi, I own several midi controllers that I've got programmed to control my various synths/software, and you are correct that values above 63 toggle on, but what confuses me is that several functions on the midibox SID manual are assigned to the same CC:

look at this: (8 and 9 are the CC# - I don't understand what the bits are about) how can I control these functions independently when they are assigned to the same CC#?

  8 | 08h | Filter Channels                                 

    |    |  Bit 0: Filter for Voice 1 on/off       

    |    |  Bit 1: Filter for Voice 2 on/off         

    |    |  Bit 2: Filter for Voice 3 on/off     

    |    |  Bit 3: Filter for Audio In on/off       

  9 | 09h | Filter Mode                                           

    |    |  Bit 0: LowPass on/off                             

    |    |  Bit 1: BandPass on/off                             

    |    |  Bit 2: HighPass on/off                                 

    |    |  Bit 3: Voice 3 off     

Link to comment
Share on other sites

Oh, that is a horse of a different color.

Binary values, each bit controls a different filter.

More controls from less registers.

You said:

8 | 08h | Filter Channels                                   

     |     |   Bit 0: Filter for Voice 1 on/off         

     |     |   Bit 1: Filter for Voice 2 on/off         

     |     |   Bit 2: Filter for Voice 3 on/off       

     |     |   Bit 3: Filter for Audio In on/off         

   9 | 09h | Filter Mode                                             

     |     |   Bit 0: LowPass on/off                             

     |     |   Bit 1: BandPass on/off                             

     |     |   Bit 2: HighPass on/off                                 

     |     |   Bit 3: Voice 3 off       

To keep this simple, I'll translate everything to decimal

Bit 0 has a "value" of 1

Bit 1 has a value of 2

Bit 2 has a value of 4

Bit 3 has a value of 8

Add up the "ON" bits and you have the result to send to CC8

Google "Binary Numbers" for more on how this works.

SO if I send a CC* with a  value of Zero, all filters are OFF

Value 1, filter for voice 1 ON, all other filters OFF

Value 2, filter for voice 2 ON, all others OFF

Value 3, Filters for 1 and 2 ON, all others OFF (1+2=3)

Value 4, filter for voice 3 ON, all others OFF

Value 5, Filters for voices 1 and 3 ON, all others OFF (1+4=5)

Value 6, Filters for voices 2 and 3 ON, all other filters OFF (2+4=6)

Value 7, all three voice filters ON, Filter for audio in OFF (1+2+4=7)

the next eight are identical, except with the audio IN filter ON.

It's not that confusing if you see the bits in binary. Let's count to 15..

0=0000

1=0001

2=0010

3=0011

4=0100

5=0101

6=0110

7=0111

8=1000

9=1001

10=1010=A

11=1011=B

12=1100=C

13=1101=D

14=1110=E

15=1111=F

So each bit controls 1 filter, the bit on the RIGHT is Bit 0, the bit on the LEFT is Bit 3.

For each bit, 1=Filter ON, 0=Filter OFF

It's like being in "The Matrix". Once you see numbers in binary, you don't need a translation.

Have Fun,

Neo

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...