Picture of Intro to PIC Microcontrollers
a minimum of what you need to get started programming PIC micros for use in electronics projects (robotics, etc)

Step 1: What you need for the project

Picture of 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!

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.

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).

This is the compiler used in this demo to (similar to Basic language) program the PIC.
You could also use the -free- PICClite compiler (similar to C language).
You could also use a free assembly language compiler (assembly language is annoying).

This program allows you to download your code to the PIC.

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

1-40 of 51Next »
jasshopper10 months ago

can i use a PIC instead of atmega MCs in arduino?

Tbus1 year ago

Thank you for the PIC project. I am taking a home-study Into to Microcontrollers course (http://www.ciebookstore.com/intro-to-microcontroll...) and it's nice to know a lot of what I'm learning can be applied here and in other instructable projects!

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.
VIRON9 years ago
This looks interesting...
But windows just keeps getting sicker and less useful.
I'm searching for a technical bootable-linux-CDROM-distro. For free, of course!
leevonk (author)  VIRON8 years ago
puppy linux, look it up. You don't even need a hard drive. Check out the instructions on the website for how to install it etc, it's very very easy but they have great animated instructions. I put it on a cd, rebooted the computer (after changing the bios settings) and it worked beautifully.
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.
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...
Cool, I will definitely try it out!
Let me know how it goes...
I like to use Suse linux with KDE. Its a little harder to get customized but has a lot of power.
omnibot VIRON5 years ago
For Linux there is <a href="http://piklab.sourceforge.net/">PikLab</a>.<br />
Win7Maniac5 years ago
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.
12V6 years ago
i used a velleman k8048 and it works on xp with out paid software.
dude66574556 years ago
could you buy these at radio shack?
leevonk (author)  dude66574556 years ago
does anyone know about an open source pic programmer that will run on vista? will this one? thanks for the info in advance.
yourcat6 years ago
I think the PICAXE programming software can also do PICs, and that's free.
FlyByPC6 years ago
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.
Oldrunk6 years ago
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
collard417 years ago
its quite funny that you mention the PIC (personal introductory course) book, my friend wrote it.
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?
leevonk (author)  TheMadScientist7 years ago
yeah it's reprogrammable, any of the chips with 'flash' memory (go to microchip.com and look at their PIC lists, for instance the 40 pin 16-bit list: http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=8172&mid=14&lang=en&pageId=75) are reprogramable
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...
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.
green rose8 years ago
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
mojomoney8 years ago
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.
leevonk (author)  mojomoney8 years ago
I tried something similar to that, but not that exactly. It's not just a compatibility problem, xp prevents progs from accessing ports for security reasons, so it's actively inhibiting the functionality. Commercial programs can access the ports (obviously), I don't know how though.
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!!!
Brennn108 years ago
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.
leevonk (author)  Brennn108 years ago
yeah, it has flash memory, so its reprogrammable
What PIC programmer do you recommend?
leevonk (author)  Brennn108 years ago
for DOS programming at home, I'm using a cheap $15 programmer from ebay, works fine, just find one that has the PIC # you want to use listed as compatible. for windows programming at work I use an 'MPLAB ICD 2' connected to a 'demonstration board', they work well and the ICD 2 allows in circuit debugging (stepping the PIC through a program step by step to find a bug). http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010046
haven't used anything other than those.
Thanks alot. One more question. There are PIC programmers, and then there are micro-controllers. What is the difference?
flywoodkb9 years ago
What do you think the cost of these starter project materials would be, roughly?
leevonk (author)  flywoodkb9 years ago
usb to serial adapter (if you have a computer with windows 95 or earlier, don't need it) costs around $20 PIC microcontroller costs around $7 JDM programmer costs around $20 compiler options: PICClite is free PICBasic costs $99 PICC costs $950
leevonk (author)  leevonk9 years ago
IC-Prog is free

electronic components are almost nothing

regulated 5v power supply can be around $20 but you can use batteries, or probably find a good 5v wall-wart (those transformers that come with your electronic gadgets) sitting around somewhere.

You could also use any wall-wart (regarless of voltage) and a very cheap LM7805 regulator (see URL below)
or use an usb cable the red wire is +5v and the black is ground thats what i did to make a masgaer
roboguy leevonk8 years ago
Hey all. This is my first reply to a post... I use PIC ucontrollers in my research robotics projects. A lot of people get started with the 16F84 or the 877. I'd like to point people in the direction of the 18F series chips, specifically the 18Fxx31 series (I really like the 18F4431). These chips have all of the basic functionality, but they have great peripherals of use to home experimenters. Specifically, they have 8 channels (4 pairs) of PWM and a quadrature encoder input that is great for motor interfacing. I use MPLAB along with either the C18 compiler or MPASM for assembler for most of my work. BTW, I don't represent Microchip in any way, I just really like their stuff!
mplab is free and you can build an ICD2 clone by going to www.icd2clone.com, i wouldnt knock assembly language, its syntax may be tricky, but i can do whatever your doing in c or basic in 1/4 of the memory and have it run many times faster.
leevonk (author)  theprofessor8 years ago
yeah, and it will take you ten times as long to do it. I've used assembly language too, but I usually don't do applications that require its speed and efficiency of execution. So instead I prefer speedy and efficient programming.
1-40 of 51Next »