Jump to content

PIC 18F4685 programming help


Recommended Posts

Hey guys,

Over 10 years ago, I discovered Thorsten's site and had tons of fun making several of his projects. I haven't touched my midibox stuff in a long time, but I have the bug again. I was amazed to find my username and password still work for this forum! I built a 2 SID MidiBox Sid back then. I want to upgrade it to the latest version. I purchased the PIC 18F4685. So, I have two options to program it. Back in the day, I used the EpicWin programmer from MicroEngineering, and I still have it. Luckily, I still have a winXP machine with a printer port that I can use. I tested it on one of my spare 18F452's, and it burns and verifys correctly. The problem I have is that the dropdown for chip type does not have the 18F4685. It does have the 18F4680, and the 18F4585. I tried both of these, and it programmed and verified.

When I go to MIOS Studio 2.4.6 to burn the MIDI Hex, it never detects the core. It tells me to reboot the core, which still doesn't work for me. The strange thing is that I am getting midi information every second, like I remember the old bootloader doing. I get two FF's and an a0 c0 81, every second. 

So what am I doing wrong? Is there a better chip choice to try and use?

I also have a USB PICkit 2 that I never used, but it has the 6 in a row header vs. the 40 pin ZIF that my epic has. I'm not sure how I would hook that up.

Thanks for any advice, and it is great to see MidiBox still kicking!



Link to comment
Share on other sites

In close to the same boat myself:  

Though I don't still have any computers old enough to use my old parallel port programmer.   And I'm just trying to get a new enough version of MIOS on my 18F452's that MIOS studio will recognize them.  

I do have a pickit 3 though and it seems to flash and verify...but I get nothing out of it after :(  Not even the MIDI data like you're seeing (even though I was getting it before trying to re-flash.)

I can help a tiny bit....This page: http://www.ucapps.de/mios_bootstrap_experts.html  Has a diagram from TK on how to wire the pickit to the PIC:  http://www.ucapps.de/mbhp/pickit_dip40_adapter_board.pdf

Hope you have better luck than I've had the past week with my pickit.  If you do get yours working I'd love to hear how - or just send you my pic's to re-flash since you're only a few states away ;)



  • Like 1
Link to comment
Share on other sites


Thanks for the links - I sorta got MIOS v1.9 up and running. I wasn't able to erase it with my PICkit2. I kept getting code protect turned on, even if I erased it and unchecked it, so finally, I went back to the old parallel port and erased it there. After that, I was able to load the bootloader, and then MIOS. Success!!!

or not....

I must have messed up the PIC trying different chip types in the parallel port. It works great until I try to load the MBSid hex. The upload crashes at about 65%. I went back to PICkit and no matter how I erase it, it always has 0000's starting at address 10000, instead of FFFF's, and the code protect check mark keeps coming up. Once MIOS Studio gets to that location, the upload crashes. I can reload MIOS, and get back to the ready prompt, but I get the same result when I try to load the SID hex file. Oh well, I guess I need to purchase a new PIC. At least I know I can burn them now. 

If you want to risk my PICkit2, I'd be happy to burn your PICs for you.

Thanks again,


Link to comment
Share on other sites

yes, the way is correct:

1. burn bootloader,

2. transfer MIOS via MIDI

3. transfer App via MIDI


that PICS are kinda robust!! I don't think they are defected anyhow. but take care about your chip types:


Name         Pins Prog EEPRM TMR Capt PWM UART SSP CAN USB ADC IO-
                  [kB]        -ure CMP /SPI I2C             Pins

18F4585        40   48  1024  4    2   2  1/1  1/1   1   -  11   36

18F4680        40   64  1024  4    2   2  1/1  1/1   1   -  11   36

18F4685        40   96  1024  4    2   2  1/1  1/1   1   -  11   36


as you can see, your selected types haven't enough prog. RAM for your app (in the case of MBSIDV2). the last number of the PIC18F4685 has a special meaning:

5 - 150%  FLASH-Memory and more RAM


But any other PIC18F4520 app would fit in that range. You can use that pics for own programming stuff too... ;) If you need help getting SDCC & last Code::Blocks running for that case, do not hesitate to ask me.


Edited by Rio
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.

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.


  • Create New...