Really disheartned and lost

Discussion in 'Programmer's Corner' started by Chalma, May 19, 2013.

  1. Chalma

    Thread Starter Member

    May 19, 2013
    54
    2
    When I first got interested in micros I originally wanted to goto school to be a programmer, but I had to take an elective and grumbling I took soldering. To my surprise my instructor introduced me to microcontrollers. It's been more than 15 years now and for my job I wanted to get back into them. I am so dissapointed though. I dusted off all my old eval boards, pics, and components yet I go to start diving in and EVERYTHING has changed. They used to give you IDE's for free all packages for compiling and sending to your micro. Now I see they want lots of money to do even something simple like compiling. Back in the day I started with parallax, I delved into atmels avr's and the last unit I recall using was the 16f684. I'd like to continue with the 16f684 but I can't even do it because my serial port complete book is obsolete. I have a pickit 1 board which if I goto microchip they want some absurd amount to get their program. Anyone have a site that I can restart from again? I'd like to use the 16f684 (just because I have a few laying around and I did like using it before) I'd like a free C-compiler to program the part in, and a way to send my program to the part. I just can't believe how popular these things have exploded but yet now they want you to pay for everything, they used to hand their programs like candy back then....
     
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,669
    804
    If you want free tools, go with atmel parts. For some reason PIC c compilers are not free.
     
  3. Litch

    Member

    Jan 25, 2013
    86
    7
    Dunno where you've been looking?

    MPLAB / HITECH C compiler is free to download - it's the optimised code versions that cost money - no need for them when you're just playing around.

    The MPLAB IDE is also avail. for download...

    Google is your friend.
     
  4. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    I haven't programmed in C in some time, but someone on the forum mentioned Boost C. It is a C compiler for PICs starting at $5. Not free, but it is the least expensive version of C for PICs I know - other than the demo versions.

    If you really want to get into programming and intend to use it for work, then C is the way to go. If you're just tinkering, I started with Parallax Basic Stamps myself and recently got into PICAXE - free BASIC software. The ICs are much less expensive than Basic Stamps. Of course, this is still interpreted BASIC, not compiled, so timing applications are not great. Just another option to consider depending on your goals.
     
  5. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    The freebie Boost C is limited to code size.

    Microchip compilers are not limited in any sense. The only drawback to the free version is they skip a cleanup step so you get a larger program then necessary, 20% or so. But with memory so cheap do you really care?

    I have a PICkit somewhere, I would not think of using it anymore, but it is a start. You can add some jumpers and do in circuit programming on any device it supports. That's what I did till the PICkit 2 came out.

    PICkit 2 and 3 are very much worth it as they add debugging capabilities in the PIC you are running!

    Everything you need on your PC is free for the taking from the Microchip website.
     
    elec_mech likes this.
  6. nigelwright7557

    Senior Member

    May 10, 2008
    487
    71
    You can get free lite versions of the PIC c compilers.

    The assembly compilers are free.
     
  7. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,669
    804
    Yes you can get free lite version of pic c compiler, but the gcc for avr is un-crippled and is ansi-c compatible.
     
  8. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    Wow, ANSI compatible?

    Well, the Microchip C compilers are ANSI compliant. So there. :p
     
  9. DerStrom8

    Well-Known Member

    Feb 20, 2011
    2,428
    1,328
    I agree with what others have said. The PIC is a great starting point, as is the modern AVR. I have only used PIC, so that is all I can really talk about. You can get a chip for very low cost, ~$2 USD. The only expensive part would be the programmer, and even that is only $35 - $45 USD. It has a built-in debugger as well, and comes with some excellent software for loading hex code onto the chip. If you want to program in C, though, I recommend MPLab. It is absolutely free, as is the hi-tech C compiler. If you buy higher-end 18f chips, you can download the lite version of C18 for free. I have never had a need to buy the full version.

    So this is all you need:

    Software--

    MPLab (free)
    Hi-Tech C Compiler (free for the Lite version) <--For PIC16F chips
    Hi-Tech C Compiler (free for the Lite version) <--For PIC18F chips
    C18 (free for the Lite version) <--For PIC18F chips

    Hardware--

    PICkit2 (support is ending, so you might be better off with a PICkit3, but will work better with older chips)
    PICkit3 (newer, but less support for older devices)
    PIC MCUs (wide variety)

    Choose EITHER Hi-Tech C for 16Fs OR for 18Fs OR C18. You do not need Hi-Tech C for 18Fs AND C18. Also, you will want to buy EITHER the PICkit2 OR the PICkit3. You probably won't need both, but if you can afford it, it couldn't hurt. Have more support while being limited to newer chips with the PK3, or have less support and be able to use older chips with the PK2. The choice is yours.

    Hope this helps. Good luck!

    Matt
     
    strantor likes this.
  10. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    I don't know why someone came up with a $5 price for BoostC. It's free with a limitation on memory and code size and for non-commercial use, but someone in a hobby/learning mode would have to be pretty advanced to hit the limits.

    You can get MPLab free from Microchip, and if you're willing to buy a "Yellow peril" (as someone here calls it) programmer, that's the only cost you'll incur except the very small cost of the actual processor. You should spend less than $20: try eBay.

    Some people are skeptical about this but I have one and it works fine:
    http://www.piccircuit.com/shop/pic-programmer/55-icp02-usb-pic-programmer.html
     
  11. DerStrom8

    Well-Known Member

    Feb 20, 2011
    2,428
    1,328
    The Yellow Peril works, but to my knowledge it does not have a built-in debugger. You'd be better off just spending 10 bucks more and buying the real thing. Better support, too.
     
  12. Brian Griffin

    Member

    May 17, 2013
    40
    12
    The PICKit 2 (and the clones) are pretty good. Except when you have to program higher end PICs, the PICKit 3s are the best one. However, the programmer software for PICKit 3 is pretty limited.
     
  13. DerStrom8

    Well-Known Member

    Feb 20, 2011
    2,428
    1,328
    Exactly right, hence the comments in my post about chip support :p
     
  14. Brian Griffin

    Member

    May 17, 2013
    40
    12
    I would admit the BoostC is a pretty good deal, even for the Professional version ($149.95). It has the RTOS thrown in as well.

    The Full licence is also pretty good ($69.95) but it's limited to private use. Still, very good for hard-core experimenters as well.
     
  15. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    I've never really found a need to use a debugger, but someone here challenged me about whether the Yellow Peril has it, and I found that it does--not all PIC chips support it, but you can't blame the YP for that. As best I could discover, though, the YP only allows 1 breakpoint. But I'm not fully confident that I found out everything there was to discover.

    My substitute for using a debugger is making a processor set and clear bits on output pins, and watching those with an oscilloscope. Not everyone has that available, and maybe the lack of a scope would make a debugger more attractive.
     
  16. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    MikroC PRO is a great C compiler for PICs, and the free "demo" version allows use of projects up to 2K of ROM, so it should work fine for your 16F684 and most of the smaller PICs, and even for smaller projects on the larger PICs.
     
  17. ke5nnt

    Active Member

    Mar 1, 2009
    384
    15
    I will chime in with my experience that microchip's IDE and compilers are great. They have fairly recently updated (after acquiring HTC) the IDE and compiler to the New-ish MPlabX IDE and XC8 c compiler. Again, it is crippled only in that it doesn't run full omniscient code generation (for C anyways, ASM is uncrippled). There is tons of reference material available to help learn, MPLabX itself is quite amazing. Also, never had a problem with the PICkit 2.
     
    DerStrom8 and Brian Griffin like this.
  18. Brian Griffin

    Member

    May 17, 2013
    40
    12
    Agreed. I like the Microchip Libraries also, like the SD card ones. Very complete and I used them with the PIC32s for my Christmas decorations.
     
  19. davebee

    Well-Known Member

    Oct 22, 2008
    539
    46
    It sounds like besides asking for specific micro advice, you're bothered by the fact that so much has changed.

    All I can say is that I feel your pain!

    It used to be that you could use a PC parallel port for bit-banging, then Microsoft locked down port access in the OS, but you could install a DLL to work around that. You could still use the serial port, until the serial port was discontinued, but you can work around that with a USB serial adapter, which works, as long as you're ok with occasional glitches, like if you connect a printer to another USB port, your serial-connected microcontroller gets a reset signal...

    I like the Parallax propeller. It's kind of an odd duck, an 8 cpu multiprocessing device, uses its own programming language, but it's a fun device and its tools are free.
     
Loading...