[HELP] How to choose the right PIC for my project

Thread Starter

zell12

Joined Jul 15, 2010
25
I have this project to build a home security system (blocking sensors, password doors, etc) w/ all those logics, but, you see, im a real noobie to microcontrollers,

can someone provide some considerations to take when choosing pic

please take me lightly, i might not be able to understand such intermediate terms, im just starting out my research

or if anybody here kind enough to provide basic tutorials about pic

thank you in advance! have a nice day!
 

thatoneguy

Joined Feb 19, 2009
6,359
You may want a more modular solution, such as a microcontroller at each sensor, all communicating to the "overseeing" controller. PICs are under $1 each for 8 pin devices to do a simple to moderate task.

Security systems get very complex quickly. Many tricks are used, such as measuring line capacitance and other features to ensure somebody didn't "jumper across" a switch. Communications need to happen to verify doors are locked, sensors are working, etc.

I'd strongly suggest getting the PicKit 3 Debug Express, or a PicKit 2 or 3 and a demo board from the EAsyPIC series or the generic QL200 boards off eBay. From there, you learn the language, as well as what can and cannot be done with them.

It's a great hobby, and if you have a background in electronics, you can be on your way to making "sci-fi" level projects within a month (with patience).

So, in order:
1) order a PIC Starter kit, make sure it has a real PicKit 2 or PicKit 3 programmer (The latter saves a ton of headaches). Find something in your budget range, this will be used over and over for different ideas.

2) Define the system you'd like for security. Would you buy modules for glass breakage, passive IR, and reed switches, or build them? Have you looked at the latest technology in alarm systems? (Many burglars have...)

3) Ask questions, here, and have fun with it! It may seem daunting at first, but it all falls together if you hang with it.
 

Thread Starter

zell12

Joined Jul 15, 2010
25
wow! thank you for your immediate response!

though i know i cant absorb much of that for now, i feel that i can learn much more here! nice!

feel free to post what you know, maybe in time i wil be able to share mine

btw, are there available intro to pic modules here sir?
 

spinnaker

Joined Oct 29, 2009
7,830
wow! thank you for your immediate response!

though i know i cant absorb much of that for now, i feel that i can learn much more here! nice!

feel free to post what you know, maybe in time i wil be able to share mine

btw, are there available intro to pic modules here sir?

I like these lessons

http://www.mikroe.com/eng/products/view/285/book-pic-microcontrollers-programming-in-c/

They are easy to understand and helped me a lot. They are in mikro C but you can apply it to the C in MPLab.


I would suggest starting very small. First pick a programmer and compiler. If you choose PicKit2 or 3 then you will probably want to use C in MpLab. Start with learning how to turn on an LED.


You will want to use the 18F series of PICs. They are affordable and easy to use.

They have a nice parametric search

http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=1004&mid=10&lang=en&pageId=74

That will help you choose the PIC that you need.

They also sell a demo board. It comes with a PIC Kit 3 and lessons.

This is the one I bought

http://www.microchip.com/stellent/i...deId=1406&dDocName=en538340&redirects=pickit3

You won't do much with the board after you have learned all the lessons but is is nice to have to know everything is connected correctly for you.
 

Thread Starter

zell12

Joined Jul 15, 2010
25
thanks also to you bro, theres a very nice air here,

this will all play a significant part in my research

ill be posting updates on my project here, hope to hear from you again sometime

just continue to post here if you have some more information that might be useful
 

maxpower097

Joined Feb 20, 2009
816
Look into the PICAxe and Arduino. Play with those for month then come back and we'll get crackin! These are microcontrollers for newbs. They are the go between from Computer > uC. They fit right in the middle. They have been programmed to run on a simpler form of compiler and language, but you will learn the essencials like pins, ports, inputs, outputs, uart, SPI, i2c, crystals, etc.. Then when your ready for the big dawgs like the PIC18, PIC32, AVR, etc... Things won't be nearly as scary.
 

spinnaker

Joined Oct 29, 2009
7,830
thanks also to you bro, theres a very nice air here,

this will all play a significant part in my research

ill be posting updates on my project here, hope to hear from you again sometime

just continue to post here if you have some more information that might be useful

This is a very helpful forum. Probably one of the best if not the best on the internet. Everyone is very nice. Just treat everyone with respect and understand that sometimes people may not have time to help and you will have a very good experience.


Welcome to the forum and I hope you have as much fun as I have had.
 

Thread Starter

zell12

Joined Jul 15, 2010
25
@spin
you have provided me such informative book,

ive just finished chapter 1 w/c is indeed very well versed. its very understandable especially for beginners like me

im on chapter 2 (programming microc), still struggling w/ these programming languages.good thing i have had my background on basic java programming in C, i wont have to suffer much

