Jump to content

Problem loading bootloader to virgin 18F452


jmayes

Recommended Posts

Let me start that if I missed something really dumb here to please excuse me. I have done much searching to find my problem as well before posting so if I missed a past post that would have helped please again excuse me.

Also I am experienced with loading chips (many types of CPU's, Mem, etc) so I post this with great dismay that I could not solve this on my own.

Now the history of what I have done.

I have a PicStart programmer which comes direct from Microchip, it has the latest firmware board update, I am using the latest MPlab software so in my opinion the programming hardware should be be an issue (but I may be wrong)

The first PIC18F452 I bought was preprogrammed from Smashtv and it worked fine, when I decided to continue building up my project I elected to buy virgin chips from the local supply house, they are the exact same part as SmashTv sent, PIC18F452-I/P. My first attempt to program them was to clone the working one I got from Smash which I figured should save me some setup time. It worked fine, I replaced the chip in my install and everything went as planned, it even transfered the Midi-map for MIDO128 (the module I am using). Now I bought some more chips to continue my build up.

The problem I ran into is that my cloned chips will not communicate with MIOS Studio!! Ok, I took shortcuts with the clone job so I went and setup the bootloader (1.9) from the download, pop'd that in the chip and SAME THING!! The only difference is that the Hail the chip gives off on boot once from the original preprogrammed chip is now repeating over and over. I figure that is normal since I have not loaded MIOS yet (Am I correct with that assumption?)

To make a longer story short now, I have tried everything I know to figure out the problem, looked at all the flags, config settings, etc. It acts like the User ID is wrong (It's all zeros for Device 0) However I tried MIOS Studio on ALL Id's thinking if that were wrong it would Communicate on some (unknown) ID.

What makes me even more aggravated is I only saved $2 per chip by not buying from Smash so let my lesson help others that may want to do the Virgin thing that it's not always a slam dunk. I should just to buy more programmed ones but now time is an issue and I really want to get down to the bottom of the!

Please any help or insight would be appreciated.

Jmayes

PS, the repeated Hail (via midi) I get when just fresh programmed with the bootloader is;

f0 00 00 7e 40 70 01 f7, same as the single hail the fully programmed SmashTv chip gives me at boot.

Link to comment
Share on other sites

you have to load MIOS on to the chip after the boot loader, you need to do that before sending it apps. If it is sending the upload request, it appears that it is working correctly. Can you not upload MIOS?

Thank you for your reply, MIOS studio says "No response from MIOS8.....", I have a working chip so I know it's not my install of MIOS studio or midi hardware. It acts like it's not Device-0

Thankx again,

Jmayes

Link to comment
Share on other sites

After reading Altitude's post again, I went back to MIOS Studio and proceded stright to download (to attempt to load MIOS) and still get a "No response from core" error. The chip repeatly sends "f0 00 00 7e 40 70 01 f7" but does not reapond to anything MIOS studio send to it.

Is there another way to load MIOS other then MIOS studio?

Thankx again all,

Jmayes

Link to comment
Share on other sites

Is there another way to load MIOS other then MIOS studio?

yes, with Sysex. there is a perl script that transform .hex to .syx in the svn repository

notice that you need a delay of 750ms between sysex packets (in mios studio too!) as described on ucapps website

you can also try different device ID (0,1,2,3.... etc)

i believe that MIOS Studio can't communicate (the handshake stuff, named "QUERY") with the PIC so long there isn't MIOS intalled into PIC (but really not sure, to verify)

BTW, if you've got a programmer, i advise you to reburn bootloader with p18.exe. you don't need to configure anyhting, just upload the hex, ID will be automatically be 00

Edited by julienvoirin
Link to comment
Share on other sites

Thank you for your reply, MIOS studio says "No response from MIOS8.....", I have a working chip so I know it's not my install of MIOS studio or midi hardware. It acts like it's not Device-0

Thankx again,

Jmayes

Just to double check, you have the midi in and out connected to the core right?

Link to comment
Share on other sites

Ok, I have made some progress and my problems have become even more bizarre! After re-reading the trouble shooting guide I notice that the upload request my chip was generating had a "70" in the ID byte and not zero as I previously thought it did, this translates to 112 dec which I plug'd into the ID of MIOS studio and BAM, got a query. (finally). I have my User ID set to 00000000 so I don't understand why it's on 70h but it is. This is the case with my cloned chips too. Next I uploaded MIOS with no problems and precoded to upload MDIO128 which worked after one (automatic) timeout/retry, I then uploaded my keymap file.

Now for the bizarre stuff; I went back to communicate with the chip and na-da, even on ID112, same upload request at boot with 70h in the ID field but no comm. I repeated everything after blanking out the chip and learned after uploading MIOS that MIOS studio would no longer handshake but it would upload the application file (after one retry) AND upload the keymap for MDIO128 BUT would not download it. The chip works exactly like my clone did at this point. Another bizarre thing is that DI is not working, DO is fine (no key inputs but ok on key outputs), again the same behavior for a newly built chip and the clone.

Ok, I went on and figured out that the upload request comes form the initial bootloader (active only 2 seconds from boot], If I quickly ask for a query from MIOS studio during that time frame (on ID112) I get handshake on both my newly built chip and the clone.

Questions....

First and foremost, can someone enlighten me as to why the ID might be on 70h and not zero? It is clearly set to zeros in the programmer menu's.

BTW, if you've got a programmer, i advise you to reburn bootloader with p18.exe. you don't need to configure anyhting, just upload the hex, ID will be automatically be 00

Is the P18 software designed to work with the PicStart plus programmer from Microchip? If so where do I find the download?

I can only assume now that my setup is not programming the pic correctly, tis a shame since it's true Microchip hardware and pretty much the latest and greatest. MPLAB v8.46 PICstart Plus is at V04.50.11 I can not find any newer updates at this time.

Again, any help or insight someone can provide will be very appreciated.

Jmayes

Link to comment
Share on other sites

Is the P18 software designed to work with the PicStart plus programmer from Microchip? If so where do I find the download?

all ya needs here : http://www.ucapps.de/mbhp_burner.html

so burn bootloader, then uplaod mios

there is an app to change the ID in the MIOS8 svn repository (or download section of the website)

i advise you to work with ID00 all the time, except for multiple core app like SID. LCD type can be set up in the app, no need to change ID

are you sure than your .hex are not corrupted ? before bootloader was 1.1 and now its 1.2. they are not compatible. use the last bootloader, downoaded from ucapps website (and not from a clone from smash tv PIC)

Edited by julienvoirin
Link to comment
Share on other sites

there is an app to change the ID in the MIOS8 svn repository (or download section of the website)

i advise you to work with ID00 all the time, except for multiple core app like SID. LCD type can be set up in the app, no need to change ID

Bingo!!! changed the ID to zero and everything loads fine and the chip is now perfect!! What a great app to change the ID without a programmer :) I still can not explain why my professional programmer would not properly program the UID but this work around takes care of business :) :) One last note, for some reason many of the code protect bits were flagged on when I used the bootloader hex from the site (1.2g), I had to turn them off before it would allow the app to change the ID.

Thankx again for all the help, hopefully this will help the next poor suc#er that trys to use the Microchip PicStart programmer.

Jmayes

Link to comment
Share on other sites

I recently built a MidiboxCV using a self made PIC core, I had no issues with programming a blank PIC with my Microchip ICD2. As Julien says use the last bootloader, downoaded from ucapps website.

Just to be clear, I was using the 1.2g bootloader right off the site, it did exactly the same as the clone bootloader I got off the smash chip, what turns out was happening was the UID is not writing correctly using the PicStart programmer.

Thankx again all,

Jmayes

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...
×
×
  • Create New...