PIC powered AVR programmer

[Texane] wrote in to let us know he has implemented AVR ISP programming using a PIC microcontroller. He wrote some code for an 18F4550 that uses the STK500 standard for In System Programming. This means that his hardware is compatible with AVRdude, the open source AVR programming software. There has long been an argument over the virtues of PIC versus AVR but we say why not both? If you have already honed your programming chops with PIC, you can build your own programmer and give the Atmel family a try.

The current implementation uses a serial port to connect the programmer to a computer. Keep your eye on this one as [texane] plans to add USB connectivity and has told us he will post schematics for the device as soon as that is complete.

Comments

  1. monkeyslayer56 says:

    next programing PICs from and AVR…

  2. Mike Szczys says:

    I’d be interested in seeing an AVR powered PIC programmer. If you’ve got one, send it to our tips line.

  3. Ian says:

    This is cool! Any one know how much room the code takes? Looking at stk500.c it doesn’t seem so bad. This would be a great feature for the Bus Pirate.

  4. Christian St. Cyr says:

    Did this give anyone else the creeps? I literally got a chill down my spine and not in a good way.

  5. CalcProgrammer1 says:

    I am definitely interested in PIC programming via AVR too. I can get an AVR for dirt cheap (and have a few of them already) but I have a Vex Robotics microcontroller that’s based around 2 PIC chips and I have no way of programming it. There is an official programmer but it costs a ridiculous $50 or so for just being a serial port cord with a PIC that puts the controller in “programming mode”. If I can’t figure out the bootloader with an AVR then it has internal direct-programming pins.

  6. rasz says:

    > There has long been an argument over the
    >virtues of PIC versus AVR but we say why not
    >both?

    ARM, cheaper, 32bit, 70MHz, that is why NOT.

  7. Ben says:

    I got into PIC stuff because of the easy free samples and inexpensive programming equipment a while back (in my days of Windows) and have just been too apathetic to play around with AVR stuff. This seems like a brain-dead easy way to get that operation off the ground.

    I’m tempted to try porting this to a USB PIC24F for the sake of using the gcc c30 running natively in linux. I’ve completely fallen off of the 18F at least in part because of the compiler. Call me racist.

  8. Ben Ryves says:

    Interesting. How significant are the speed increases when using an “intelligent” programmer? I’m using a variation on the SI Prog (all you need are five resistors, two zener diodes and a transistor from your parts drawer) and although that works nicely with avrdude it is a bit sluggish, which I assume is from the way it’s having to bit-bang the programming protocol.

  9. Ben says:

    I guess it was done with sdcc. Sweet.

  10. M says:

    The bus pirate now has support for programming Atmels. See http://code.google.com/p/the-bus-pirate/

    It is also based on PIC ;)

  11. Crazor says:

    this needs to be ported to the bus pirate platform!

  12. I’m pretty decent with PIC programming at this point. I’ve heard lots of good things about the AVR I even bought a few chips and a programmer… but I’ve yet to find any good resources with which to learn the programming basics, or with example programs that I can use to build my own programs.

    Anyone know of any good starting points?

  13. I forgot to mention, the current project in front of me is a speedometer signal converter that needs to take a 4000 PPM signal up to 16000PPM (essentially a 4x frequency multiplier)… the ability to adjust the output signal by +/-6%

  14. AVR Micro says:

    Wow, Last time AVR was associated with PIC microcontrollers was when Microchip was looking after Atmel.

    However, this project is a little more peaceful.

  15. chango says:

    @[ben]: Check out the Teensy ( http://www.pjrc.com/teensy/ ) which is ATMEGA32U4 based. It comes with a bootloader, uses the AVRGCC toolchain, and has a great set of easy to understand sample code.

  16. beetollin says:

    This proves PIC is better than AVR.

  17. Kyle says:

    how about programming a PIC from an AVR?

  18. therian says:

    @CalcProgrammer1
    You dont need 50$ programmer, serial port will do with 90% of PICs and if you really want programmer look for PICkit 2 it official programer dirt cheap 30$ and it can program most pics. Also it can real time debug half of them and even have such features as logic analyzer, a real steal from microchip.

    .
    .
    .

    “There has long been an argument over the virtues of PIC versus AVR ”

    this is really old myth, based on wery otdated info, PIC was developed much earlier than AVR so they have low family and yes it suck (most comparison with avr done with this family for historically unknown reasons) but now (since 2000) there is mid range (18F and up good optimized for C) and high range families of pics, the greates thing about them is cost, it basically same, you can buy 16Bit or even 32Bit Pic for price of 8Bit grand daddy 16F84. And situation with good C compiler had change too not only it offer free C compiler but also Microchip had bought HightTech (known well as best industrial standard compiler)

    .
    .
    .

    By the way 16F84 is great chip, yes it way outdated and limited but actually this is good features not limitations, this why Microchip have not discontinue this chip for 17 years. How can limitations be feature? Well because it so simple design it easy to learn internal structure of chip so you will understand how it really work inside, and dont forget you programming micro-controller not a computer, you need to know hardware level for good optimal code and unleashing all power it really offer. No matter haw modern and fat uC is, without understanding it structure you basically use only 30% of it power, and why limiting you self?

  19. octel says:

    @riazap
    the invisible hand of the MCU?

  20. octel says:

    Who programs the AVRs in Galt’s Gulch?

  21. geeklord says:

    The Pololu AVR ISP programmer uses a PIC16Fsomething that uses USB instead of serial. I’ve got one and it works great, plus it has a TTL USB to Serial thing built in, and an (windows only) SLO-scope. I think it’s a good deal for $20.

    http://www.pololu.com/catalog/product/1300

  22. medix says:

    Hold on a second. You mean to tell me you’re using an AVR to program an 18F4550 that can already be programmed over USB using a bootloader (and hence doesn’t NEED a programmer if set up properly)?

    Maybe I’m missing something here.. (not that I don’t like AVRs)

  23. medix says:

    Though, if you don’t already have a programmer (yadda yadda)..

  24. Kyle says:

    @riazap @therian: you two should exchange email addresses

  25. rasz says:

    Can we please have this trolling deleted?

  26. MGA says:

    Interesting, thank you….

  27. therian says:

    @rasz
    “Can we please have this trolling deleted?”
    wow you such a hypocrite, troll yourself whole night and then ask for its removing

    I agree with this idea but it just wow so hypocrite

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 93,968 other followers