Jump to content

[solved] Impossible to upload MIOS


nsunier
 Share

Recommended Posts

Hello,

I'm a newbie with MIDIBOX but have good knowledge of electronic.

I ordered kits from Smash's TV and PIC from Microchip. I've burned my PIC (18F4620) successfuly with my Forest Electronics USB Prog'r+ programmer. The burning software has a verify function which told me that it was allright. :)

I use the CORE module alone (in order to avoid other problems). I use a DC laboratory stabilised power supply (9V). The power consumption is of about 50mA.

I use MIOS Studio beta7. I configure MIDI IN/OUT. I receive every 2 seconds:

Sysex message: F0 00 00 7E 40 00 01 F7

I select the HEX file corresponding to the 18F4620:

mios_v1_9f_pic18f4620.hex

In MIOS Studio, I click on "Wait for upload request before starting upload" and "Smart Mode - Use feedback from core". Then I switch OFF the PSU and click on "Start". After that I switch ON the PSU and get the following messages:

Starting upload of mios_v1_9f_pic18f4620.hex

Hex file contains code in MIOS range, forcing reboot!

Received Upload Request

Sending block 00000400-000004FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Sending block 00000500-000005FF

Error: Received unexpected Upload Request

Aborting after 16 errors

The MIDI IN monitor continues (also during transfer) to show every 2 seconds:

Sysex message: F0 00 00 7E 40 00 01 F7

I've tried several checks (I've read the MIDI Interface Troubleshooting page):

- all the resistors/diodes are correct

- the debug LED on Rx works well

- when I remove the PIC and short Rx and Tx on PIC socket the emitted data are shown on MIDI IN monitor

So I've plugged a digital scope on Rx (red) and Tx (blue) pins. See attached files...

Thanks in advance for your help/ideas.

nsunier

Tx (without transfer) (every 2 seconds)_

Tx (without transfer) (detail)_thumb.jpg

Tx and Rx (with transfer) (at startup)_t

Tx and Rx (with transfer) (at startup) (

Tx_(without_transfer)_(every_2_seconds).

Tx_(without_transfer)_(detail).jpg

Tx_and_Rx_(with_transfer)_(at_startup).j

Tx_and_Rx_(with_transfer)_(at_startup)_(

Link to comment
Share on other sites

TEST PROG1: OK Done with the Forest Electronics USB Prog'r+ programmer software.

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

TEST CORE1: OK I've measured the 10MHz by the mean of a scope.

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

TEST CORE2: N/A

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

TEST CORE3: OK

Check it visually for bad solderings or missed junctions

TEST CORE4: OK 5V measured on each test point -> VDD OK.

Check Vdd of the power supply.

TEST CORE5: OK 5V measured on each test point -> ground OK

Check the ground of the power supply.

TEST CORE6: OK (There is a mistake in the mbhp_core_extract_midi_plugs.gif file: 2x M- for MIDI Out !?)

Check the polarity of your MIDI plugs.

TEST CORE7: OK

Check the polarity of the protection diode D1.

TEST CORE8: OK

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

TEST CORE9: OK? My cables are 1:1 (pin 1 = pin 1; pin 2 = pin 2; ...). On the mbhp_core_midi_crosslink.gif file: pin 4 = pin 5; pin 5 = pin 4 !?

Just to ensure: this diagram shows a crosslink between the core module and your PC:

TEST CORE10: OK

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: OK

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.

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)!

TEST OUT1: OK A small pulse occurs every 2 seconds.

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

TEST OUT2: OK good quality PSU

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)

TEST PC1: OK Checked with two different MIDI I/O interface.

check the MIDI-Ox configuration - have you select the correct ports?

TEST PC2: OK? Please look at the attached files... Is it correct or not?

ensure that the MIDI interface of your computer is working: loopback the MIDI Out of your PC to the MIDI In of your PC and send any SysEx dump by using the "Send/Receive SysEx" function of MIDI-Ox. The number of sent bytes must match with the number of received bytes. If it doesn't match, search for a new driver for your MIDI interface/sound card. If not available, you can possibly fix this problem by lowering the Low Level Output Buffer size (normaly set to 2048) and by increasing the output delay (normaly set to 0 ms) in the MIDI-Ox SysEx configuration menu

The next test/check results will be posted as soon as possible...

This smells like another dodgy midi interface...

I've tried with two MIDI I/O interfaces:

