3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Intro to PIC Microcontrollers

Intro to PIC Microcontrollers
a minimum of what you need to get started programming PIC micros for use in electronics projects (robotics, etc)
 
Remove these adsRemove these ads by Signing Up
 

Step 1What you need for the project

What you need for the project
NOTE: seems like if you have windows XP, there is no free PIC programmer software that can download code to your PIC throught the serial port. This meens you will have to buy or make a more expensive USB programmer circuit. If you have DOS on windows 95, the stuff below will work.

Look at the list of stuff you need below. Then look at the picture I made below. It has everything on it you need to get started with Pic micros. You can see how to make a simple circuit with the PIC and an LED, you can see code for a simple program, and you can see instructions on how to put the code onto your PIC. Once the code is downloaded onto your PIC, put your PIC back into the LED circuit, give it power, and watch the LED blink, whee!

#################################################################
TO BE ABLE TO READ THE DIAGRAM, CLICK ON THE 'i' IN THE TOP LEFT CORNER OF THE PICTURE, THEN CLICK 'largest' (ON THE LEFT OF THE PAGE), THEN CLICK THE PICTURE.
Also, download the PIC16F877StarterProject.zip It contains a more detailed picture.
#################################################################

==========Stuff used in this project:==========
(I am in no way saying you have to buy the things below, they just happen to be what I used when I started with PICs)

a PIC16F877
This is a PIC microcontroller. It's a mini-computer.
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=74

a PIC-PG2B JDM programmer
This is a circuit board which interfaces your computer to your PIC so you can program it (I bought one off ebay for around $15).
http://www.olimex.com/dev/pic-pg2b.html

PICBasic
This is the compiler used in this demo to (similar to Basic language) program the PIC.
http://www.picbasic.co.uk/
You could also use the -free- PICClite compiler (similar to C language).
http://www.htsoft.com/products/PICClite_comparison.php
You could also use a free assembly language compiler (assembly language is annoying).

IC-Prog
This program allows you to download your code to the PIC.
http://www.ic-prog.com/

USB to Serial Adapter
If you're using windowsXP you'll probably have problems using your serial ports (I did). A USB to serial converter (I have the 'Aten USB to Serial Adapter') may help.

one LED

one 4mhz chrystal oscillator

two 22pf capacitors

one 4.7k resistor

one 470 ohm resistor

one 5v power supply

###########################
Here's a Great PIC Intro Book
###########################

« Previous StepDownload PDFView All StepsNext Step »
58 comments
1-40 of 58next »
Apr 26, 2012. 10:10 PMgoldenshuttle says:
I need a 5 PICs each that is programmed to give randon ( or psuedo random) movement to 4 small servo's. I am uing to built a turtle prop. I can build electronic circuits and do soldeing, but I do not know PIC programming. Please anyone can program and send me these PIC's together with the schematic to make it work, I will pay for it. and Many thanks for reading.
Oct 6, 2010. 5:51 AMRobert L says:
Nice instructable , I need some advice. i need to make something with 3 leds and two momentary buttons, one will be on at a time and on button will make the light go to the left and the other will make it go to the right and if the furthest one to the right is on and you press the right button it will go to the furthest left . Hope you understand . Could you advice me what pic i should use or if i need one at all . Thanks
Aug 5, 2006. 10:29 PMVIRON says:
This looks interesting...
http://pp06.sourceforge.net/index.html
But windows just keeps getting sicker and less useful.
I'm searching for a technical bootable-linux-CDROM-distro. For free, of course!
Oct 14, 2009. 6:27 PMomnibot says:
For Linux there is <a href="http://piklab.sourceforge.net/">PikLab</a>.<br />
Oct 4, 2009. 3:32 PMWin7Maniac says:
Running from a live CD is a lot slower, though, and if you only have 1 CD drive (like me), you can't use CDs or DVDs. I love linux, though.
May 6, 2010. 11:42 PMroland985 says:
Puppy Linux boots to ram, so the apps start up lighting fast, and you can take the CD out. Try it, you will be surprised...
May 7, 2010. 1:51 PMWin7Maniac says:
Cool, I will definitely try it out!
May 7, 2010. 7:16 PMroland985 says:
Let me know how it goes...
Aug 7, 2008. 2:50 PMmattameo213 says:
I like to use Suse linux with KDE. Its a little harder to get customized but has a lot of power.
Oct 4, 2009. 3:29 PMWin7Maniac says:
What does the 4MhZ crystal do? Does it set the frequency for the controller? I've seen this used in many platforms, such as Arduino (except 16MhZ), but I don't know what it does.
Aug 13, 2009. 3:34 PM12V says:
i used a velleman k8048 and it works on xp with out paid software.
Apr 8, 2009. 3:14 PMdude6657455 says:
could you buy these at radio shack?
May 4, 2009. 11:39 AMlasermaster3531 says:
does anyone know about an open source pic programmer that will run on vista? will this one? thanks for the info in advance.
Jan 28, 2009. 10:29 AMyourcat says:
I think the PICAXE programming software can also do PICs, and that's free.
Jan 3, 2009. 11:05 AMFlyByPC says:
If you use a newer microcontroller (the direct replacement would be the 16F887), you don't need the resonator unless you want to run at more than 8MHz. A 12F683 is great for small (4-I/O, 1-input) projects. There are several WinXP-compatible PIC programmer applications. If you do go the USB route, spend a little more and get an In-Circuit Debugger; it can work directly with MPLab, and can both program and debug instruction-by-instruction.
Dec 25, 2008. 4:28 PMOldrunk says:
There is free windows PIC programmer software called WinPIC for flashing the PIC with just about any programmer and a number of OpenSource compilers for C and Basic that work under windows and can be used with MPLAB IDE
Jun 29, 2008. 3:48 AMcollard41 says:
its quite funny that you mention the PIC (personal introductory course) book, my friend wrote it.
Oct 29, 2007. 6:36 AMdeviance says:
(removed by author or community request)
Nov 8, 2007. 10:54 AMdeviance says:
I still find this stuff somewhat confusing. After going through a lot of websites I'm going to attempt to make a programmer and buy some chips. Hopefully they're the right ones. While I do appreciate the effort I wish someone would write a Pic Programming Instructable for the complete newb including some exact part numbers of a chip to start with, a step-by-step guide for hookup, writing code, sending code to the chip and then hooking the chip up to a breadboard to test it... and maybe some simple code for an LED flasher with a walkthrough of what the lines of code mean. No I don't want someone writing projects for me as I fully intend on learning assembly language once I get my programmer working but a simple example would be a great start.
Mar 2, 2008. 3:55 AMemilk says:
http://www.mstracey.btinternet.co.uk/pictutorial/picmain.htm
here is some pic asm tutorials to get you started. if you hawe some other chip then you only hawe to change som file registers according to data sheets.
Feb 14, 2008. 10:07 PMnumeroprime says:
Not that I like radio shack but they sell a complete pic programming kit with chips etc for about $80, there are also many online sites that do the same. it may help and avoid aggravation.
Nov 9, 2007. 12:28 PMdeviance says:
Thanks! Sorry for all the
newb' questions but what can I say, Imanewbie at this stuff =) Appreciate the input and will let ya know how my 'first attempt' goes ;)
Nov 8, 2007. 10:56 AMdeviance says:
This is the programmer I'm going to try building.

