The MP3car.com Store The MP3car.com Store    

Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Newbie

Reply
 
LinkBack Thread Tools Display Modes
Old 07-03-2007, 01:04 PM   #1
Newbie
 
Join Date: Jun 2007
Posts: 5
A successful noob's advice on programming PIC microcontrollers

This post is intended for people who are at the stage I was at 12 months ago. I assume you know how to solder from building a kit or two, have done some light computer programming at some point in the last 20 years, whether in Basic or Pascal or C, and maybe know some basic physics like Ohm's Law (V=IR).

When I decided to get into building my own electronic circuits, I wanted to do what I thought were complex things like drive LCD displays or do some home automation. These things proved to be much simpler than I thought they would be.

I started out with the PICkit starter kit from Microchip (www.microchipdirect.com). It came with the Pickit 2 programmer (PG164120 , $35). I chose it because of its price, and because it is a USB device -- my laptop doesn't have a serial port.

The Pickit2 programmer can program a wide range of PIC chips using in-circuit serial programming (ICSP). This means that you don't have to take the microcontroller out of your project in order to program it, the programmer interfaces through six header pins that are very cheap and quite compact, so they won't make your project bulky.

I found the starter kit to be quite helpful at proving to myself that this hobby was within my reach. It came with a demo board populated with a small microcontroller, a few LED's, a potentiometer, a switch. It came with a few sample programs that you could flash onto the microcontroller using the provided software. The programmer isn't limited to working with the demo board, however; you can easily build your own ICSP capable boards from the provided schematics using only two or three trivial components.

The sample programs that came witht he PICkit2 starter kit were in assembly language, and I didn't really have the energy to learn to program in ASM. I got my hands on the PicBasic Pro compiler (www.melabs.com), and found myself right at home programming in basic. Programming a pic in basic was no more difficult than programming the computers I'd mucked around with when I was a kid. For those of you who want to program in C, there is a C compiler available for the PIC as well.

As a non-engineer, learning this stuff was *extremely* satisfying. I progressed quickly from making an LED blink on and off, to building an LCD alarm clock, to a POV lightstick, to building a fully automated care system for our pet chameleon (that controls his lights, his water supply, and dispensed a metered number of crickets daily).

If anyone wants any advice on where to get started, I'd be happy to help.
gadgetlust is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Advice lkstaack Newbie 3 05-10-2007 07:47 AM
WTB: Pic Microcontrollers KyleYankan Classified Archive 10 04-29-2005 05:11 PM
advice for starting out in VB programming Vchat20 Software & Software Development 10 02-06-2005 01:00 PM
PIC programming how to MatrixPC General MP3Car Discussion 6 12-23-2003 02:13 PM


All times are GMT -5. The time now is 08:38 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics