Page 1 of 1

Getting Started w/PIC Microcontrollers - advice, please?

Posted: Tue Jul 08, 2008 7:32 pm
by PICmeUp
I am designing and building a remote-controlled filming device (similar to a CAMCAT®) as an independent project at my high-school. I have been working hard on this project for many months, and recently finished debugging the proof of concept. This fully functioning prototype has been used now in filming two stage productions. I am now moving on to version two, which I plan to build around PIC micro-controllers.

v2.0 Description:
Version two of the system will be controlled by the user at a base station by a combination of joysticks and buttons. The station will also include an interface for setup such as channel travel, centering, joystick position vs. motor position curves, and velocity/position control selection, as well as a screen to view the live video signal. Data will be sent wirelessly from the base station to a traveling carriage, where it will be decoded to control the motor drivers. As in the prototype, the carriage will be suspended on taut cables and will hold the camera, electronics, and motors. Power will be supplied through the carrying cables, also as in the prototype.

Being new to programming micro-controllers, I am unsure quite where to start. I have done extensive programming in VB6, and I am well-versed in electrical engineering. I already own the Microchip ICD 2, and mikroC (, and have done good research into development boards. However, each time I search again, I find something new. Because of this, I am still unsure what hardware to get.

I am considering MikroeElectronika's EasyPIC5, but I'm unsure if this will be the best choice. What development hardware would you recommend to a new user who learns quickly? - something that will hopefully continue to be useful for some time, and not exorbitantly priced, as I am doing this project on a shoestring budget.

Thanks in advance!

Posted: Wed Oct 22, 2008 4:47 am
by Charliem
Hi Picmeup,

I have a Easypic4 and think its a valuable tool for pic programming. You can't go wrong with the EP5.It supports a vast number of pics and has tons of features.Updates for the picflash software are free. There is a distrubitor there in NY.

regards Charliem

Posted: Wed Oct 22, 2008 7:23 am
by psycho
I have the EasyPic3 and I love it. I also have MikroPascal - which I hardly ever use anymore - switched to Microchip's C18 compiler.

If you don't need any more that a 40 pin uC, the EP5 would be a great choice. If you need more than a 40 pin device, check out the BigPic or check out some of microchip's dev boards - I just picked up an Explorer18 & an Ethernet Pictail card about a month ago. Tho, the Easypic boards can do PIC18's, too.

This may be overkill, but have you checked into the PIC32? You can see an ongoing design challenge at - some of the projects are really nice.

Just my $.02

Posted: Wed Oct 22, 2008 10:26 am
by philba
Before anyone buys a programmer, do yourself a favor and take a look at the PICKit2 programmer from Microchip. It's both a programmer and debugger. It programs a truly wide range of PICs and is a decent little debugger. Cost? $35.

I wouldn't buy an integrated programmer/trainer/dev board. In my opinion, it's a big waste of money. For the cost of one of those boards, you can by the pickit2, prototype boards and all manner of peripherals and have a fair amount of change left over.

Re: Getting Started w/PIC Microcontrollers - advice, please?

Posted: Thu Dec 31, 2009 8:46 pm
by goner19
NOTE: listen to philiba and psycho...youll be glad you did!!!!

Re: Getting Started w/PIC Microcontrollers - advice, please?

Posted: Thu Dec 31, 2009 9:02 pm
by psycho
// begin ramblings

Thanks! And, btw, I finally got a Pickit3 (my wife "got it for me for xmas"). It seems OK so far. Why did I get it, you ask? Because the debugging support on the Pickit2 for PIC32's is pretty much non-existant and I am working on a PIC32 project. From what I have read, the PICKIT2 project has been put on the back-burner and they might update it when/if they get around to it. That is what I got out of the comments, anyway.

So, now I use the pickit3 and it pretty much seems just like the version 2 except that it has a PIC24 chip in there (16 bit device). So, later on down the road they can put all kinds of goodies in there if they see fit.

// end ramblings

Re: Getting Started w/PIC Microcontrollers - advice, please?

Posted: Fri Jan 01, 2010 8:09 pm
by goner19
yeah psycho
i been looking at that pickit3 since we talked way back in july
but have not had the extra cash to pull the trigger
i will when i get back to work later this month (crossing fingers)

i been trying to do a simple input deal where i push a button once than one pattern flashes
and 2 pushes makes another pattern but to no avail

any suggestions?
right now all i can really do is progam chasers and the like
but nothing w a human interface of any kind.

Re: Getting Started w/PIC Microcontrollers - advice, please?

Posted: Fri Jan 01, 2010 9:05 pm
by psycho
If the button(s) is(are) debounced, you would want to get the first button press. Note the "time" when it was pressed (i.e. have a 1ms timer running in an ISR and producing a "ticks" variable to count the milliseconds). Then, if the button is released and pressed again in a given number of ticks, you know that there was two clicks. If your given number of ticks passes with no additional button presses, treat the input as a single button press. SO...

1 - set up a 1ms timer interrupt.
2 - have the timer ISR add 1 to the ticks variable each time the interrupt fires. 1000 ticks means 1 second has passed.
3 - when you get a button press, mark the ticks of when it happened. (lets say the ticks variable is 12345 when it was pressed) (buttonpress = ticks or whatever)
4 - if there is no additional button presses in say, 1000 ticks (the ticks variable would then = 13345), then run your single button code.
5 - if there was another button press between ticks = 12345 & 13345 then run your two button press code.

Hope it helps!

Re: Getting Started w/PIC Microcontrollers - advice, please?

Posted: Fri Jan 01, 2010 9:59 pm
by goner19
yeah kevin,

the concept makes perfect since...
whats an ISR?


Re: Getting Started w/PIC Microcontrollers - advice, please?

Posted: Fri Jan 01, 2010 11:33 pm
by psycho
ISR = Interrupt Service Routine. You setup the timer to trigger an Interrupt. Every time the timer reaches 0, the processor will fire an interrupt (provided that interrupts are enabled). When the interrupt is fired, the processor will switch control to an ISR (which you have to write). Note that there are many different interrupts that can occur depending on what PIC (or microcontroller, in general). For instance, some PICs have an interrupt-on-change ability - This will trigger an interrupt if the state of a pin goes from hi to low or low to hi. Not all PICs have this and not all pins have it, either. You can find sample code and alot more info on the net about it.


Re: Getting Started w/PIC Microcontrollers - advice, please?

Posted: Sat Jan 02, 2010 9:14 am
by goner19
hey kevin,

thanks again....
ill do some homework and see if i can figure out ISR's