Behringer BCA2000

M-Audio Keystation Pro 88 (I can't use it's MIDI OUT port since it sends a alive message every few seconds)

MIDI-OX (BCA2000) (start of MIOS SysEx t

MIDI-OX (BCA200) (end of MIOS SysEx tran

MIDI-OX_(BCA2000)_(start_of_MIOS_SysEx_t

MIDI-OX_(BCA200)_(end_of_MIOS_SysEx_tran

Link to comment
Share on other sites

Before I start, I have to say: All newbies take note. This is a great example of how to do troubleshooting posts. We were just talking about this post in the chat. Thanks nsunier :)

TEST PC2: OK? Please look at the attached files... Is it correct or not?

Nah that's no good... This does suggest a faulty midi interface on the PC

But... what's the BCA2k got to do with it?

I've tried with two MIDI I/O interfaces:

Behringer BCA2000

M-Audio Keystation Pro 88 (I can't use it's MIDI OUT port since it sends a alive message every few seconds)

Those are controllers.... The midi interface means the thing on your pc :) (OK, these controllers have a midi interface of course, but I mean the PC midi interface... that's a common abbreviation I guess?)

Uhm... how do these devices come into play here? It should be just the core plugged straight into your PC's midi interface...

Link to comment
Share on other sites

(There is a mistake in the mbhp_core_extract_midi_plugs.gif file: 2x M- for MIDI Out !?)

Well spotted... TK would you mind fixing this for us?

TEST CORE9: OK? My cables are 1:1 (pin 1 = pin 1; pin 2 = pin 2; ...). On the mbhp_core_midi_crosslink.gif file: pin 4 = pin 5; pin 5 = pin 4 !?

Uhm... maybe that one, too!

Link to comment
Share on other sites

Those are controllers.... The midi interface means the thing on your pc :) (OK, these controllers have a midi interface of course, but I mean the PC midi interface... that's a common abbreviation I guess?)

Uhm... how do these devices come into play here? It should be just the core plugged straight into your PC's midi interface...

Just to explain: My PC doesn't have any MIDI I/O connectors. Yes, on motherboard, there is the game port (= MIDI I/O) but I don't have the adapter to plug into. So I have an external sound card with one MIDI IN port and 2 MIDI OUT ports: the Behringer BCA2000. On other hand I have a MIDI controller/keyboard which have one MIDI IN port and one MIDI OUT port: the M-Audio Keystation Pro 88. Both of them are connected to the PC by the mean of USB. Both of them could be used as MIDI IN/OUT interface. They are listed in MIDI-OX (see attached file...)

MIDI-OX (MIDI IN and OUT ports)_thumb.jp

MIDI-OX_(MIDI_IN_and_OUT_ports).jpg

Link to comment
Share on other sites

When I do a loopback between M-Audio Keystation Pro 88 IN and OUT ports:

M-Audio Keystation Pro 88 (I can't use it's MIDI OUT port since it sends a alive message every few seconds)

Here is an attached plot of the M-Audio Keystation Pro 88 MIDI IN port. (alive message = Active Sensing)

Now, I do a loopback between BCA2000 OUT and Keystation Pro 88 IN and send a SysEx message (see attached files...). The three screeshots show always the beginning of OUT monitor and the beginning, the first known events and the first SysEx data on IN monitor.

Perhaps the BCA2000 MIDI interface is crappy?!

MIDI-OX (Keystation Pro 88) (Active Sens

MIDI-OX (BCA200 OUT and Keystation Pro 8

MIDI-OX (BCA200 OUT and Keystation Pro 8

MIDI-OX (BCA200 OUT and Keystation Pro 8

MIDI-OX_(Keystation_Pro_88)_(Active_Sens

MIDI-OX_(BCA200_OUT_and_Keystation_Pro_8

MIDI-OX_(BCA200_OUT_and_Keystation_Pro_8

MIDI-OX_(BCA200_OUT_and_Keystation_Pro_8

Link to comment
Share on other sites

TEST OUT2: OK good quality PSU

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)

Sorry to drift, but when did this happen? I can absolutely understand there may be a significant ground potential difference between (say) a core and a PC switching supply.

What I do have trouble with is that this should cause an error on a MIDI line, which could be remedied by lifting the ground at the Tx end.

The MIDI spec is quite clear that MIDI INPUT ports should NOT have their ground pins connected. This was done to reduce the likelyhood of ground loops, which can produce a sound like AC mains hum, and what's worse, can corrupt data. Also this serves to reduce the very real likelyhood of quite high ground potential difference when using switching PSUs, though this was probably not a main concern when the spec was written.

My point is, the PC MIDI in connector in this other case was not built to the spec.

Shock, horror. ::)

Link to comment
Share on other sites

Both of them are connected to the PC by the mean of USB. Both of them could be used as MIDI IN/OUT interface.

Ahhh!! Sorry man, I'm with ya now :)

The MIDI spec is quite clear that MIDI INPUT ports should NOT have their ground pins connected. This was done to reduce the likelyhood of ground loops, which can produce a sound like AC mains hum, and what's worse, can corrupt data.

That's true, in fact I just was reading that page before I read this one.

Link to comment
Share on other sites

(alive message = Active Sensing)

I'm familiar with active sense messages (my k5k sends them too). They should just be ignored (by you and the reciever)

Perhaps the BCA2000 MIDI interface is crappy?!

Actually they both look crappy - what's (supposedly) going out, is totally different to what's coming in..... It's pretty common for midi interfaces to work fine until you try to send sysex :(

Link to comment
Share on other sites

The Problem seems to be solved! :)

I've tried several MIDI configurations with my two MIDI I/O interfaces without any success. I've to admit that they are both crappy interfaces.

My PC motherboard doesn't have any Game Port interface. But I was reminded that I have an old Creative Sound Blaster Live! 5.1 Digital sound card. The problem is that I've already another Creative X-Fi XtremeMusic plugged into my PC. I've tried many times to reinstall drivers from both Live! and X-Fi installations CDs. It has generated many problems. It made me crazy! Finally the Game Port appeared in Control Panel but no extra MIDI I/O ports in MIDI-OX...

At the end I've tried to install with success alternate drivers: kX Project. Now I've one more MIDI IN port and one more MIDI OUT port in MIDI-OX. I plugged my Game Port - MIDI cable, I made a loopback connection and launch a SysEx transfer... Exactly the same content! Wow, what's a great new!

So I connect the CORE module, launch MIOS Studio beta7 and retry: I click on "Wait for upload request before starting upload" and "Smart Mode - Use feedback from core". Then I switch OFF the PSU and click on "Start". After that I switch ON the PSU and... It's fully successful. Yes!

Many thanks for your precious help! ;)

Please tell me how can I modify the title of this topic in order to add: [sOLVED]?

Just an extra question: I've already planned to buy a specific MIDI I/O card. My choice was until now a M-Audio MIDISPORT 2x2. Do you think it's a good choice? (It's the same manufacturer as for my keyboard...:-\) Advise me what model you buy? I want one or two IN/OUT; I want USB interface; I want a small box; I want a not too expensive price; I want a reliable interface (even for SysEx).

Link to comment
Share on other sites

Yay! Fixed!

I can smell bad midi interfaces from the wrong side of the planet. They're stinnnnky!

Just an extra question: I've already planned to buy a specific MIDI I/O card. My choice was until now a M-Audio MIDISPORT 2x2. Do you think it's a good choice?

Yep definitely. A few people here have them and they're known to work well, and are the standard "get this one" advice that gets handed out.

Link to comment
Share on other sites

Just an extra question: I've already planned to buy a specific MIDI I/O card. My choice was until now a M-Audio MIDISPORT 2x2. Do you think it's a good choice? (It's the same manufacturer as for my keyboard...:-\) Advise me what model you buy? I want one or two IN/OUT; I want USB interface; I want a small box; I want a not too expensive price; I want a reliable interface (even for SysEx).

I have a MIDISPORT 4x4. also good.

P.S.

I think there are a few manufacturers out there, or perhaps some OEM suppliers, who are making horrible USB midi devices very cheaply.

I hear a lot of stories about people with these multi-purpose interfaces (ie, an interface which is also a keyboard, or a mix controller).

Perhaps we (I?) need to start a Wiki entry about this... wait! there is one!

http://www.midibox.org/dokuwiki/midi_interface_blacklist

Link to comment
Share on other sites

Do it :)

I think they should contain links to each other, and perhapsa  preamble suggesting that people include information or links to it, regarding their situation. It's not uncommon for the same interface to have varied results on different machines or setups or situations etc...

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...