which PIC do I need?

Discussion in 'Embedded Systems and Microcontrollers' started by linwiz, Dec 7, 2011.

  1. linwiz

    Thread Starter New Member

    Dec 7, 2011
    8
    0
    I am trying to decide on which PIC will work for my project, which must have be able to accept input from two momentary switches, and output current through 3 pins as needed.
     
  2. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    The PIC12F675 is probably OK if you don't need accurate frequency (better than 2%). If you want to add a crystal for more accuracy, then probably a PIC16F628A would be OK. Of course it also depends on what language you use, how much processing power is required, how large the program is, how fast the output pins will be switching, etc.
    I'm assuming that by outputting current, you just mean a logic type output.
     
  3. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    What you mean by that?

    If you want a PIC with two input pins and three output pins, then any will do as you would normally get atleast one full port which will have 8 bidirectional pins for a 8 bit mcu.For example PIC16F84A gives two ports PORTA and PORTB and you can use all the 8 pins of PORTB.

    Good Luck
     
  4. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    I think almost any PIC can do this. Perhaps more important. Do you have a programmer for PIC MCUs. Just select any PIC that is compatible with your programmer
     
  5. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    The big decisions are usually:

    Does my compiler support it?
    Number of I/O pins required, how many in, how many out?
    Do you need Analog to Digital conversion?
    Comparators?
    UART/SPI/USB communication?
    ECCP module for PWM Motor or light control (though this can be done in software)
    Program size (Flash Memory)
    Power off save parameters (EEPROM Memory)
    Ultra Low power sleep (draws nano-Amps, wakes on Interrupt)
    Low Power overall (slower clock but draws microAmps while running)

    This narrows it down to exactly what you need, but you can get away with "common" PICs like the 16F627/628 if you don't need ADC or low power, but you have enough I/O to work with (16 pins full I/O), in addition to comparators.
     
  6. linwiz

    Thread Starter New Member

    Dec 7, 2011
    8
    0
    Accuracy shouldn't be a issue here, and I am going to be working with C/C++.
    power consumption could be helpful in the long run. That is something important, I didn't think about yet.
    The program, I am not sure how big it will be. As i think about it in my head, it seems small, but never know..
    EEPROM should be able to save 12 "variables" each with either 1 or 0
    and the thing I guess from your reactions, is that I don't fully understand the output pins. If input is 5v then output is 5v right? I am not sure what 'logic output' means. my programmer is the pickit2.
     
  7. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    A logic output is somthing which output some kind of logic i.e.. 1 or 0 or true or false .
    In case of microcontroller,it will depend on its electrical logic level.For example a PIC working with 5VDC and its logic level are 5V for logic 1 and 0V for logic 0.Their are PIC which works on 3.3V and their are logic level are also 3.3V for logic 1 and 0V for logic 0.

    Now not always the logic level have to be the working voltage of the device,like their are device which works with 3.3V but their logic level are 5V for logic 1 and 0V for logic 0.

    Actually logic level are not so accurate they have range like a TTL device may take logic 1 from 5V to 2.4V and logic 0 from 0.4V to 0V and a CMOS device may take logic 1 from 5V to 4.7V and logic 0 from 0.2V to 0V.In PIC CMOS is used.

    You can search google for more info and you can also check the free ebook avaliable at AAC
    http://www.allaboutcircuits.com/vol_4/index.html

    Good Luck
     
  8. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    If you are using C, then maybe the PIC12F683 would be better than the PIC12F675 as it has more program memory. If physical size is not an issue, go for an 18 pin PIC like the '628A as it will give you more options and allow you to easily program it in circuit without worrying what else is connected to the programming pins.
    Correct.
    We weren't quite sure what you meant with the initial question. It could have meant that you wanted variable current outputs, or something else.
     
  9. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,866
    988
    I would go with the 18 line of 8 bit PICs if you want to use C.

    Microchip has a fantastic parametric search you just pick what you need and the search will find it. The link is for the 8 bit 18 family but they have a similar search for other MCUs.
     
Loading...