Complete Newbie...Need some direction

Thread Starter

blawson7

Joined Sep 24, 2010
4
Sorry for the long post.

I have wanted to get into microcontroller programming for years, and now I'm finally gonna get into it.

I already have a project in mind, but don't know how to decide whether to go PIC or AVR...and which IC to use for that matter. I don't want to buy the programmer and install the compiler/software for an IC that I shouldn't be using.

Here's my idea:
I live in Texas and hunt with my brothers. We want our own game feeder timers that will control a motor to spin out corn from the bottom of a barrel. Yes, I know that these have already been invented, but I want to experiment and I'd like to have a few added features that don't normally come with regular game feeders (to be added after I get the basics working). Essentially, I want an alarm clock that will have multiple alarms per day. I don't care about date or DST, just a clock with multiple alarms. I also want each alarm to go for a configurable number of seconds and then shut off. This also has to be low power as it will be running on batteries. One addon will probably have something to do with RF so if there's any IC that may have this capability, that should help narrow down what I need.

I want it to be user friendly and easy to use. I was thinking about having 5 buttons: a menu/enter button, 2 arrow buttons to move the cursor left and right and 2 arrows to adjust the times up and down. I want to use an HD44780 LCD 16x2.

Having been a software engineer for nearly 10 years, I have the programming background and the willingness to learn new things.
 

Rbeckett

Joined Sep 3, 2010
208
I started out using the Picaxe system from Rev-Ed in the UK and it is a "BASIC" based language that has boot strap code on the chip. Simple to learn, context based, simple programming, low investment in support equipment,no deep abstract command structure, easy to get results in a short time. As you projects grow in complexity beyond a 40pin chip and I2C, you might want to consider Arduino, Atmel and AVR who use C/C++ and higher level languages like that. I am way too old and way to stupid to learn that right out of the box in addition to learning basic electronics at the same time. So a cheap basic learner type microcontroler is available, that offers various levels of complexity and selection of pin count and program lengths. Hope this helps.
Bob
 
The PIC24 based demo board linked above is probably too much for a beginner. The PIC24 line is pretty advanced, sometimes with ~100 pins that can be pretty tough for a beginner.

Texas Instruments is oflfering a good promotion on their MSP430 line that may be worth a look. Google TI launchpad for more. I haven't used it, but I've heard the have a growing following.

I started in the PIC with assembly language and I wish I hadn't. I'm happy with the PICs, but as I get into more advanced things assembly is a giant pain in the butt. It seems like all of the more advanced sample codes are written in C language, so I would start with that.

The arduino has a HUGE support base with a crapload of sample libraries and what not. In my mind, it is pretty perfect for the pure hobbyist. With that said, I've never used one.
 

maxpower097

Joined Feb 20, 2009
816
PIC pretty much uses C now too. They really only used ASM for the smaller 8 bit chips because of size. As soon as they moved to 16bit and 32bit chips nearly everything is in C.
 

Thread Starter

blawson7

Joined Sep 24, 2010
4
What is the range of your spending budget?

hgmjr
Well, I'd like to keep it below $100 for programmer, microcontroller, and a development board (I was hoping). I don't want to spend over $150. I'm hoping that after getting the basic necessities and getting everything figured out, actually building more game feeders will be significantly lower than that (hopefully).
 

ELECTRONERD

Joined May 26, 2009
1,147
I got started with PICs and just bought the PICKit2 for $35, no development board is really necessary. I would recommend programming the PICs in the C language, since it allows more control over the I/O than BASIC does and provides more functionality in general.
 

Thread Starter

blawson7

Joined Sep 24, 2010
4
It sounds like everyone (so far) is directing me towards PIC. Luckily I know C very well. Given the details of the project (and the possible RF addition), is there a particular PIC that you suggest I use?
 
Having a clock and alarms seems to be the main thrust of the project, along with enough pins so you don't have to play scrabble to hook up the 16x2 lcd. So a PIC with an integrated rtcc, for the inbuilt alarm and interrupt registers to play with. Adding the rtc as a separate device could cost as much as the micro device itself.

An 8 bit Pic device with an inbuilt rtcc, and a user friendly DIP format, narrows the choices right down to the PIC18F2XJ11 family of devices. A couple of perceived downsides of the PIC18fxxJxx devices is it's a nominal 3.3V device, and no eeprom. Most lcd's operate off 5V.

The curve ball is the RF factor. Many of the add on devices like the Digi XBee should be no problem. Running a Microchip stack and their line of 2.4ghz rf modules, would most likely require buying their full C compiler, and a much more capable device.

Ti may have an offering with all the requirements including rf, but in all likelihood, it will not be easy to work with package wise.
 

maxpower097

Joined Feb 20, 2009
816
I would recommend a PIC24 or DSPIC. The code from C30 and newer C compilers from MC are much more similar then C18. Seems like the wrote C18 then threw the book away when they created C30. Then they just added a little bit for 32bit compiler.
 

maxpower097

Joined Feb 20, 2009
816
PicKit2 or PicKit3, dealers choice. The Pk2 is more mature but won't support newer chips. The Pk3 is still catching up to the maturity of the pk2 but it will program future chips from MC.
 

Potato Pudding

Joined Jun 11, 2010
688
Buy for ythe future.

It will cost you a few dollars more to work with a better chip now when you are not going to need even half of its features.

But the shift from beginner to journeyman is not the best time to try upgrading to better chips. Get a chip that will give you lots of room to develop and stick with it until you consider yourself expert.

Technically it should not be harder to make a PIC24 flash an LED ( the Hello World! of the MCU programmer) than a simpler chip. The main concern is the more common need with a lower voltage device to interface through transistors or other means instead of direct output control, but that is a good habit to start with early. Powering direct from the MCU is a dubious convenience.

If you are experienced in C then definitely use a chip that has room to do everything in C.

I am a masochist for wanting to do as much as possible in Assembler, but I have more experience with it than I have with C. (Not that I have much experience in assembler - just more than I have in C. I haven't done much programming in years. Pascal is more familiar to me than C, but that was 20 years ago. Time flies.)
 

maxpower097

Joined Feb 20, 2009
816
Actually its easier. :) I fully back all Potatoes suggestions. But to even go into detail a little bit more. You can get PIC24 chips with lower specs for about the same price as the 8 bit pics. They will keep making 8 bit - 32 bit pics for a long time, they just get smaller and smaller. I started off with the PIC16F877A in ASM. Then jumped into the pic24 in C. The C was a dream compared to ASM. Took a while to just get used to seeing C code but its much more readable, and more simple to code for.
 
Top