Replace CMOS with PIC? HOW?

Discussion in 'The Projects Forum' started by tigerapna, Mar 16, 2012.

  1. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    Someone told me I can replace my circuit with a PIC microcontroller:) and learn how to easily program it.

    Can anyone recommend a device?:confused:

    I saw PICAXE but its based in the UK.

    Something I can order off of DIGIKEY?
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,429
    3,360
    If this circuit works for you, go with it.
    But in the meantime, learn to program and work with a microcontroller (MCU).
    There are many manufacturers to choose from, for example, in no order of preference:

    Atmel
    Freescale
    Microchip
     
  3. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    Do they use assembly language?

    I am familiar with assembly and ladder logic but very simple basic C.

    Can you give me a part number, something inexpensive?
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,429
    3,360
    All microcontrollers use ASM.
    If you wish to learn ASM I would suggest not choosing Microchip PIC.

    Here are two examples of development kits:

    Atmel:
    http://search.digikey.com/ca/en/products/ATAVRDRAGON/ATAVRDRAGON-ND/1124251

    Freescale:
    http://search.digikey.com/ca/en/products/DEMO9S08QG8E/DEMO9S08QG8E-ND/1227816

    There are many more to choose from.

    I know the Freescale Codewarrior allows you to program in both ASM and C.
    I don't know what comes with the Atmel dev kit but ASM and C compilers are available for free.
     
  5. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    Thank you for the replys.:)

    Is it much more efficient to use a Microchip PIC because of the simplicity of my circuit? Its just basic logic controlling two relays.
     
  6. MrChips

    Moderator

    Oct 2, 2009
    12,429
    3,360
  7. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    So if using Microchip's PIC then ,to control two relay you will not need much peripherals in your mcu ,you can go with PIC16F84A cheap one...and PICASM is not that bad you can learn it from here :
    http://www.mstracey.btinternet.co.uk/pictutorial/picmain.htm
    but don't forget to go through the datasheet.Learning C will help you in future and I will recommend that.

    Good Luck
     
  8. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    wow! great website!

    Thank you so very much :)
     
  9. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
  10. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    Why do you not recommend the PIC16F84A?

    Do you recommend this Starterkit pickit 2?
    http://search.digikey.com/scripts/dksearch/dksus.dll?vendor=0&keywords=DV164120
     
  11. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Another way to go is to use an Arduino Uno. The programming language is C. If you have a Windows or Apple PC you can download the programming utility for free.

    Take a look at www.arduino.cc.

    hgmjr
     
  12. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    The PIC16f84A is quite old. The newer PICs from microchip do have a lot extra functions on board like more timers, UART, SPI to mention some.
    If your budget allow for it. I would perhaps go for this one. http://search.digikey.com/ca/en/products/DV164131/DV164131-ND/2002492
    If you are on budget and have access to a breadboard. This will be a good option also. This is just the PICKIT.
    http://search.digikey.com/ca/en/products/PG164130/PG164130-ND/2171224
    You can purchase some PICs on the side and very easy build your own trainer. Then you can follow the lessons used by the PICKIT 2 starter kit. And the PICKIT 3 debug express kit.
    The PICKIT 3 is a newer version of the PICKIT 2. The PICKIT 2 do not support newer PICs from Microchip. But for a beginner. That do not have much to say. The list of supported PICs for PICKIT 2 is still quite long.
     
    tigerapna likes this.
  13. RayB

    New Member

    Apr 3, 2011
    4
    1
    YES, PICAXE is a Revolution Education product based in the UK, but they have worldwide resellers: http://www.picaxe.com/Distributors
    I have used phanderson.com/picaxe multiple times with 100% positive experience.

    For simple stuff that may have been developed for the BasicStampII, the PICAXE is a superior product, usually. Well supported with knowledgeable moderators and a full-time technical commentator, the support site is very active.

    A full PICAXE development platform can be constructed for a chip price under $4... (plus shipping) PICAXE 08M2 chip, RS232 3-wire serial cable, 22K and 10K resistor, and 3 AA batteries.

    Very useful for projects that can rely on the internal RC osc. of the less expensive chips... laser trimmed to about 1% or better to ensure RS232 serial is stable nuff.

    - Ray
     
    Last edited: Mar 21, 2012
  14. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    The PICAXE is just a standard PIC micro-controller with some preloaded code. OK for quite simple task like blinking LEDs and so on. In the long run you will be better of. With more a more conventional micro-controller approach.
     
  15. RayB

    New Member

    Apr 3, 2011
    4
    1
    QUOTE=t06afre;468308]The PICAXE is just a standard PIC micro-controller with some preloaded code. OK for quite simple task like blinking LEDs and so on. In the long run you will be better of. With more a more conventional micro-controller approach.[/QUOTE]

    @t06afreq: You hit the nail on the head. Before I started this response, I read your posts of the past 2 days to try and get a feel for your general position and depth... an appreciation for your knowledge and mindset. I would have read more, but you are a prolific poster.

    I will not contest anything you have stated about the PICAXE, but please allow me to briefly take a slightly opposing view to defend the product. I have 33 years of assembly and high-level language experience, but I believe the lowly PICAXE needs a weebit of defense for readers of this thread.

    Every professional programmer understands libraries and the purpose of the compiler and linker.. PICAXE users do not have this intrinsic knowledge provided by using the PICAXE development tools. The compiler is a tokenizer and numeric 'zipper' which compresses numbers into a compressed storage model and performs some code optimization . Inside every PICAXE PIC are loaded the serial boot loader, all binary code libraries, and control and supervisory code to isolate the user's program from the PIC hardware (gasp!). The interpreter in the chip essentially reads a pre-assigned token for the BASIC command, expands compressed variables, and the executes highly optimized assembler code already stored in the chip and not downloaded as part of the user's program. Much of the "slowness" comes from variable and constant numeric expansion. Actual library functions are optimized which somewhat offsets the interpreter so that instructions are generally stated to be executed in 20us average at 4mHz clock.

    The PICAXE CHIPS ARE several times the cost of individual PIC parts... so, this was never envisioned as a commercial solution for mass produced anything. However, RevEd's target market is schools to provide a stable and scalable teaching system. In this area, hobbyists also seem to be comfortable working with a product used in middle and high school.

    PICAXE users are a lot unto themselves but seem happy in their ignorance (or rejection) of what us being done in other uC areas.

    As you say, "OK for quiet simple tasks..." but I am surprised at how creative this group is when working with what appears to be a most limited product. I have reviewed their site and forums and they are a prolific lot, projects aplenty and a fair amount of work and handholding with beginners and students.

    I have been in the industry for a long time and I spent 3 long years in IT education. Many times the complexity of doing things efficiently and with best practice overwhelms beginners and the lesson and problem solution are lost in too much formal complexity. If the PICAXE is a $2 too expensive chip, the money is well spent in making the development environment less complex. There is plenty of time to introduce complexity when the foundation is built.

    - Ray
     
    elec_mech likes this.
  16. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    I would like to impliment the following flowchart. Can PICAXE do this relatively easily? I am having issues with programming assembler for the timer part.
     
Loading...