Broccoli18 and Bootloader - SUCCESS!!!

Hi everyone!

After endless tries to get JDM+IC-Prog working i tried broccoli18 hardware and software 0.7 (XP port) and got immediate success. :smiley:

Instructions on broccoli18 site are neary dumb save, it’s an LVP mode programmer on LPT port i powered with 2 AA batteries. Used parts: PIC socket, wire, 0,1uF elko (50V), 330 Ohm resistor. It was up running and programming an 18F452 and an 18LF452 within one hour, soldering on an breadboard inclusive.

I sucessfully burned both demo hex files, so PICs and programmer are both well and running. ;D

***PS:READ THE FOLLOWING POSTS FOR THE SOLUTION!***

Now the question:

when trying to burn the bootloader with broccoli18 i got the following output:

Detecting PIC… Found PIC18F452.

Using hex file boot.hex.

Reading hex file…

Erasing memory from 0 to 32504…

Programming memory from 0 to 32504…

Erasing ID locations…

Programming ID locations 0 to 8…

Programming configuration bytes 0-13…

pic_verify_cfg: Cfg byte 6 doesn’t match

Error in pic_setcfg: No such file or directory (ENOENT)

I loaded the bootloader 1.1b of MIOS into IC-Prog and saved in IHX8 format.

Burned this with the same result.

Is the bootloader hex file corrupt? Did i forget something to do?

Why does this program complain about Cfg byte 6? Is there anything very special about this bootloader that is “non standard”? ???

Any hint appreciated.

I can’t try the PICs in a core, it’s not built yet because i wanted to have a programmer before building any further (next projects will be a MBSid and MBSEQ_V2). :-[

I’m pretty sure the programmer works correctly since there’s no fault in an even bigger demo hex.

Thorsten, maybe you can you bring a little light into my thoughts about this Cfg byte thingie?

Martin

PS:READ THE FOLLOWING POSTS FOR THE SOLUTION!

Hi,

I’,m not sure if a LVP programmer is really helpful, since it will disable pin RB5 for common use. This means that you won’t be able to drive a LCD.

I’m also not sure about the error messages. The .hex file is definitely not corrupt, it is generated from the official assembler from Microchip, and it works with the PICstart programmer (the official PIC burner from Microchip…) as well as with IC-Prog. So I guess that the Briccoli software has an imperfection, maybe it’s better to ask the name of this program for help.

Best Regards, Thorsten.

Thanks for the prompt reply, Thorsten!

I will immediately change the mode of my broccoli to high voltage programming, it just needs VPP/MCLR to stay unconnected from the parallel port and use a 9V battery between ground and VPP, will be no problem…

Mmmmh i definetely don’t know much about PICs, thanks for this advice! I definetely want to use an LCD!

I mailed Dave Sullins for the programs output already, awaiting an answer. Since then i will try to peek into the source since i’m a fairly well computer programmer  :)

I will post any forthcomings here…

and begin to build the first core module for testing the PICs.

(I have 6 PICs waiting to be powered by MIOS…)

Many thanks

Martin

HOW TO:

  • Disconnect PIC Pin1 from the parallel port.

  • 9 V battery: + to Pin1 (MCLR/VPP), - to ground

  • “erasepic” (to be sure: twice! My programmer didn’t get it the first time)

  • burn bootloader

-smile 8)

WHY:

Thorsten brought me to the conclusion that it is silly to use LVP here and he was completely right. For the PIC 18(L)F452 i needed 9V on MCLR/VPP to ERASE the chip. since the “erasepic.exe” doesn’t show any messages i thought the pic was erased as i used broccoli in LVP but i was WRONG. :stuck_out_tongue:  Cfg byte 6 contains WRITE PROTECTION information, so in LVP i was not able to burn the configuration bytes because they were WRITE PROTECTED as i got them from Microchip!!! :o So they had to fail in the verification!

This is the result of the configuration change:

write protected fresh chip from microchip:

Configuration bits 00 26 0f 0f 00 01 85 00 0f c0 0f e0 0f 40

erased and new configurated chip:

