So many PIC choices, suggestions for type or manufacturer?

Discussion in 'Embedded Systems and Microcontrollers' started by seabear, Mar 7, 2011.

  1. seabear

    Thread Starter Active Member

    Feb 20, 2009
    34
    0
    Hi all, I am planning on a fairly simple circuit driven by a couple of switches that I will sense with the PIC and then turn on a relay every X minutes/hours for Y number of seconds/minutes, all driven off of source 12v. I was going to do it with 555 timers and other components but I think I can get better accuracy with a PIC. I can program with Basic or assembly just fine, but I am new to purchasing PICs. Seems like many to choose from including AVR, PICAXE, Arduino, etc. I don't think I will be doing a lot of similar activity in the future so something basic and simple would be fine... also don't think I need a complex/expensive eprom programmer.. Can anyone suggest a place for me to get started or a line of PICs that would suit my needs without going overboard? thanks
     
  2. russ_hensel

    Well-Known Member

    Jan 11, 2009
    818
    47
    Only microchip makes pics. For your use I would strongly recommend the Arduino ( not a pic ) and its environment. You will have to learn a bit of c. If you know basic and asm ( for what chip ) picking up c should be no problem.
     
  3. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,789
    945
    Look at the per chip prices for each of the various types.

    You will see a LARGE difference between the several well known names

    Not much of a impediment if you only build single circuits once in a while, but if you want to build twenty or more at a time it add$ up real quick.
     
  4. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
  5. someonesdad

    Senior Member

    Jul 7, 2009
    1,585
    141
    Since you specified PICs, your problem description could be handled by a simple 6-pin device like the 10F206 which costs under a buck (it can be had in an 8-pin DIP package); it has four general purpose digital IO pins; two could be used for reading the switches and the other could be used for controlling the relay; this leaves you with a spare pin to e.g. drive an LED annunciator.

    You'll need to buy a programmer; I recommend either the PICkit 2 or PICkit 3. I have both, but frankly prefer the PICkit 2.

    You'll also want a regulator to get 5 volts for the processor and you'll probably want to use a small transistor to drive the relay, as the coil currents almost certainly will exceed the 25 mA the controller can source or sink. Remember the back-EMF protection diode across the relay's coil.

    You won't need an external crystal unless the factory-trimmed 1% timing accuracy isn't good enough.

    The code will be straightforward. If you're interested in learning about PICs and their programming, I feel a good $50 investment is the PICkit 2 Starter Kit. Besides the programmer, you get a small PC board with a 20-in PIC processor in a socket, four LEDs, a switch, and a pot, plus some prototyping space. These two things easily slip into a shirt pocket because they're compact. You also get a CD with the needed software; the lessons that come with it will show you exactly what you need to know (switch debouncing, timing delays, etc.) to create your solution.

    If you're a reasonably experienced programmer (i.e., you've messed with assembly before), you should count on being able to go through the requisite lessons and learning enough to program your solution in a weekend (and you'll have fun at it!).
     
  6. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    I agree with Russ_Hensel. Based on your description of your current programming skills and your mention of wanting to keep things like coding and wiring simple and hardware cost down then your project sounds like a good fit for an Arduino Uno or Duemilanove (both are the same, the Uno is just the newer model). Arduinos use a bootloader which negates the need for a dedicated programmer. The IDE (Integrated Development Environment) is free from the arduino website. There are lots of example programs that will give you some ideas on implementing your project. For around $30 for the arduino board (plus shipping) and another $15 to $20 dollars for a prototyping board (referred to as shields) you can get up and programming in a matter of minutes. Coding is written in a language that is very close to C. There are plenty of websites and forums where you can find people that can answer the questions you run into as you come up on the learning curve.

    Visit www.arduino.cc for more information and checkout youtube to get a feel for the popularity of the arduino board.

    hgmjr
     
  7. seabear

    Thread Starter Active Member

    Feb 20, 2009
    34
    0
    Thanks guys for all the good info... I think I might start with the TI launchpad system. Sounds like its a pretty cheap investment.
     
  8. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    Cheap yes, but very little user support and code compared to PICs / AVRs. Join a TI forum first.
     
  9. MMcLaren

    Well-Known Member

    Feb 14, 2010
    759
    116
    seabear,

    For $4.30, including shipping, for pretty much a "turn-key" system (built-in USB Programmer/Debugger, C & Assembly Language Development, and the board), I couldn't resist and so I purchased a couple of them last month.

    Some nice example projects and code are starting to show up at places like www.43oh.com.

    If you're interested, here's the drawing for a general purpose LaunchPad LCD interface I'm working on.

    [​IMG]

    Good luck. Have fun.

    Cheerful regards, Mike
     
    Last edited: Mar 8, 2011
  10. russ_hensel

    Well-Known Member

    Jan 11, 2009
    818
    47
    The launch pad is nice, a bit simpler than the arduino, and not nearly as well supported for the beginner. But beware they have been so popular that backorders were running into the months. May be ok now.
     
  11. Chiliyago

    New Member

    Jan 5, 2011
    11
    0
    I would suggest an alternate Microsoft based platforms.

    FEZ Domino
    Netduino

    The nice thing about the Microsoft platform is it is much easier to program and debug. Also C# language is a more understandable programming language.
     
  12. MMcLaren

    Well-Known Member

    Feb 14, 2010
    759
    116
    Hey Russ, it's considerably much simpler than an Arduino. I kind of think of it as a PIC 12F675 with 10 I/O pins (grin).

    I don't think supply is a problem any more. I got my first board in less than a week and when I ordered another two a couple weeks ago, they came in less than a week too.

    Regards, Mike
     
  13. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    A 32bit ARM processor to run a timer? Is that not overkill?
     
Loading...