Jump to content

Cannot upload apps?


robin303
 Share

Recommended Posts

Hi there everybody, Robin303 is back ;D

I have finally recieved my Reichelt order and finished some modules of the project! I mounted these on a wooden board, for testing purposes:

midiboxboard.jpg

As you can see, only the LCD and the Midi IN/OUT are connected. I have programmed the bootstrap into the PIC18f with my JDM. After this, I turned on the power to the core and within 2 seconds uploaded MIOS 1.2.

So far so good, but now, when I turn on the power, it just keeps resetting every few seconds, telling me this over and over:

MIOS V1.2

© 2003 T. Klose

While sending out this:

midiboxInOutput.jpg

I tried sending the ain64_din128_dout128_v1_1 sysex, but nothing happens. What should I do to get an application in the pic? Connect the other modules first?

My plans were actually to build a MidiBox64 but it is only now that I discover that this will not run on a Pic18f? I need to write my own MidiBox64 mios application?

Link to comment
Share on other sites

A very clean setup! :)

No, the bootstrap loader isn't the problem. I guess that the application fails since the open analog pins are not connected to ground. Did you also try another application, for example the DOUT test, just to check if anything is running ok? Which messages appear during the MIOS upload, do you see any "...0E xx F7" error message?

Regarding the MB64 application: see http://www.midibox.org/cgi-bin/yabb/YaBB.cgi?board=mios;action=display;num=1055947907

Since the SID control surface is nearly finished, it cannot get that long ;-)

Best Regards, Thorsten.

P.S.: are you able to increase the input voltage to the core module? Maybe the backlight consumes too much power that Vdd sinks below 5V and the PIC will be reset!

Link to comment
Share on other sites

First of all I have tried to up the adapter output to 9 volts. Nothing different. It really looks like the Pic is resetting itself all the time.

I don't think it even notices that I am uploading an app via sysex, I don't see any error messages or ok messages...? The resetting cycle even continues while I am uploading a sysex file.

uploadApp1.gif

Can there be a faulty connection? Is there a spot to measure for voltages?

Link to comment
Share on other sites

You wrote that a copyright message appears, thereafter the PIC will be reset. Is this still the case? This would mean that you were able to upload MIOS itself once. It would be interesting for me, if the complete OS has been uploaded, means: I want to see all the "acknowledge" messages which are sent during the upload of the operating system. You will not be able to upload an application if MIOS is not complete, e.g. because of an error during the first upload procedure (this could also explain why the PIC will be reset)

Ok, so just try the MIOS upload again. If this doesn't work anymore, you've possibly problems with the MIDI-In connection (from the Rx pin of the PIC to the MIDI-In of your PC) - in this case I can give you some more infos, how to debug the hardware...

Best Regards, Thorsten.

Link to comment
Share on other sites

Thorsten, I have uploaded MIOS again:

  • Turned on the box. The LCD is filled with
    ################

    ################

  • Immediately pressed SEND in midiOx sysex window (where mios 1.2 syx is loaded)
  • The screen stays filled with the #'s during the upload (where it would normally go on a show the copyright notice), so something is being received.
  • When midiOx finishes, the copyright notice appears for one second. Then the screen goes blank for three seconds. Then the copyright notice appears again for one second etcetera.

Here is a photo of my midi plugs, just for the record:

midiPlugs.jpg

I have emailed you the midiOx Output Monitor data.

Link to comment
Share on other sites

Alright Robin, thanks for the logfile!

So it seems that the bootloader receives anything, but it never returns an acknowledge. Such a behaviour could be related to a MIDI-Ox setup or MIDI driver problem (e.g. the USB-MIDI driver from Microsoft corrupts also the messages if the buffer size is smaller than the SysEx string).

Could you please try following settings (SysEx configuration menu of MIDI-Ox):

Low Level Output Buffer Size: 2048

Low Level Output Buffer Num: 32

Delay after F7: 750 ms (just to ensure, you could also increase this delay, but 750 ms should work ok)