http://www.josepino.com/pic_projects/index?aaa-getting-started.jpc
Oct 31, 2007. 11:56 PMWilderLust says:
if you look at the first pic you can see the PIC16F877 right on it... that is how you will id chips usually. the reason you may find many variety of chips under the same family is that they come in different packages. this is the same as most ICs... you will usually see them in at least two packages... one is usually a DIP package like pictured above and then there are smaller high density chips that us engineers use for our production. sometimes there are different specs for the different versions as well for example when we design for the military, we use mil spec chips that tolerate more extreme temperatures. there are many different companies that make PIC like chips... another big player are the AVRs. i would browse IC catalogs a bit and pay attention to the packaging and different specs and you will see that there may be up to half dozen different chips that have the same number with a small different character or two at the end like the (A) you found. if you are a beginner, i would recommend you stay with DIP packages but if you download the DataSheets for the chips you will see the different packages available and many even have pictures of the packages but most have the layout. i hope this helps :-) cheers, WL
Nov 9, 2007. 8:47 PMTheMadScientist says:
sorry for the odd question, but is that reprogrammable? i've been so confused by these things lately, some being OTP or one time programmable, and others not. and the difference seems to be weather they have a screen to let UV light in or not. that chip seems to not have that screen, can someone correct me if i'm mistaken?
Nov 10, 2007. 7:30 AMTheMadScientist says:
ohhhh, I get it... man it sucks to lack buy online capability... i'm trying to get by with chips that have ROM or EEPROM normally, but can access external memory banks...
Nov 15, 2007. 6:44 PMstasterisk says:
No need! Most major chip vendors will send you free samples. Try it out! Also, google for LadyAda's website. She has a fabulous guide on getting silicon stuff for free, and a review of most major vendors who give out samples.
Aug 9, 2007. 10:23 AMgreen rose says:
hi im new here and im new to picmicro i just wana ask can you introduce me to this technology?we have our research and its about automated chicken feeder where the feeding time is programmed by picmicro pls help me what should i learn first before starting any project?im really at lost and can you help me regarding pic programming?thanks alot
Nov 2, 2006. 2:03 PMmojomoney says:
Have you ever attempted to run the programming software for Win 95 on an XP machine with the compatability mode set to simulate Win 95? You do so by right clicking on the executable file and opening the properties; inside the compatability tab there is an option to set the compatability mode to: Win 95, Win 98, NT 4.0 and Win 2000. I've had to use this in the past on PC's when XP first came out and few programs were written for it.
Jul 15, 2007. 2:08 AMTechnoMancer says:
if you go to:http://perso.orange.fr/softelec/Projects/PIC18/PP18/Projects_PIC18_PP18_us.htm
and download the software(it is PIC programming software!!! for PIC18 family) there is a program callled allowIO.exe that uses porttalk to allow programs to use IO ports under NT/XP/Vista
here is a segment from the installation instructions for the program: INSTALLING PP18 under Windows 2000/NT/XP:

- Copy "porttalk.sys" to your "C:\WINDOWS\system32\driver" directory.
- Execute "porttalk.reg" to register the new driver.
- Reboot your computer to start the driver after booting.
- Copy AllowIo.exe in the same directory than PP18.exe.
- Open a DOS window at this directory.
- Type "AllowIo.exe 0x378 PP18.exe" to allow PP18 a full access to LPT1.

Note :
During installation process you must have root privileges.
You can creat a batch file to launch AllowIO.exe and PP18.exe.
this will work with ne program just as long as you run it from a batch script and you know the port addressin hex!!!
hope this helps!!!
Apr 27, 2007. 1:13 PMBrennn10 says:
Is the chip mentioned here, a reprogrammable chip? Meaning that it can be used over and over again? With taking information off of it and putting different on.
Apr 29, 2007. 9:44 AMBrennn10 says:
What PIC programmer do you recommend?
Apr 30, 2007. 5:40 AMBrennn10 says:
Thanks alot. One more question. There are PIC programmers, and then there are micro-controllers. What is the difference?
1-40 of 58next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
81
Followers
40
Author:leevonk
www.leevonk.com