PIC programming for a newbie

Discussion in 'Embedded Systems and Microcontrollers' started by mrtom, Oct 25, 2008.

  1. mrtom

    Thread Starter New Member

    Oct 25, 2008
    3
    0
    I have decided that I'd like to become familiar with programming PICs, from a hobbyist perspective. I am an EE, but have not done any programming in the past 15 years. I do NOT have a desire to pursue projects of extreme complexity, nor do I plan to become anything more than an occasional hobbyist (a project or two a year). That said, what language would you programming veterans recommend I use for my purposes? Ideally I would like to use a language/tool that I can find all of the necessary (and complete) commands in a few pages worth of documentation, with hopefully no more than a dozen or so more pages worth of command-explanations (I took a quick look at my old C programming book which is 280 pages long, and I dare say it would take me days to use it to program a simple logic circuit into a PIC Ü).

    Also, are there any particular PIC-kits that you'd recommend?
    BTW, my first project will need to load random numbers into memory (say 2000 addresses needed), and then be able to pull those numbers out of memory and display them to a user. I give you this brief info only in case it's the case that some PICs don't have 2000+ memory spaces available - I really have no knowledge in this area.
    Thanks for your help!
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
  3. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Here is a reply in which I put some of the pertinent links for AVR imformation.

    hgmjr
     
  4. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,346
  5. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Here is a link to the digikey website info on the ATSTK500-ND evaluation kit for the majority of the AVR microcontrollers.

    With the ATSTK500 eval kit and a 10V power supply will get you started. The Assembly Language Compiler AVRSTUDIO4 and the C language compiler WINAVR are both totally free for you to download.

    hgmjr
     
  6. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
  7. Nomad

    Active Member

    Oct 21, 2007
    43
    0
    While that page doing the comparisons seems to be honestly fair, it misses a lot of points.

    it mentions the basic stamp, but not the stamp II, or picaxe.

    it missed all the awesome support for picbasic, including forums, projects, etc and you dont have to log in to view it like at avrfreaks.

    the pickit2 also has tools like like data analyzer and signal injector.

    using picbasic is to me about as easy as gwbasic. (and the picbasic compiler (not pro) is free. )

    Microchip has a free samples program.

    there's free c-compilers for both

    among other things.

    Now I'm not knocking AVR's. truthfully, I've never used them. They look pretty awesome, and from some sources I respect have heard great things like program portability from one chip to another. but being on a tight budget, only using for hobby, free samples, and a basic I could learn quickly, I had to go with a pic. (Mostly for the super cheap programmer, free samples, and familiar basic programming) Haven't regretted the decision yet.


    EDIT: Just noticed atmel samples listed on their page. never saw that before. might be time to try one out lol.
    now if they only had a nice features/comparison page to select devices similar to the microchip pages....... ugh.
     
    Last edited: Oct 26, 2008
  8. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Greetings nomad,

    Is this what you were referring to when you asked about a comparison list of the features of all of the members of the AVR family?

    hgmjr
     
  9. n9352527

    AAC Fanatic!

    Oct 14, 2005
    1,198
    4
    If you are after concise command set, then IMHO PIC with assembler is more suitable for you. The number of assembly commands for the PIC16 series is only about 35 or so. PIC18 series have a few more additional commands. The MPLAB and MPASM are free from Microchip. However, it does require a lot more time to develop large program with assembler compared to, say, C.

    There are PIC18F with around 3K of RAM, so that 2K requirement is not really a problem unless your codes also need lots of RAM.
     
  10. mrtom

    Thread Starter New Member

    Oct 25, 2008
    3
    0
    Thanks for your responses. I've taken a look at the PICkit2 starter kit, and it seems to me to be what I was looking for (although I'm not exactly sure of what ALL I will need - it sounds as if it is a complete kit though, almost..). It does say that I need the "the AC162061 ICD Header and AC164110 adapter to debug". I assume the header is just to mount the PIC on (odd they woudn't include that), but I'm not sure what the AC164110 is exactly...
    The kit sounds as if it contains several different compilers (Assembler, PICBasic, and C), is this correct Bertus? If so, what are the advantages/disadvantages in choosing to use one over the other?

    Unless any of you can give me a reason not to choose this kit, I think I'll order it tonight.
    Thanks again.
     
  11. n9352527

    AAC Fanatic!

    Oct 14, 2005
    1,198
    4
    The headers are just that, to mount the PIC. You could also wire it up manually to the target PIC. I've a PICkit2, but I didn't look at the application CD because I use MPLAB and had the version that I wanted from Microchip website.

    I would think that there are C18 compiler, MPASM, maybe evaluation or lite version of other compilers in the CD. Not a big problem, you could download lots of other compilers.
     
Loading...