Another usefull test: connect the MIDI-Out of your PC with the MIDI-In (feeback loop). Load a .syx file and start the "Send/Receive" function under "Command Window->Send/Receive SysEx". The number of received bytes should match with the number of transmitted bytes. If this value doesn't match, the driver of your MIDI interface defenitely has a bug (for which the increased buffer size could be a workaround)

Best Regards, Thorsten.

Link to comment
Share on other sites

To make sure my midi is working, I connected my midi keyboard to the same midi plugs.. Both midi IN and OUT seem to be working just fine. However, I find it strange that when I press a key on my midi keyboard, it appears in both the input and output monitor windows of midiOx?

After verifying my midi (It's actually my sound card's game port, dunno what you mean with "the USB-midi driver from microsoft"?) I applied the Low Level Output Buffer settings in the Sysex config of midiOx.

Then I tried uploading MIOS 1.2 again. The same happened, but it seems that the time between the resets is shorter now... ?

Connecting the MIDI-Out with the MIDI-In (feeback loop) results in a "0 bytes received" message.

Thanks for your help so far, I'm sure we'll find a solution. Unfortunately I have to go now so I'll try more this weekend (saturday afternoon).

Cheers,

R

Link to comment
Share on other sites

Hi Robin,

ok, the keyboard test showed that the input port is mapped to the output port. This is some kind of internal feedback which definitely disturbs the upload.

So, go into the Options->MIDI Devices menu, disable the "automatically attach inputs to outputs" switch, open the port map of the MIDI out and remove the MIDI In from this map. This should (hopefully) help :)

Best Regards, Thorsten.

Link to comment
Share on other sites

Thorsten, I have applied the settings, like you said. With my Roland MIDI keyboard attached to my PC's MIDI in and MIDI out ports I can now see the keys I'm pressing on the Roland appear in the Input monitor. Also, I can use the Midi Ox "play notes from the computer keyboard" option to trigger stuff on my Roland. So this means my Midi Setup is OK now I guess.

Then I tied midi in to midi out (feedback loop), loaded a SYX file and pressed send/receive in MidiOx. Bytes received equals bytes sent. Must be OK as wel..!

Then I tried to upload Mios to my Core Module. After the sysex send, the Core keeps resetting itself again with the Copyright T.Klose message.

Oh, and during the sending of the sysex, no data (acknowledge messages) shows up in the input window of midiOx. However, the "start upload" message does appear when I turn on power to the core, so midi out IS working...

???

Link to comment
Share on other sites

Well my friends, it seems like I've finally got things working!  ;D

What was wrong? I don't know. Did two things at the same time. I re-programmed the bootstrap loader and while waiting for the programming in progress, I decided to apply some extra (fresh) solder to some of the pads on the core module. So it was either a bad solder connection or a bad bootstrap loader in my PIC (I am betting on that last one)...

Anyway, after re-inserting the PIC in the core and then while sending the Mios 1.3 sysEx (just released today) I started seeing acknowledge messages at last!!

And then when I saw this, a big smile appeared on my face  :D

ready.jpg

Thanks for the help guys!

Link to comment
Share on other sites

Finally, I must have had a corrupt OS, or bootstrap.

I completely erased the bootstrap, sent all the info, which verified, and I am now on the MIOS.  The MIOS is working, I am getting the verification back as suggested on the bottom of the Introduction page.

I am currently working out some bugs, I have the Mios screen that keeps jumping back from

Mios v1.3 by TK and waiting for a DIN or AIN. It seems to be random received events, so I am unsure if I had correctly hooked up the DIN and DOUT.

The question I had is what to do with pin 9 (OB) if I was only using a single Dout?

Link to comment
Share on other sites

Getting frustrated!!!

The LCD now is toggling between the © and Waiting for a DIN event. I cannot get any buttons to do anything. I am pretty shure things are wired up right, and I am still getting the startup sysex (F0 00 00 7E 40 00 01 F7)

