Jump to content

MIOS load problem (well, now deeper)


Guest telemonster
 Share

Recommended Posts

Guest telemonster

Okay, build my own Midibox core module, and part of a DOUT module.

At first I was getting the issues that others were describing, where I would just get sysex messages over and over.

After some uploads, and some failures...

Now the minute I boot the thing up I get this:

0054AD2E   1  --     E8    41    7F    9  ---  Pitch Bend            

0054AD2F   1  --     FF    --    --   --  ---  System Reset          

0054AD2F   1  --     E0    78    20    1  ---  Pitch Bend            

0054B492   1  --     E8    41    7F    9  ---  Pitch Bend            

0054B493   1  --     FF    --    --   --  ---  System Reset          

0054B493   1  --     E0    78    00    1  ---  Pitch Bend            

0054BBF6   1  --     E8    41    7F    9  ---  Pitch Bend            

0054BBF7   1  --     FF    --    --   --  ---  System Reset          

0054BBF7   1  --     E0    78    20    1  ---  Pitch Bend          

Basically, two pitch bends followed by a System Reset. I tried shorting A5 to ground (the ground pin to all other pins, except the +5vdc pin). Also, resistor R9 is indeed in place.

Originally it didn't do this, but she wasn't working either (maybe my midi in polarity or some such thing). I'm using a SBLive card with a midi cable that probably has  an Opto. I've never had issues with output from the midibox board to the computer.... now I realize my issue was probably from computer to midibox board.

Is my load corrupt? Is there a way to tell the bootstrap code to SysEx request for 2 seconds?

I *do not* see the sysex request at all, from the second I turn it on.

I uploaded the sysex files out of sequence once or twice by accident :-(

Any help would be appreciated. When I first started trying to upload it resembled issues described in another thread.

Is there a way to flag the boot loader so it erases the other code?

Link to comment
Share on other sites

Hi,

to your last question:

Is there a way to flag the boot loader so it erases the other code?

no, because this isn't necessary. The boot loader is the only program which is active during the first 2 seconds after reset. It allows you to overwrite the whole flash memory via MIDI (without the location where the boot loader is located of course), therefore an erase function is not required. A proper MIDI connection is required anyhow when you want to use your application.

If a program is running wild due to MIDI upload problems, then you must find a way to upload MIOS during the 2-second-boot-phase. This will bring the chip in a proper state again, all references to the old flash content (e.g. a corrupt application) will be cancled by this way.

The strange thing is, that you don't see the upload request anymore. This is either related to a power problem (weak power supply unit, 5V not available after reset, therefore the MIDI message won't be received by your PC), or it is related to the (very low) possibility that during your experiments corrupted code has been executed unintentionally which destroyed parts of the boot loader, so that it doesn't run anymore.

How to proceed: it depends on your equipment.

Do you own a PIC burner? Then just write the boot loader into the flash again - if you still don't see an upload request, then check the power supply and/or follow the MIDI troubleshooting guide again.

If you don't own a PIC burner, then first check the PSU. Secondly try to upload MIOS without waiting for the upload request, maybe it works - if nothing helps, send the PIC to somebody of the community who can burn the BSL into the chip again and who can possibly also upload MIOS and a test application, so that you've an easier starting point.

Best Regards, Thorsten.

Link to comment
Share on other sites

Guest telemonster

Maybe for some reason the PC is interperting the data wrong. I dunno, the SECOND power hits the board pitch bend / system reset errors start shooting out of the board.

I am using a 12vdc line from a PC power supply.... the voltage regulator is barely warm.

I have a PIC programmer, but not one big enough for that chip. I guess I can look into constructing one. I believe there is a circuit for JTAG programming or whatever it is called?

Link to comment
Share on other sites

Do you receive always the same events? Or are they more like random events? Then I would assume that no program is running anymore due to a hardware problem (bad soldering, crystal not connected properly, or whatever... follow the troubleshooting guide once more) and that the events are received since the MIDI Out pin is floating... from this point it really makes sense to do all the tests you did before. Or your BSL is corrupted... there are a lot of possible reasons, which can only be clarified by doing all the suggested tests.

No, the PIC has no JTAG interface, but in the Wiki you will find a lot of documentation about this topic http://wiki.midibox.org

Also here:

http://www.midibox.org/cgi-bin/yabb/YaBB.cgi?board=news;action=display;num=1088620086

Best Regards, Thorsten.

Link to comment
Share on other sites

Guest telemonster

Okay, I did find a bridged solder connection....

When the unit first boots up, I should see 2 seconds of a different SysEx messages (kind of like a RARP / BootP type thing in the network world). Then it should switch to the PitchBend / SystemReset messages?

The good news is this... I was looking around in the kitchen, and I discovered a parallel port PIC programmer. A friend made a few of them along with a few parallel port to DMX converters and sent me one of each..... The thing I need to research now is if I can wire the 18F series to the 16F series programmer? It seems like it might just be pin count / extra I/O on the 18F ?

Will research.

Link to comment
Share on other sites

Okay, I did find a bridged solder connection....

thats what I've expected...

When the unit first boots up, I should see 2 seconds of a different SysEx messages (kind of like a RARP / BootP type thing in the network world). Then it should switch to the PitchBend / SystemReset messages?

no, it should always send the same sysex message.

no, Pitch Bend/Reset events are normaly not send. But if you've already uploaded an application, something like this could happen - but it depends on the program...

Btw.: the startup behaviour is will documented under http://www.ucapps.de/mios_bootstrap.html

The good news is this... I was looking around in the kitchen, and I discovered a parallel port PIC programmer. A friend made a few of them along with a few parallel port to DMX converters and sent me one of each..... The thing I need to research now is if I can wire the 18F series to the 16F series programmer? It seems like it might just be pin count / extra I/O on the 18F ?