Configuration bits 00 26 0f 0f 00 01 81 00 0f c0 0f e0 0f 40

Now i get pretty verified bootloader PICs!!! 8)

Thank you so much for your hint, Thorsten!

My programmer was pretty right, just programming in the false mode!

I hope that a lot of people who can’t get JDM going give this programmer a try! This one is surely the cheapest and easyest solution to burn a few 18(L)F452.

NEEDS:

  • 0,1uF Cap

  • 330 Ohm resistor

  • 2 AA or other 1,5V batteries

  • 1 9V E-Block

  • 1 old printer cable (you got that…)

  • broccoli18-0.7.zip (XP port) (google for dave sullivan, broccoli18)

  • wire, breadboard, a little bit of time and a multimeter, read the instrucions on Dave Sullivan’s site

After building and measuring (very easy!):

  • readcfg.exe (a few times, your PIC should be reliably identified)

  • erasepic.exe (2 times to be sure, kill all those nasty write protection)

  • writepic.exe bootloadername.hex

That’s all!

Best regards

Martin

Thanks - a real junk box programmer :wink:

ONE power bypass cap and one resistor.. I don’t think it even needs a breadboard.

Bye, Moebius

This sounds very good!

I will announce this in the news section. Once more than 10 people were able to burn their PIC successfully with this programmer, I will discontinue the MBHP_JDM and strongly recomment this much simpler one!

Best Regards, Thorsten.

moebius, you are absolutely right!

In fact i built it out of garbage because i was so frustrated about my misbuilt JDM… …i soldered the cable direcly to the elko corpus because i broke it off a pcb in anger about jdm, the resistor was knipex-ed from an old pcb… The breadboard doesnt even has solder points but i wanted to fix the batteries and the heavy cable ending of the destroyed printer cable with gaffa…ending up using “Tesa Film” :stuck_out_tongue:

To anyone building this baby…consider using a 9V wall wart (check voltage, often they are overdozed), after burning around a dozen chips my 9V E-Block was down to 6V…burning failed at chip 13 :o

Programming time is long (maybe 3-4 minutes) but we do it just one time per pic so what…

Another point is: be aware of your port voltage (mine was approx. 4.5 V) and *calculate* your resistor, OK? ::slight_smile:

Use the portdiag utility to make sure everythings right, if you have probs under XP use “UserPort” utility, not the mentioned packet from Dave Sullivans site, it is much more comfortable and absolutely reliable. In fact i had it running because i gave JDM a last chance with it and forgot to close it as i assembled my garbage can…so broccoli ran instantly after configuring the printer port. all people using linux will be happy to get a native tool ;D

By the way, i was pretty astonished it worked because the cable is way more than a meter long, i directly soldered the ends to the socket…

Martin

Cool!

Hopefully we have finally found a good/cheap replacement for the JDM.

I’m also taking suggestions about the most creative use of a JDM board (besides it’s intended use).

:wink:

Have fun!

Smash

I’m also taking suggestions about the most creative use of a JDM board (besides it’s intended use).

damm, these pcb´s look great.

Even i just made my diploma as artist i have no creative idea what to do with these. I have some misroutet pcb´s which i etched, but they are just lying in a dirty box, and thats quite boring.

All the best luck to your jdm boards, may they rest in peace.

chriss

If these were just a bit wider I could replace all of my AOL CD drink coasters.

:wink:

Smash

Write your Email address on them and use them as buisness cards??? there’s a nice big space in the middleof the 40 pin outline…

Write your Email address on them and use them as buisness cards??? there’s a nice big space in the middle of the 40 pin outline…

Hehe I thought about that!  Looks like its time to make a screen of my business card… : )

Best

SmashTV

Hi Martin!

i tried the broccoli programmer with my 18LF452 pic, all is well and double-checked the finished circuit, when i tried to readcfg, broccoli returned “Unknown device” and all are zero’s.

my question is: Do broccoli18 really supports 18LF452 or just 18F452?

i’ve read your post that you successfully burned an 18LF452 pic, how did you did it?