btw, whats Mplab? is it a compiler for C or a C programming language?

is mikroC compiler compatible with that?

sorry for these bunch of questions.
 

spinnaker

Joined Oct 29, 2009
7,830
@spin
you have provided me such informative book,

ive just finished chapter 1 w/c is indeed very well versed. its very understandable especially for beginners like me

im on chapter 2 (programming microc), still struggling w/ these programming languages.good thing i have had my background on basic java programming in C, i wont have to suffer much

btw, whats Mplab? is it a compiler for C or a C programming language?

is mikroC compiler compatible with that?

sorry for these bunch of questions.
WOW! You are moving fast! :)


MPLab is Mirochip's programming environment for the PIC micro controller.

It comes with many tools. most of which I do not know their purpose! :)

But mainly it will help you write programs for the PIC.

As far as I know Mikro C requires that you use their programmer with the software. You can use the PICKit2 or 3 but it is difficult and clumsy. As far as I know, debugging would be very difficult. It is very easy to program and debug with a Pickit 2 or 3 in MPLab.
 

Thread Starter

zell12

Joined Jul 15, 2010
25
oh so mikroC requires a compatible programming software.

thanks much for these info bro!

have you got any sources of ready to use programs w/ descriptions? cause the examples given on the book tend to be generalized,

it can be much helpful if i can see a fully structured program ready to be compiled (e.g. lighting 3 LED alternately) --- in w/c i can set as base when structuring a much more complicated one
 

spinnaker

Joined Oct 29, 2009
7,830
oh so mikroC requires a compatible programming software.

thanks much for these info bro!

have you got any sources of ready to use programs w/ descriptions? cause the examples given on the book tend to be generalized,

it can be much helpful if i can see a fully structured program ready to be compiled (e.g. lighting 3 LED alternately) --- in w/c i can set as base when structuring a much more complicated one
Yes that is the way I understand it. You can make Mikro C work with the PicKit but it is not fun.

If you get the kit I mentioned above, it goes through lessons where you use the board you get in the kit to turn lights on, measure voltage etc. it starts out very simple then moves on to more complex functions.
 

Thread Starter

zell12

Joined Jul 15, 2010
25
can you please confirm if im still on the right track??

1. first i should spread out a truth table for the logic needed for the project

2. use kmap to formulate the logic equation

3. here comes the hardest----implement the logic equation (?) into C language program (is this right???)

4. use compiler to code the program languages into hex codes for use w/ the pic

5. download the codes into the pic

am i missing something from steps 1 to 3?
 

maxpower097

Joined Feb 20, 2009
816
can you please confirm if im still on the right track??

1. first i should spread out a truth table for the logic needed for the project

2. use kmap to formulate the logic equation

3. here comes the hardest----implement the logic equation (?) into C language program (is this right???)

4. use compiler to code the program languages into hex codes for use w/ the pic

5. download the codes into the pic

am i missing something from steps 1 to 3?
Thats pretty much right. Create a truth table/ flow chart etc... laying out on paper how your programs gonna work, the actually code it. Using the simulator in mplab can help a lot without even having a chip. Once you think the codes good and compiles with no errors you build the project. This basically just compiles your code into a hex file. Then you use the programmer to transfer the hex file to your chip, then bingo bagno your done.
 

Thread Starter

zell12

Joined Jul 15, 2010
25
@max
whew, thank you for confirming! :)

but i still have to work on the hardest part

btw, how much does PICkit3 costs?
 

spinnaker

Joined Oct 29, 2009
7,830
@max
whew, thank you for confirming! :)

but i still have to work on the hardest part

btw, how much does PICkit3 costs?
Probably will depend on where you live. You really should update your profile so people can recommend a place to buy.

You can buy off of microchip direct but you will probably pay more there. The link I posted above to the kit should have a link to the price.
 

spinnaker

Joined Oct 29, 2009
7,830
thank you for the find :)

btw, who's art bell?

Who is Art Bell???? Only the greatest talk show hosts ever!!! :)

http://en.wikipedia.org/wiki/Art_Bell

He no longer is on the radio. Once in a while he is guest host. He has talk about ghosts, UFOs and other strange happenings. He was very good. The new talk show hosts that took his place are horrible. They talk about finance, health and celebrities. Once in a while they will have someone that tells fortunes but that is boring.

Art married a lady from the Philippines and lived there for a while. I think maybe he has come back home to the states.


I also had a friend that lived there. He was stationed there during Vietnam and stayed because he like it so much. In the war he was a Navy SEAL. He had a underwater salvage there and worked on the movie Apocalypse Now. He would come back to the States every few years to get a job for a year then go back to the Philippines and live like a king. He was trying to get me to go back with him. I should have. You have a lot of pretty ladies there. :)
 
Top