Is the programmer still required?

(PIC18F: the pinning is different, but this can be adapted, compare the original JDM with my 40-pin version http://www.ucapps.de/mbhp_jdm.html. But the programming algorithm is also different, which means: you need a software which supports PIC18F452 as well as your programmer)

Best Regards, Thorsten.

Link to comment
Share on other sites

Guest telemonster

Ah cool. I used that page to guide me thru uploading the MIOS, then the MidiIO128 or whatever it is called. That shouldn't send pitch changes, just noteon/noteoffs I think so what I'm seeing is definitly out of bounds.

I will attempt to find 18F programming software for the parallel port programmer I have, and look at making the connections and reloading the bootstrap.

I tried Serge's utility AFTER I was getting the odd output and it immediately crashes when it sees the pitch bend messages.

The pitch bend/system reset messages are the only things I see from the PIC now, starting the exact instant power is applied. I saw nothing different when I hooked up the DOUT module. I do not have a DIN module, but the resistor R9 is on board.

I was wondering if the bootstrap code is supposed to "hang out" for two seconds, THEN start executing the software? Or is it somehow time sliced in that the application runs from the moment of power on as well, just the application code is protected from overwrite after 2 seconds?

I'm using it to toggle solenoids in a laser projector....

Then I might pick up a 2nd one for another project. Very cool indeed, should be a bit better once I get the kinks worked out :-) Thanks for all of your help.

Link to comment
Share on other sites

I was wondering if the bootstrap code is supposed to "hang out" for two seconds, THEN start executing the software? Or is it somehow time sliced in that the application runs from the moment of power on as well, just the application code is protected from overwrite after 2 seconds?

it's absolutely isolated from MIOS as well as from the application, and especially doesn't execute any other code which could be changed during the upload --- this would be fatal!

Best Regards, Thorsten.

Link to comment
Share on other sites

I'm using it to toggle solenoids in a laser projector....
Really sorry to be off topic here, but I'm interested in your application.  Details like your light source, scanning equipment, etc. would be cool.  :)  

I started using modified RC servos for all static scenes instead of solenoids and never looked back.  Alignment is way easier from the front of house controller instead of standing over the platform listening to spotters on the radio.  ;)

Best!

Smash

Link to comment
Share on other sites

Guest telemonster

HOOORAY! She is working (as far as the board is concerned, my project is another story (that I will get to).

I stumbled onto Broccoli18, and looked into getting that working. It wasn't going well. I was trying to write the prom on one of my Linux development systems, a Mini ITX EDEN thing. Modern LPT ports are crazy, if you mess with the ground pins it can throw it into a different mode I believe (all that Standard/EPP/EPS whatever). So I pinned out the differences between a 16F and a 18F, and made a cable to hook the chip to that programmer I was speaking of (used the in chip programming header on the core board)! And then, along with the Odessy program I was able to rewrite the bootloader.

So then I was back to square one, with the original problem of not being able to update the code. So monkeying around a bit, I just happened to notice that I soldered the wire to the wrong pin on the 5 pin DIN connector I was using for MIDI IN. I recycled the connector from a palm pilot MIDI cable (Beatpad?) and... well things work much better when your using the right pin :-) My goodness, what a lame mistake... that resulted in so much time lost.

-------------------

Laser stuff

I don't have any real good equipment in terms of scanning. I own a 150mw Argon laser (multiline, 60x from MWK industries). I also own a Spectra Physics 3 phase system that I think does 3+ watts, it is a 2011/2454. I have a smaller 15mw Uniphase argon, a 20mw Siemens HeNe, and some other toys. I have Accel 124x galvo amps, General Scanning open loop galvos, and the Laser Illusions package for graphics (which doesn't graph anything as the speed of the scanners is so slow).

My intentions are to run the midibox into 8 or 12 solenoids, that change the beam path. One of the paths will be into the galvos. This way I can use seq24 under linux and sequence out steps. I own a MiniSSC servo controller, and thought about doing a MIDI to Servo interface but don't really have time and would have to learn PIC programming (PWM seems like a hard thing to jump into).

There is alot more info on that stuff on my homepage (the laser stuff) at users.757.org/~ethan ...

Now for my next oddity. I bought some DS2003 chips that seemed to be the same as the ULN2803 ICs documented in the Midio128 stuff. I constructed a board around one and it doesn't work. I did some testing, and the MidiBox/DOUT is doing it's job perfectly. For whatever reason, the DS2003 chip isn't doing what I expect.

On one side, I have logic ground and 5vdc going in to test it. On the output side, I have the ground and ground to solenoid attached, then have solenoid's + lead tied to 24vdc power supply. The solenoid immediately fires, and never stops.

I see a slight change in resistance when I trigger the 5vdc input. The white paper on the DS2003 says it it TTL compatible, and talks of using it in this application.  The only thing I can think of is that I'm using them in the wrong way? I tried reversing the polarity but that didn't fix it since it is supposed to be a sinking driver.

Small steps I guess.

The funny thing is my next two MidiBox projects... one will be using it to drive under vehicle light setup (the led based NEON kits... I'm redoing the electronics to gain multicolor access, and the sequences will be played from in car PC :-). The other project will be for the Christmas lights on the front of the house (www.757.org for the two times we did it before).

MUCH THANKS FOR ALL OF YOUR HELP! I will definitly give props on any project I complete. Just looking at all the projects makes me wish I had more time / money...

The SID thing is definitly cool! What was the Atari audio chip used in the 8 bits? Need a module for that, you know, so no one gets left out :-)

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