i made my circuit without modification on LVP mode, i just want to read the device if it will detect my 18LF452.

maybe i’ll to cut the Vpp/MCLR to LPT and connect to the +9V battery.

i’ll just post here the result.

thanks in advance dear moderator and martin!  :)

Sorry for answering this late…

Check out your Voltages!!!

I strongly recommend using the 9V battery, not the unmodified version. I tried an F version first and immediately modified for the non-LVP version (without trying an LF). And yes, then there is no difference in burning F and LF version of the pic, the LF version will be recognised as 18F452. Be sure to make several tries in a line to “pump that elko up”. I have a very fast machine with a stable and TTL compatible parallel port, maybe you have to recompile the source using another delay time, hmmm… make sure to get the right resistor for “your” port voltage! Don’t leave out a step in testing before actually putting the pic in. Have you tried an 18F452 as well?? Very surprised, since you said “double checked”- have you verified the pin voltages in the socket??? everything fine? There is not many chance to make make something wrong with this one…(i managed to get a broken solder point at the batteries :P)

Hope you get it soon…

Hi all,

Im very interested in this new PIC programmer, gave up with my JDM and whole project has been on hold ever since! I have the first few idiotic questions, hope they dont drive you too crazy :wink:

The message says to not forget to calculate the resistor value, I have checked the voltage put out by my paralell port by using a multimeter and running the broccoli portdiag software. How do I calculate my resistor value?

Just to check because I am not 100 percent sure what Martin means by an “elko” capacitor. The only 0.1uF cap I have is a ceramic disk type, my guess is this should be suitable as the schematic doesnt seem to indicate a polarity for the cap. Is my basic electronics logic correct??

Anyway I look forward to the help and who knows, before 2010 I may have a PIC with the bootloader burnt ;))

Kindest Regards

Dave mK

OK,

i used a rad cap, polarity is + to vdd, - to ground (self explaining). Don’t know if ceramic might be a prob, dunno really, cause didn’t test it  ;).

Resistor (in Ohm) should be measured Voltage (in V) divided by 0,015 (Ampere). Since resistor value must not be that precise 5-10 % difference shouldn’t matter at all.

I felt the same as i began with my project…

“Some day i will have a bootstrap on this chip… maybe tomorrow, maybe next week,… maybe next year…”

Don’t give up your hope!

Voltage of the port should be somewhere between 3.3 and 5 V.

I hope this helps.

Let us know if you got it working and don’t be afraid to ask again if not!

Don’t give up.

Martin

hi

i just finished my JMD and tried to burn the bootloader with little success.

i want to try Broccoli18 BUT:

  1. i dont have a good multimeter, i just have a DIY voltmeter (not precise).

2)i dont think i have enough info on this new programer but i belive in its abilities.

3)i do not have access to a local ecectronics store (only by internet), additional costs apply for a small order, but i do have a parallel secket at home.

4)i do not have a regulated PSU.

i do still have my JMD but when i connected external PSU to it ,(because i had 4.5v on MCLR#) it cooked the zener diode.

please help ! Anyone !!

i hope i can finish it by september.

thanks in advance.

Yarek T.

Hi martin,

thanks for the speedy response and encouraging words!

The reason Im double checking about the capacitor is because I have three local suppliers and they all told me that they dont stock electrolytic caps at such low farad values.  The smallest cap I can get without resorting to mail order is a 0.5uF electrolytic.

I think I will try this as a matter of interest and hopefully I wont fry my PC :slight_smile:

If not I will have to order one from the net… more info to follow!!

Dave M

Well,

It’s a  “power supply bypass” cap.. so you can try a 'bout  any value. IT won’t fry you PC.. (parallel port is buffered, anyway)

Bye, Moebius

p.s. Do you have some “electronic junk” -  take it apart and you will find right cap. :wink:

Yes, electronic junk is the best u can try to get masses of caps in good quality and unusal values.

I got the one for broccoli “directly from the street” from a hill of junk! If you have no 9V PSU give the batteries a try before you give up, one 9V battery for 10 to 15 pics is not THAT bad if you mainly wanna check out if your burner works.