ICprog verified the burning of the chip and I had also read it back in. Mios seemed to load with all "0f", but now I cannot get Mios to send back (F0 00 00 7E 40 00 0F F7).

Another thing that is happening is that I sometimes get random events (which I still get). Voltage at VDD is at 5v, the only other thing I can think is the optocoupler. I tested my 5.6k ohm and it came up to 6k ohm, but besides that I have no idea what could be causing the problems.

I am totally stumped why my buttons wont work, and i cannot get verification back from MIOS.

-Can anyone help ?

-Sephult

Link to comment
Share on other sites

Hey Pilo!

1.)Well I burnt the bootstrap with an OK

2.)I uploaded the MIOS with a response of "0k"

3.)I think I uploaded an application

      a.) It says waiting for DIN, AIN event

4.)Can't get it to respond to buttons

5.)Screen toggles between Copyright screen and 3a

6.)I get some random events sometimes

7.)I can't get MIOS to reply to (F0 00 00 7E 40 00 0F F7)

8.)I am lost

Link to comment
Share on other sites

well TK must be a better helper than me but... I'll try to help you!

So you say you think you upload an application, but which one? (see MIOS->download and try a test program).

If you have just upload mios via sysex, you would see the copyright screen, and then just "Ready"... and then you can upload an application. I don't see what "waiting or DIN, AIN event" comes from... try a test program (upload with sysex) like ain_example1_v1_3 if you have pot, or enc example ect

Link to comment
Share on other sites

Hey Sephult,

 

 A couple of times, I have had strange things happen, when uploading mios or applications. To fix it, I simply re-loaded the mios (have to do the quick reflex, within 2 seconds of receiving the command thingy again) After this it was acting normal. Try uploading a different app, maybe. Also, did you ground the unused analogue input pins to the pic? Like Thorsten's suggestion to robin, check the pic has enough voltage, or just temporarily disconnect the backlight, though this probably isn't it, as mios uploaded ok. Like pilo, this is just my best offering, probably you will need to wait for the man himself to answer you!

good luck, from Steve

BTW, neat setup, robin! (for testing, very good idea! patience is a virtue!)

Link to comment
Share on other sites

Thanks for the advice steven

I have grounded 2-5,7-10.

I am unsure what to do with 15-18, 18 seems to be fine with 10k pull up.

I have reached the point where MIOS says ready, when I load an app however, I cannot get the buttons to trigger any events.

I am in need of just DIN and DOUTs, and I am basically just using a chip of each.

I checked the main.asm file, and I notice that there is a place to set how many shift registers used. I thought there were 128 DIN, and 128 DOUT, but it sounds like TK had said 128 total

Is there any explanation to this, or any other things that might need to be set before the app is loaded?

Thanks for the help, I am stressing with 8 weeks left, and I want to be done with this for a prototype yesterday.

-Sephult

Link to comment
Share on other sites

I had a problem similar to this.  When I loaded up an AIN test program all was fine, but when I loaded DIN programs I could get nothing to happen, but random events.  Let narrow down what is sending the events.  Try loading the AIN example 3 program, if the is any jittering, you have ungrounded analog ins, next try the DIN 128 DOUT 128 AIN 64 program, but only try this after you are sure there is not an AIN input problem,  If you get jittering on MIDI channel 1 then you have a digital in problem.  This problem is most likely cuased by a bad connection to a pullup.  Mine was bad soldering to the 10k pull up on pin 20.  Anyways check all connections and soldering.  Hope this helps.

Jerod

Link to comment
Share on other sites

Thanks for the great Idea-

I have totally bypassed the thought of just loading in the AIN, to check for jitter. I will do so and let you know what happens.

Thanks again for the help-

I really do appreciate it, and I bet Thorsten does too.

I have enough things running around my head, I can just imagine whats going on in Thorsten's mind!

Great work TK!

-Sephult

Link to comment
Share on other sites

Well I think it dosen't matter if you have less shift registers than the total application is capable of. I don't think you need to worry about modifying the .asm to accomodate less than total shift registers. (I think I read that in the code somewhere.)

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