Replace CMOS with PIC? HOW?

Thread Starter

tigerapna

Joined Dec 14, 2011
73
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?
 

Attachments

MrChips

Joined Oct 2, 2009
30,824
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
 

Thread Starter

tigerapna

Joined Dec 14, 2011
73
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?
 

MrChips

Joined Oct 2, 2009
30,824
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.
 

Thread Starter

tigerapna

Joined Dec 14, 2011
73
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.
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.
 

MrChips

Joined Oct 2, 2009
30,824

debjit625

Joined Apr 17, 2010
790
Can you give me a part number, something inexpensive?
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
 

Thread Starter

tigerapna

Joined Dec 14, 2011
73

Thread Starter

tigerapna

Joined Dec 14, 2011
73
You also have this little thing. https://estore.ti.com/MSP-EXP430G2-MSP430-LaunchPad-Value-Line-Development-kit-P2031.aspx good value for your money.
If you want to go with PICs. I would not recommend the PIC16F84A at all. Take a look at the 16f628a or the 16F88. The 16f690 offer also much for the money
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
 

hgmjr

Joined Jan 28, 2005
9,027
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
 

t06afre

Joined May 11, 2009
5,934
Why do you not recommend the PIC16F84A?
Do you recommend this Starterkit pickit 2?
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.
 

RayB

Joined Apr 3, 2011
31
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?
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:

t06afre

Joined May 11, 2009
5,934
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.
 

RayB

Joined Apr 3, 2011
31
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
 

Thread Starter

tigerapna

Joined Dec 14, 2011
73
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.
 

Attachments

Top