Jump to content

PIC loaded with Bootloader but no answer


vincentime
 Share

Recommended Posts

Hello all,

I am currently building a midibox seq and i encounter a problem with the loading of MIOS in the PIC.The objective is to build a seq v3 but as a training i plan to buid a midi CV first (with the same module).

I am using a JDM programmer with WINPIC800 and load the bootloader in one pic 18f462 (for the seq V3) and two 18f452 (for the midi cv). The verify is OK, the ID of the pics are 0 (that's what Winpic800 say).

I have no problem with the 18f462, when i connect the core module to the PC with a EMU usb/midi adapter, MIOS studio receive the sysex from the core and i can load the MIOS and later an application.

-> my conclusion is that the core is OK and the PC midi interface compatible.

The problem is with the 18f452 (both have the same behaviour) : when plug into the core module, MIOS studio don't reveive a message.

  • I  check the pin 25 (TX) of the 18f452 and there is 5v. I conclude that the pic has started because the usart is open.
  • I  remove the pic and shortcut tx and rx (M1 and M0 of J11, test TEST INOUT1 of the midi troubleshooting guide): every message send by MIOS studio is receive in the midi IN. I conclude that the midi interface (optocoupler and pinout) of the core is OK
  • I try the TEST SW1 with a software loopback : i see the event gooing out from MIOS Studio but don't see any answer from the PIC : I conclude ....... nothing !?!? I can't see where the probleme is located
  • I try to Set pic ID to 0 using the code given in the website : it didn't change anyting.
  • I check the pic pin25 (TX) with a scope, the voltage is 5v and don't move.

And now i don't know what to do.

I think that the core and midi connexion are OK because everything work with 18f462 but i can't manage to make the core work with 18f452.

Using software loopback is not working also. Everything make me think of a problem with the pic itself : Is it starting correctly ? I think so because there is 5v on the pin25 (TX). Is the ID corect ? I think so because winpic800tell me so and trying to force it didn't change anythning.

Any kind of help, idea, sugestion or test is welcome.

Thank you,

Vincent

Link to comment
Share on other sites

hmm, an EMU sounds not like a cheap DELL interface, so I wouldn't bet this is the answer. Besides the fact that it's working with a PIC18F4620 (I guess you mean a -4620 and not a -462, right? And the other one is a PIC18F452 and not a PIC18F4520, because that small zero makes a different chip :) !)

Some basic questions first (you haven't mentioned it):

- Are you aware of the fact that there are different bootloaders for the PIC18F4620 and the PIC18F452?

- What power supply are you using ( V / mA ) ?

Cheers,

Michael

Link to comment
Share on other sites

thank you henrygr but i had already saw this post. I think this is not my pb because i even don't see the sysex from the core when using 18f4520. Furthermore, everythings work fine with the 18f4620.

Audiocommader, i think (and hope) that you find the problem origin.

The pics i use are exactly : 18f4620 and 18f4520

I am aware that it exist differents bootloader for differents pic but i use the bootloader specified for the18f452 whereas it is a 18f4520. I thought it was the same part.

What is the difference between these 2 MCUs ? I search on microchip website and i cannot find a 18f452. I can find 18f4520, 18f452 and 18f4525 but no 18f452.

Do you confirm that a 18f452 and a 18f4520 are different ?

What should i do to confim this is the reason of the problem ? try to compil the bootloader for 18f4520 (i haven't any 18f452 available) ?

One more information, i am using a workbench power supply, 5v 2A max.

I modify the core with no regulator but keep the capacitor, the voltage is 5 volt exactly on the pic pin.

Thank you for your help,

To be followed......

                    Vincent

Link to comment
Share on other sites

Yep, i find this on the wiki (parts faq) :

Can I use the 18F4520 series?

Although it looks good on paper, there is a bug that prevents back-to-back interrupt driven transfers on the serial port. This makes it unusable for MIOS. The 18F4520 has been tested and it is confirmed that it does not work due to this bug. Microchip are aware of this bug but it is not, and may never be resolved.

I think that those 18f4520 won't be useful for this projet. I think i will use 18f4620 as the application are binary compatible, isn't it ?

Thank you very  much audiocommander, you solve my problem (or at least explain it  ;) ).

Vincent

Link to comment
Share on other sites

Hi Vincent,

ahh... back from eating (way too much... burps... ;D )

the PIC18F4520 has some functionalities that makes it a good candidate for USB based projects, but AFAIK it has (like the PIC18F4620) the so known EUSART bug; you might want to search the forum for EUSART to find out more about that. I got not the best knowledge about this, but AFAIK both chips may send some garbage bits from time to time which makes them quite unuseable for MIDI based projects.

The only PIC18F chip that does not have the EUSART bug is the PIC18F452.

I also once made a wrong order ;(

However, there is a workaround: the MBHP IIC Midi Module. It's connected by IIC (or I2C) to the Core and handles all the MIDI stuff... Don't know if it's worth to build an extra module that costs ~5 to 10 EUR to save 8 EUR for the wrong PIC :-\

If you're not using critical Midi stuff, you could just try the PIC18F4520; in terms of hardware it should be fully compatible to the 18F452. If you follow the adaption steps for the PIC18F4620 that can be found on the Wiki (see Application Development section), you will easily find the options in the relevant sources to compile the bootloader and MIOS for the PIC18F4520.

The worst case for the EUSART bug I can think of, is an unwanted or wrong Program Change. I would not mind a scrambled CC and most apps ignore invalid MIDI instructions anyway... so, I guess it might be worth a try ;)

Good to hear this issue is solved so fast :)

Cheers,

Michael

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